diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..c18dd8d83 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/doc/Doxyfile-mcss b/doc/Doxyfile-mcss index 48eeca82c..6b5ad64a8 100644 --- a/doc/Doxyfile-mcss +++ b/doc/Doxyfile-mcss @@ -103,26 +103,4 @@ ALIASES = \ "m_deprecated_since{2}=@since deprecated in \1.\2 @deprecated" \ "m_deprecated_since_latest=@since deprecated in Git master @deprecated" -HTML_EXTRA_STYLESHEET = \ - https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600&subset=latin-ext \ - ../css/m-dark+documentation.compiled.css - -##! M_PAGE_FINE_PRINT = "

Magnum docs. Part of the Magnum project, copyright © Vladimír Vondruš and contributors, 2010–2020.
Generated by Doxygen {doxygen_version} and m.css. Contact the team via GitHub, Gitter, e-mail or Twitter.

" - -##! M_SEARCH_HELP = "

Search for symbols, directories, files, pages, OpenGL, GLSL, Vulkan and OpenAL APIs. You can omit any prefix from the symbol or file path; adding a : or / suffix lists all members of given symbol or directory.

Use / to navigate through the list, Enter to go. Tab autocompletes common prefix, you can copy a link to the result using L while M produces a Markdown link.

" - -##! M_FAVICON = favicon.ico - -##! M_MAIN_PROJECT_URL = https://magnum.graphics/ -##! M_LINKS_NAVBAR1 = \ -##! "getting-started building cmake custom-buildsystems" \ -##! "pages features platforms example-index tips utilities" -##! M_LINKS_NAVBAR2 = \ -##! "namespaces" \ -##! "annotated" \ -##! "files" \ -##! "Python API" - -##! M_VERSION_LABELS = YES - # kate: hl Doxyfile diff --git a/doc/Doxyfile-public b/doc/Doxyfile-public index 3c1bb1377..be9a30414 100644 --- a/doc/Doxyfile-public +++ b/doc/Doxyfile-public @@ -102,20 +102,4 @@ ALIASES = \ GENERATE_TODOLIST = NO GENERATE_BUGLIST = NO -HTML_EXTRA_STYLESHEET = \ - https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600&subset=latin-ext \ - https://static.magnum.graphics/m-dark.compiled.css \ - https://static.magnum.graphics/m-dark.documentation.compiled.css - -##! M_LINKS_NAVBAR2 = \ -##! "namespaces" \ -##! "annotated" \ -##! "files" \ -##! "Python API" -##! M_SEARCH_DOWNLOAD_BINARY = YES -##! M_SEARCH_BASE_URL = https://doc.magnum.graphics/magnum/ -##! M_SEARCH_EXTERNAL_URL = "https://google.com/search?q=site:doc.magnum.graphics+Magnum+{query}" - -##! M_FAVICON = https://doc.magnum.graphics/favicon.ico - # kate: hl Doxyfile diff --git a/doc/conf-public.py b/doc/conf-public.py new file mode 100644 index 000000000..dd8fb6212 --- /dev/null +++ b/doc/conf-public.py @@ -0,0 +1,20 @@ +# Inherit everything from the local config +import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__))) +from conf import * + +DOXYFILE = 'Doxyfile-public' + +assert "Python API" in LINKS_NAVBAR2[3][0] +LINKS_NAVBAR2[3] = ("Python API", []) + +STYLESHEETS = [ + 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600&subset=latin-ext', + 'https://static.magnum.graphics/m-dark.compiled.css', + 'https://static.magnum.graphics/m-dark.documentation.compiled.css' +] + +SEARCH_DOWNLOAD_BINARY = True +SEARCH_BASE_URL = "https://doc.magnum.graphics/magnum/" +SEARCH_EXTERNAL_URL = "https://google.com/search?q=site:doc.magnum.graphics+Magnum+{query}" + +FAVICON = 'https://doc.magnum.graphics/favicon.ico' diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 000000000..55a22eebd --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,49 @@ +import re + +DOXYFILE = 'Doxyfile-mcss' + +STYLESHEETS = [ + 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600&subset=latin-ext', + '../css/m-dark+documentation.compiled.css' +] + +MAIN_PROJECT_URL = 'https://magnum.graphics/' + +LINKS_NAVBAR1 = [ + (None, 'getting-started', [ + (None, 'building'), + (None, 'cmake'), + (None, 'custom-buildsystems') + ]), + (None, 'pages', [ + (None, 'features'), + (None, 'platforms'), + (None, 'example-index'), + (None, 'tips'), + (None, 'utilities') + ]) +] +LINKS_NAVBAR2 = [ + (None, 'namespaces', []), + (None, 'annotated', []), + (None, 'files', []), + ("Python API", []) +] + +FINE_PRINT = """

Magnum docs. Part of the Magnum project, copyright © Vladimír Vondruš and contributors, 2010–2020.
Generated by Doxygen {doxygen_version} and m.css. Contact the team via GitHub, Gitter, e-mail or Twitter.

""" + +SEARCH_HELP = """

Search for symbols, directories, files, pages, OpenGL, GLSL, Vulkan and OpenAL APIs. You can omit any prefix from the symbol or file path; adding a : or / suffix lists all members of given symbol or directory.

Use / to navigate through the list, Enter to go. Tab autocompletes common prefix, you can copy a link to the result using L while M produces a Markdown link.

""" + +FAVICON = 'favicon.ico' + +VERSION_LABELS = True + +_magnum_colors_src = re.compile(r"""0x(?P[0-9a-f]{6})(?P[0-9a-f]{2})?(?P_s?rgba?f?)""") +_magnum_colors_dst = r"""0x\g\g\g""" + +#def _add_color_swatch(str): + #return + +M_CODE_FILTERS_POST = { + 'C++': lambda str: _magnum_colors_src.sub(_magnum_colors_dst, str) +}