chiark / gitweb /
doc: adapted site to project organization changes.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 2 Apr 2019 21:48:31 +0000 (23:48 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 3 Apr 2019 09:24:12 +0000 (11:24 +0200)
26 files changed:
doc/admire/math.rst
doc/build-status.html.in
doc/css/page-layout.rst
doc/documentation.rst [new file with mode: 0644]
doc/documentation/doxygen-test.rst
doc/documentation/doxygen.rst
doc/index.rst
doc/pelican.rst [deleted file]
doc/plugins.rst
doc/plugins/components-test.rst
doc/plugins/components.rst
doc/plugins/htmlsanity.rst
doc/plugins/images-test.rst
doc/plugins/images.rst
doc/plugins/links.rst
doc/plugins/math-and-code-test.rst
doc/plugins/math-and-code.rst
doc/plugins/metadata.rst
doc/plugins/plots-and-graphs-test.rst
doc/plugins/plots-and-graphs.rst
doc/themes.rst [new file with mode: 0644]
doc/themes/pelican.rst [moved from doc/pelican/theme.rst with 91% similarity]
doc/themes/writing-rst-content.rst [moved from doc/pelican/writing-content.rst with 96% similarity]
doc/why.rst
documentation/test_doxygen/__init__.py
site/pelicanconf.py

index a04d3440f12ec3c6834e8733979832ac2a1f258e..b075fd897eebe53899e2cc6c6722a7b2c260ce4b 100644 (file)
@@ -106,7 +106,7 @@ m.css math
             LaTeX formulas to vector graphics locally, your viewers are saved
             from needless HTTP requests and heavy JavaScript processing.
 
-            .. button-success:: {filename}/pelican.rst
+            .. button-success:: {filename}/themes/pelican.rst
                 :class: m-fullwidth
 
                 Start using Pelican
index f3cd13693337ab00c4bf8be644ef379d87c2a52f..3d28d7f643360ecf0659042832de41a08576a8db 100644 (file)
@@ -19,7 +19,7 @@
       <td rowspan="4" id="mcss-py36"><a>&nbsp;<br/><span class="m-text m-small">&nbsp;</span></a></td>
     </tr>
     <tr>
-      <th class="m-text-right">Pelican plugins</th>
+      <th class="m-text-right">Plugins</th>
     </tr>
     <tr>
       <th class="m-text-right">Graph rendering</th>
index d08ef2c2bd8d3a2aa90534b456db8f390cf0a8b4..7035779f00ebe644c705feb45e92c4c709657d2c 100644 (file)
@@ -49,7 +49,7 @@ active section highlighting and more.
 .. note-success::
 
     The whole CSS page layout functionality is also available through a
-    `m.css Pelican theme <{filename}/pelican/theme.rst>`_. Check it out!
+    `m.css Pelican theme <{filename}/themes/pelican.rst>`_. Check it out!
 
 .. contents::
     :class: m-block m-default
diff --git a/doc/documentation.rst b/doc/documentation.rst
new file mode 100644 (file)
index 0000000..8f7d653
--- /dev/null
@@ -0,0 +1,80 @@
+..
+    This file is part of m.css.
+
+    Copyright © 2017, 2018, 2019 Vladimír Vondruš <mosra@centrum.cz>
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the "Software"),
+    to deal in the Software without restriction, including without limitation
+    the rights to use, copy, modify, merge, publish, distribute, sublicense,
+    and/or sell copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+    DEALINGS IN THE SOFTWARE.
+..
+
+Doc generators
+##############
+
+m.css is not just for static sites and blogs --- there's a need for a modern,
+lightweight and mobile-friendly layout for API documentation as well. The m.css
+documentation generators are defined by their first-class search functionality
+and clutter-free output, favoring human-produced documentation over
+autogenerated content.
+
+.. button-success:: https://doc.magnum.graphics
+
+    Live demo
+
+    doc.magnum.graphics
+
+`Features`_
+===========
+
+All m.css documentation themes share the following features:
+
+-   Modern, lightweight and mobile-friendly HTML5 markup
+-   Minimalistic design without unnecessary chrome and UI elements
+-   Focused on presenting the actual written documentation while reducing
+    questionable auto-generated content
+-   Math rendered as embedded SVG instead of raster images / MathJax, making
+    use of the `m.math <{filename}/plugins/math-and-code.rst#math>`_ plugin
+-   Graphviz / Dot diagrams rendered as embedded SVG, as implemented in
+    `m.dot <{filename}/plugins/plots-and-graphs.rst#graphs>`_
+-   Using Pygments for better code highlighting, courtesy of the
+    `m.code <{filename}/plugins/math-and-code.rst#code>`_ plugin
+
+`Search`_
+---------
+
+-   Vastly superior search capabilities with immediate feedback
+-   Search anywhere from a page by opening a popup using a hotkey
+-   Lookahead with instant feedback without requiring any server-side backend
+-   Search for symbols using any prefix
+-   Fully controllable by keyboard
+
+.. image:: {static}/static/opengl-search.png
+
+.. note-success::
+
+    If you want to know more, the search functionality implementation and
+    features are detailed
+    `in this blog post <https://blog.magnum.graphics/meta/implementing-a-fast-doxygen-search/>`_.
+
+`Doxygen C++ theme » <{filename}/documentation/doxygen.rst>`_
+=============================================================
+
+More than just a theme --- taking the XML output produced by Doxygen, cleaning
+it up, reducing the autogenerated clutter, while making it mobile-friendly and
+extending it with better content layouting capabilities and improved support
+for C++11 and beyond. Fully compatible with Doxygen URL format and tag files to
+avoid broken links once you switch.
index 3d6f5c7de18615457e1aea24d3d38206aaff6ff7..441495c9b188e72b305047cc28f3aabdd21d9945 100644 (file)
 Test
 ####
 
-:save_as: doxygen/test/index.html
-:breadcrumb: {filename}/doxygen.rst Doxygen theme
+:save_as: documentation/doxygen/test/index.html
+:breadcrumb:
+    {filename}/documentation.rst Doc themes
+    {filename}/documentation/doxygen.rst Doxygen
 :css: {static}/static/m-dark.doxygen.compiled.css
 
 Lists
index 3c183ce03bf74f5a4e3133f4df4bd7e2f2eb8a95..992069e23423595d5f88f8e802141866fd1e570b 100644 (file)
     DEALINGS IN THE SOFTWARE.
 ..
 
-Doxygen theme
-#############
+Doxygen C++ theme
+#################
 
+:alias: /doxygen/index.html
+:breadcrumb: {filename}/documentation.rst Doc generators
 :summary: A modern, mobile-friendly drop-in replacement for the stock Doxygen
     HTML output with a first-class search functionality
 
@@ -76,13 +78,13 @@ switch.
 The base is contained in a single Python script and related style/template
 files, for advanced features such as math rendering it'll make use of internals
 of some `m.css plugins <{filename}/plugins.rst>`_. Clone
-:gh:`the m.css GitHub repository <mosra/m.css$master/doxygen>` and look into
-the ``doxygen/`` directory:
+:gh:`the m.css GitHub repository <mosra/m.css$master/documentation>` and look
+into the ``documentation/`` directory:
 
 .. code:: sh
 
     git clone git://github.com/mosra/m.css
-    cd m.css/doxygen
+    cd m.css/documentation
 
 The script requires Python 3.6, depends on `Jinja2 <http://jinja.pocoo.org/>`_
 for templating and `Pygments <http://pygments.org/>`_ for code block
@@ -125,12 +127,12 @@ inside:
 
 This will derive the configuration from the original ``Doxyfile``, disables
 builtin Doxygen HTML output and enables XML output instead, with some unneeded
-features disabled for faster processing. Now run ``dox2html5.py`` and point it
+features disabled for faster processing. Now run ``doxygen.py`` and point it
 to your ``Doxyfile-mcss``:
 
 .. code:: sh
 
-    ./dox2html5.py path/to/your/Doxyfile-mcss
+    ./doxygen.py path/to/your/Doxyfile-mcss
 
 It will run ``doxygen`` to generate the XML output, processes it and generates
 the HTML output in the configured output directory. After the script is done,
@@ -142,38 +144,13 @@ If you see something unexpected or not see something expected, check the
 `Features`_
 ===========
 
+In addition to features `shared by all doc generators <{filename}/documentation.rst#features>`_:
+
 -   Modern, valid, mobile-friendly HTML5 markup without table layouts
--   Minimalistic design without unnecessary chrome and UI elements
 -   URLs fully compatible with stock Doxygen HTML output to preserve existing
     links
 -   Focused on presenting the actual written documentation while reducing
     questionable auto-generated content
--   Math rendered as embedded SVG instead of raster images / MathJax. The
-    supported feature set is equivalent to the `m.math Pelican plugin <{filename}/plugins/math-and-code.rst#math>`_,
-    see its documentation for more information.
--   Graphviz / Dot diagrams rendered as embedded SVG. The supported feature set
-    is equivalent to the `m.dot Pelican plugin <{filename}/plugins/plots-and-graphs.rst#graphs>`_,
-    see its documentation for more information.
--   Uses Pygments for better code highlighting. The supported feature set is
-    equivalent to the `m.code Pelican plugin <{filename}/plugins/math-and-code.rst#code>`_,
-    see its documentation for more information.
-
-`Search`_
----------
-
--   Vastly superior search capabilities with immediate feedback
--   Search anywhere from a page by opening a popup using a hotkey
--   Lookahead with instant feedback without requiring any server-side backend
--   Search for symbols using any prefix
--   Fully controllable by keyboard
-
-.. image:: {static}/static/opengl-search.png
-
-.. note-success::
-
-    If you want to know more, the search functionality implementation and
-    features are detailed
-    `in this blog post <https://blog.magnum.graphics/meta/implementing-a-fast-doxygen-search/>`_.
 
 `Important differences to stock HTML output`_
 ---------------------------------------------
@@ -289,14 +266,14 @@ Variable                        Description
                                 external references
 :ini:`HTML_EXTRA_STYLESHEET`    List of CSS files to include. Relative paths
                                 are searched relative to the Doxyfile base dir
-                                and to the ``dox2html5.py`` script dir as a
+                                and to the ``doxygen.py`` script dir as a
                                 fallback. See `Theme selection`_ for more
                                 information.
 :ini:`HTML_EXTRA_FILES`         List of extra files to copy (for example
                                 additional CSS files that are :css:`@import`\ ed
                                 from the primary one). Relative paths are
                                 searched relative to the Doxyfile base dir and
-                                to the ``dox2html5.py`` script dir as a
+                                to the ``doxygen.py`` script dir as a
                                 fallback.
 :ini:`DOT_FONTNAME`             Font name to use for ``@dot`` and ``@dotfile``
                                 commands. To ensure consistent look with the
@@ -333,7 +310,7 @@ Variable                            Description
                                     :html:`<link rel="icon" />`. If empty, no
                                     :html:`<link>` tag is rendered. Relative
                                     paths are searched relative to the Doxyfile
-                                    base dir and to the ``dox2html5.py`` script
+                                    base dir and to the ``doxygen.py`` script
                                     dir as a fallback. See `Theme selection`_
                                     for more information.
 :ini:`M_LINKS_NAVBAR1`              Left navbar column links. See
@@ -1203,13 +1180,13 @@ suffix of the title.
 
 .. code:: sh
 
-    ./dox2html5.py [-h] [--templates TEMPLATES] [--wildcard WILDCARD]
-                   [--index-pages INDEX_PAGES [INDEX_PAGES ...]]
-                   [--no-doxygen] [--search-no-subtree-merging]
-                   [--search-no-lookahead-barriers]
-                   [--search-no-prefix-merging] [--sort-globbed-files]
-                   [--debug]
-                   doxyfile
+    ./doxygen.py [-h] [--templates TEMPLATES] [--wildcard WILDCARD]
+                 [--index-pages INDEX_PAGES [INDEX_PAGES ...]]
+                 [--no-doxygen] [--search-no-subtree-merging]
+                 [--search-no-lookahead-barriers]
+                 [--search-no-prefix-merging] [--sort-globbed-files]
+                 [--debug]
+                 doxyfile
 
 Arguments:
 
@@ -1282,7 +1259,7 @@ file / symbol tree:
 
         ...
 
-To help you debugging this, run ``dox2html5.py`` with the ``--debug`` option.
+To help you debugging this, run ``doxygen.py`` with the ``--debug`` option.
 and look for entries that look like below. Because there are many false
 positives, this information is not present in the non-verbose output.
 
index e1b3edf09a605ac0c8d1788f70d561ca54650219..239fd237f57cfe130d1bc2237a6d63afb26113d5 100644 (file)
@@ -86,7 +86,7 @@ m.css
             don't need forms, progressbars, popups, dropdowns or other cruft.
             You want fast iteration times.
 
-            .. button-warning:: {filename}/pelican.rst
+            .. button-warning:: {filename}/themes/pelican.rst
                 :class: m-fullwidth
 
                 Use it with Pelican
diff --git a/doc/pelican.rst b/doc/pelican.rst
deleted file mode 100644 (file)
index d5b651d..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-..
-    This file is part of m.css.
-
-    Copyright © 2017, 2018, 2019 Vladimír Vondruš <mosra@centrum.cz>
-
-    Permission is hereby granted, free of charge, to any person obtaining a
-    copy of this software and associated documentation files (the "Software"),
-    to deal in the Software without restriction, including without limitation
-    the rights to use, copy, modify, merge, publish, distribute, sublicense,
-    and/or sell copies of the Software, and to permit persons to whom the
-    Software is furnished to do so, subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be included
-    in all copies or substantial portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-    DEALINGS IN THE SOFTWARE.
-..
-
-Pelican
-#######
-
-.. role:: sh(code)
-    :language: sh
-
-`Pelican <https://getpelican.com/>`_ is a static site generator powered by
-Python and unlike most other static site generators, it uses
-`reStructuredText <http://docutils.sourceforge.net/rst.html>`_ instead of
-Markdown for authoring content. m.css provides a theme for it, together with a
-set of useful plugins.
-
-.. note-warning::
-
-    Please, in this case, don't judge the book by its cover --- the
-    :abbr:`reST <reStructuredText>` website might look like it was made in 1992
-    and never updated since, but believe me, it's a remarkably designed format.
-    Once you dive into it, you will not want to go back to Markdown.
-
-`Quick start`_
-==============
-
-Install Pelican either via ``pip`` or using your system package manager.
-
-.. note-danger::
-
-    In order to use the m.css `theme <{filename}/pelican/theme.rst>`_ or
-    `plugins <{filename}/plugins.rst>`_ later, you need to install Pelican 4
-    and the Python 3 version of it. Most of the plugins work with Python 3.4,
-    while some (such as the
-    `math plugin <{filename}/plugins/math-and-code.rst#math>`_) need 3.5.
-    Python 2 is not supported and compatibility with Pelican 3.7 has been
-    dropped.
-
-.. code:: sh
-
-    # You may need sudo here
-    pip3 install pelican
-
-Note that using the m.css theme or Pelican plugins may require additional
-dependencies than just Pelican --- documentation of each lists the additional
-requirements, if any. Once you have Pelican installed, create a directory for
-your website and bootstrap it:
-
-.. code:: sh
-
-    mkdir ~/my-cool-site/
-    cd ~/my-cool-site/
-    pelican-quickstart
-
-This command will ask you a few questions. You don't need the URL prefix for
-now, but you definitely want a Makefile and an auto-reload script to be
-generated. Leave the rest at its defaults. Once the quickstart script finishes,
-you can run the auto-reloading like this:
-
-.. todo: remove the auto-reload script when Pelican has it builtin
-
-.. code:: sh
-
-    make devserver
-
-It will print quite some output about processing things and serving the data to
-the console. Open your fresh website at http://localhost:8000. The site is now
-empty, so let's create a simple article and put it into ``content/``
-subdirectory with a ``.rst`` extension. For this example that would be
-``~/my-cool-site/content/my-cool-article.rst``:
-
-.. code:: rst
-
-    My cool article
-    ###############
-
-    :date: 2017-09-14 23:04
-    :category: Cool things
-    :tags: cool, article, mine
-    :summary: This article has a cool summary.
-
-    This article has not only cool summary, but also has cool contents. Lorem?
-    *Ipsum.* `Hi, google! <https://google.com>`_
-
-If you did everything right, the auto-reload script should pick the file up and
-process it (check the console output). Then it's just a matter of refreshing
-your browser to see it on the page.
-
-.. note-info::
-
-    Currently, if Pelican encounters an error when processing the article, it
-    will just stop refreshing and you need to restart it by executing
-    :sh:`make devserver` again.
-
-*That's it!* Congratulations, you successfully made your first steps with
-Pelican. The default theme might be a bit underwhelming, so let's fix that.
-Click on the headers below to get to know more.
-
-`Writing content » <{filename}/pelican/writing-content.rst>`_
-=============================================================
-
-Quick guide and tips for writing content using :abbr:`reST <reStructuredText>`.
-Chances are that you already know your way around from Sphinx or other
-documentation tools, nevertheless there are some hidden tricks that you might
-not know about yet.
-
-`Theme » <{filename}/pelican/theme.rst>`_
-=========================================
-
-A feature-packed theme with modern and responsive design that exposes all of
-m.css functionality with goodies on top such as social meta tags, breadcrumb
-navigation and more.
index 88303de280b9b91c664424b2f278a53acdd35911..ddf585f2772c71cb3a3c601939934434e7bd3354 100644 (file)
     DEALINGS IN THE SOFTWARE.
 ..
 
-Pelican plugins
-###############
+Plugins
+#######
 
 .. role:: py(code)
     :language: py
 
-The `Pelican theme <{filename}/pelican/theme.rst>`_ provided by m.css uses only
-a part of the functionality on its own, the rest is exposed by various plugins.
+In addition to providing a theme for `Pelican <{filename}/themes/pelican.rst>`_
+or `Doxygen <{filename}/documentation/doxygen.rst>`_  that styles the overall
+page layout and basic typography, m.css also contains a collection of plugins,
+extending the capabilities futher.
 
 `Usage`_
 ========
 
-Each plugin is a standalone ``*.py`` file that is meant to be downloaded and
-put into a ``m/`` subdirectory into one of your :py:`PLUGIN_PATHS`. Then you
-add given :py:`m.something` package to your :py:`PLUGINS` in ``pelicanconf.py``
-and restart Pelican. Download the plugins below or
-:gh:`grab the whole Git repository <mosra/m.css>`:
+For use with Pelican, each plugin is a standalone ``*.py`` file that is meant
+to be downloaded and put into a ``m/`` subdirectory into one of your
+:py:`PLUGIN_PATHS`. Then you add given :py:`m.something` package to your
+:py:`PLUGINS` in ``pelicanconf.py`` and restart Pelican. Download the plugins
+below or :gh:`grab the whole Git repository <mosra/m.css>`:
 
 -   :gh:`m.htmlsanity <mosra/m.css$master/plugins/m/htmlsanity.py>`
 -   :gh:`m.components <mosra/m.css$master/plugins/m/components.py>`
 -   :gh:`m.images <mosra/m.css$master/plugins/m/images.py>`
--   :gh:`m.math  <mosra/m.css$master/plugins/m/math.py>` (needs also :gh:`latex2svg <mosra/m.css$master/plugins/latex2svg.py>`),
-    :gh:`m.code <mosra/m.css$master/plugins/m/code.py>` (needs also :gh:`ansilexer <mosra/m.css$master/plugins/ansilexer.py>`)
+-   :gh:`m.math  <mosra/m.css$master/plugins/m/math.py>` (needs also
+    :gh:`latex2svg <mosra/m.css$master/plugins/latex2svg.py>`),
+    :gh:`m.code <mosra/m.css$master/plugins/m/code.py>` (needs also
+    :gh:`ansilexer <mosra/m.css$master/plugins/ansilexer.py>`)
 -   :gh:`m.plots <mosra/m.css$master/plugins/m/plots.py>`,
     :gh:`m.dot <mosra/m.css$master/plugins/m/dot.py>`
 -   :gh:`m.link <mosra/m.css$master/plugins/m/link.py>`,
@@ -57,9 +61,13 @@ and restart Pelican. Download the plugins below or
     :gh:`m.alias <mosra/m.css$master/plugins/m/alias.py>`
 -   :gh:`m.metadata <mosra/m.css$master/plugins/m/metadata.py>`
 
-Click on the headings below to get to know more. Note that particular plugins
-can have additional dependencies besides just Pelican, see documentation of
-each of them to see more.
+All plugins that make sense in the context of the
+`Doxygen theme <{filename}/documentation/doxygen.rst>`_ are implicitly exposed
+to it, without needing to explicitly enable them.
+
+Note that particular plugins can have additional dependencies, see
+documentation of each of them to see more. Click on the headings below to get
+to know more.
 
 `HTML sanity » <{filename}/plugins/htmlsanity.rst>`_
 ====================================================
index ce5af3ad4dad5bc2e9dc4ca75a82e7888fb06caa..ade7c5123e3f5c97ef1a0c6fe7bcecc2c73d9ce0 100644 (file)
@@ -26,7 +26,7 @@ Test
 ####
 
 :save_as: plugins/components/test/index.html
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
              {filename}/plugins/components.rst Components
 
 Should match the rendering of
index fc4b1611519b2964598d80b57f3320a3e130904f..c74150b831a4c551cdc738a9b1eabbe4546cce94 100644 (file)
 Components
 ##########
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« HTML sanity <{filename}/plugins/htmlsanity.rst>`_ | `Pelican plugins <{filename}/plugins.rst>`_ | `Images » <{filename}/plugins/images.rst>`_
+        `« HTML sanity <{filename}/plugins/htmlsanity.rst>`_ | `Plugins <{filename}/plugins.rst>`_ | `Images » <{filename}/plugins/images.rst>`_
 
 .. role:: html(code)
     :language: html
@@ -50,6 +50,9 @@ which is the most important thing when authoring content.
 `How to use`_
 =============
 
+`Pelican`_
+----------
+
 Download the `m/components.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.components` package to your :py:`PLUGINS` in ``pelicanconf.py``. This
@@ -59,6 +62,16 @@ plugin assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
 
     PLUGINS += ['m.htmlsanity', 'm.components']
 
+`Doxygen theme`_
+----------------
+
+Unfortunately, due to a lack of extensibility of the Doxygen markup language,
+it's not possible to provide the components through easy-to-use commands. All
+you have is the ability to apply CSS classes using ``@m_class``, ``@m_span``
+and ``@m_div``. See the
+`Doxygen theme-specific commands <http://localhost:8000/documentation/doxygen/#theme-specific-commands>`_
+for more information.
+
 `Transitions`_
 ==============
 
index 44b1f49656d1c04751d73b12c76d6eed8e05c201..a3367ea5509ea29cf3448653049823cf544e1642 100644 (file)
 HTML sanity
 ###########
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `Pelican plugins <{filename}/plugins.rst>`_ | `Components » <{filename}/plugins/components.rst>`_
+        `Plugins <{filename}/plugins.rst>`_ | `Components » <{filename}/plugins/components.rst>`_
 
 .. role:: html(code)
     :language: html
@@ -50,6 +50,9 @@ the current century.
 `How to use`_
 =============
 
+`Pelican`_
+----------
+
 Download the `m/htmlsanity.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.htmlsanity` package to your :py:`PLUGINS` in ``pelicanconf.py``.
@@ -68,6 +71,12 @@ it with the above setting.
 
     pip3 install Pyphen
 
+`Doxygen theme`_
+----------------
+
+The Doxygen theme generates the HTML output directly, without docutils in the
+mix, which means there's no need for this particular plugin there.
+
 `What it does`_
 ===============
 
@@ -363,7 +372,7 @@ from passed text. The ``enable`` argument works the same as with the
 There are already
 `numerous <https://github.com/getpelican/pelican-plugins/tree/master/better_figures_and_images>`_
 `Pelican <https://github.com/classner/better_code_samples/tree/91717a204bbd0ae4a1af6fe25ac5dd783fb4a7db>`_
-`plugins <https://github.com/getpelican/pelican-plugins/tree/master/better_tables>`_
+`plugins <https://github.com/getpelican/pelican-plugins/tree/master/better_tables>`__
 that try to do similar things, but they *attempt* to fix it using BeautifulSoup
 on top of the generated HTML. That's a horrendous thing to do, so why not just
 prevent the horror from happening?
index e06afb18a37b851d3e68793e9d75fee03092f268..d599cbae17b63b48e9a0fd98cb072d284e739f74 100644 (file)
@@ -26,7 +26,7 @@ Test
 ####
 
 :save_as: plugins/images/test/index.html
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
              {filename}/plugins/images.rst Images
 
 `Images, figures`_
index 3c5e021abc4a06917817933b142f833e3eb3f29c..3ced8805f38f9900cc3a4a83b5abdc59f15a0fe6 100644 (file)
 Images
 ######
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« Components <{filename}/plugins/components.rst>`_ | `Pelican plugins <{filename}/plugins.rst>`_ | `Math and code » <{filename}/plugins/math-and-code.rst>`_
+        `« Components <{filename}/plugins/components.rst>`_ | `Plugins <{filename}/plugins.rst>`_ | `Math and code » <{filename}/plugins/math-and-code.rst>`_
 
 .. role:: css(code)
     :language: css
@@ -48,6 +48,9 @@ beautiful image galleries.
 `How to use`_
 =============
 
+`Pelican`_
+----------
+
 Download the `m/images.py <{filename}/plugins.rst>`_ file, put it including the
 ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add ``m.images``
 package to your :py:`PLUGINS` in ``pelicanconf.py``. This plugin assumes
@@ -66,6 +69,17 @@ library installed. Get it via ``pip`` or your distribution package manager:
 
     pip3 install Pillow
 
+`Doxygen theme`_
+----------------
+
+The Doxygen theme makes the builtin ``@image`` command behave similarly to
+the :rst:`.. image::` directive of this plugin, if you add a title to it, it
+behaves like :rst:`.. figure::`. It's possible to add extra CSS classes by
+placing ``@m_class`` in a paragraph before the actual image, see the
+`Doxygen theme-specific commands <http://localhost:8000/documentation/doxygen/#theme-specific-commands>`_
+for more information. The :rst:`.. image-grid::` functionality is not available
+in the Doxygen theme.
+
 `Images, figures`_
 ==================
 
index b6e6cc3fc2492a791c0137899cccdfb11503371c..e350dc5d9ae55357150e95f0476e27438f6c8bed 100644 (file)
 Links and other
 ###############
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« Plots and graphs <{filename}/plugins/plots-and-graphs.rst>`_ | `Pelican plugins <{filename}/plugins.rst>`_ | `Metadata » <{filename}/plugins/metadata.rst>`_
+        `« Plots and graphs <{filename}/plugins/plots-and-graphs.rst>`_ | `Plugins <{filename}/plugins.rst>`_ | `Metadata » <{filename}/plugins/metadata.rst>`_
 
 .. role:: html(code)
     :language: html
@@ -38,6 +38,8 @@ Links and other
     :language: py
 .. role:: rst(code)
     :language: rst
+.. role:: ini(code)
+    :language: ini
 
 m.css plugins make linking to external content almost too easy. If your website
 is about coding, chances are quite high that you will be linking to
@@ -52,12 +54,19 @@ own requirements.
 .. contents::
     :class: m-block m-default
 
+.. note-warning::
+
+    None of these plugins can be supported in the Doxygen theme (except the
+    `Doxygen documentation`_ links, which are builtin). Instead, you can have
+    some limited templating options by adding a custom command to the
+    :ini:`ALIASES` Doxyfile option.
+
 `Stylable links`_
 =================
 
-Download the `m/link.py <{filename}/plugins.rst>`_ file, put it including the
-``m/`` directory into one of your :py:`PLUGIN_PATHS` and add :py:`m.link`
-package to your :py:`PLUGINS` in ``pelicanconf.py``:
+For Pelican, download the `m/link.py <{filename}/plugins.rst>`_ file, put it
+including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
+:py:`m.link` package to your :py:`PLUGINS` in ``pelicanconf.py``:
 
 .. code:: python
 
@@ -84,7 +93,7 @@ additional CSS classes. At the moment the plugin knows only external URLs.
 `GitHub`_
 =========
 
-Download the `m/gh.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, download the `m/gh.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.gh` package to your :py:`PLUGINS` in ``pelicanconf.py``:
 
@@ -141,7 +150,7 @@ CSS classes by deriving the role and adding the :rst:`:class:` option.
 `OpenGL functions and extensions`_
 ==================================
 
-Download the `m/gl.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, download the `m/gl.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.gl` package to your :py:`PLUGINS` in ``pelicanconf.py``:
 
@@ -189,7 +198,7 @@ and adding the :rst:`:class:` option.
 `Vulkan functions and extensions`_
 ==================================
 
-Download the `m/vk.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, download the `m/vk.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.vk` package to your :py:`PLUGINS` in ``pelicanconf.py``:
 
@@ -234,7 +243,7 @@ possible to specify alternate link text using the well-known syntax.
 `Doxygen documentation`_
 ========================
 
-Download the `m/dox.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, download the `m/dox.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.dox` package to your plugins in ``pelicanconf.py``. The plugin uses
 Doxygen tag files to get a list of linkable symbols and you need to provide
@@ -313,8 +322,8 @@ external not), you could do this:
 .. note-success::
 
     If you haven't noticed yet, m.css also provides a
-    `full-featured Doxygen theme <{filename}/doxygen.rst>`_ with first-class
-    search functionality. Check it out!
+    `full-featured Doxygen theme <{filename}/documentation/doxygen.rst>`_ with
+    first-class search functionality. Check it out!
 
 `Abbreviations`_
 ================
@@ -322,7 +331,7 @@ external not), you could do this:
 While not exactly a link but rather a way to produce correct :html:`<abbr>`
 elements, it belongs here as it shares a similar syntax.
 
-Download the `m/abbr.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, download the `m/abbr.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.abbr` package to your :py:`PLUGINS` in ``pelicanconf.py``. This plugin
 assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
@@ -362,7 +371,7 @@ role and adding the :rst:`:class:` option.
 Okay, this is not a link at all, but --- sometimes you might want to display
 size of a file, for example to tell the users how big the download will be.
 
-Download the `m/filesize.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, ownload the `m/filesize.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.filesize` package to your :py:`PLUGINS` in ``pelicanconf.py``.
 
@@ -403,7 +412,7 @@ and preserving old links for backwards compatibility is a vital thing for user
 friendliness. This plugin allows you to create a redirect alias URLs for your
 pages and articles.
 
-Download the `m/alias.py <{filename}/plugins.rst>`_ file, put it
+For Pelican, download the `m/alias.py <{filename}/plugins.rst>`_ file, put it
 including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :py:`m.alias` package to your :py:`PLUGINS` in ``pelicanconf.py``. This plugin
 assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
index b30694a51393b51d36469985bfb2188f89db26a4..8000c8201a55ee5d7e6c4498179d9d7dd0731cbc 100644 (file)
@@ -26,7 +26,7 @@ Test
 ####
 
 :save_as: plugins/math-and-code/test/index.html
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
              {filename}/plugins/math-and-code.rst Math and code
 
 Math
index 03b0ce435bf2aa6166e221917cdb9d7c902c155a..049a330c4d2a52ae6ef3898234012193833621c5 100644 (file)
 Math and code
 #############
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« Images <{filename}/plugins/images.rst>`_ | `Pelican plugins <{filename}/plugins.rst>`_ | `Plots and graphs » <{filename}/plugins/plots-and-graphs.rst>`_
+        `« Images <{filename}/plugins/images.rst>`_ | `Plugins <{filename}/plugins.rst>`_ | `Plots and graphs » <{filename}/plugins/plots-and-graphs.rst>`_
 
 .. role:: css(code)
     :language: css
@@ -52,10 +52,11 @@ rendering directly from your :abbr:`reST <reStructuredText>` sources.
 `Math`_
 =======
 
-Download the `m/math.py and latex2svg.py <{filename}/plugins.rst>`_ files, put
-them including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
-:py:`m.math` package to your :py:`PLUGINS` in ``pelicanconf.py``. This plugin
-assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
+For Pelican, download the `m/math.py and latex2svg.py <{filename}/plugins.rst>`_
+files, put them including the ``m/`` directory into one of your
+:py:`PLUGIN_PATHS` and add :py:`m.math` package to your :py:`PLUGINS` in
+``pelicanconf.py``. This plugin assumes presence of
+`m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
 
 .. note-danger::
 
@@ -68,6 +69,15 @@ assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
     M_MATH_RENDER_AS_CODE = False
     M_MATH_CACHE_FILE = 'm.math.cache'
 
+For the Doxygen theme, this feature is builtin. Use either the ``@f[`` command
+for block-level math or the ``@f$`` command for inline math. It's possible to
+add extra CSS classes by placing ``@m_class`` in a paragraph before the actual
+math block (or right before inline math), see the
+`Doxygen theme-specific commands <http://localhost:8000/documentation/doxygen/#theme-specific-commands>`_
+for more information. The :ini:`M_MATH_CACHE_FILE` option is supported as well;
+there's no equivalent to the :ini:`M_MATH_RENDER_AS_CODE` option implemented at
+this point.
+
 In addition you need some LaTeX distribution installed. Use your distribution
 package manager, for example on Ubuntu:
 
@@ -269,15 +279,25 @@ directive.
 `Code`_
 =======
 
-Download the `m/code.py and ansilexer.py <{filename}/plugins.rst>`_ files, put
-them including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
-:py:`m.code` package to your :py:`PLUGINS` in ``pelicanconf.py``. This plugin
-assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
+For Pelican, download the `m/code.py and ansilexer.py <{filename}/plugins.rst>`_
+files, put them including the ``m/`` directory into one of your :py:`PLUGIN_PATHS`
+and add :py:`m.code` package to your :py:`PLUGINS` in ``pelicanconf.py``. This
+plugin assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
 
 .. code:: python
 
     PLUGINS += ['m-htmlsanity', 'm.code']
 
+For the Doxygen theme, this feature is builtin. Use the ``@code{.ext}`` command
+either in a block or inline, the various ``@include`` and ``@snippet`` commands
+support it as well. Language detection is done from the value of ``.ext`` in
+the ``@code`` command and from the include/snippet filename for the others.
+It's possible to add extra CSS classes by placing ``@m_class`` in a paragraph
+before the actual code block (or right before inline code), see the
+`Doxygen theme-specific commands <http://localhost:8000/documentation/doxygen/#theme-specific-commands>`_
+for more information. There's no possibility to highlight particular code
+lines.
+
 In addition you need to have `Pygments <http://pygments.org>`_ installed. Get
 it via ``pip`` or your distribution package manager:
 
index 54db3de6e8eb2d19663736b0f24db49b3a08c4d7..59d19a8b14845dac4221c85421de0164aca493fb 100644 (file)
 Metadata
 ########
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :summary: Assigns additional description and images to categories, authors and
-    tags.
+    tags in Pelican-powered sites.
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« Links and other <{filename}/plugins/links.rst>`_ | `Pelican plugins <{filename}/plugins.rst>`_
+        `« Links and other <{filename}/plugins/links.rst>`_ | `Plugins <{filename}/plugins.rst>`_
 
 .. role:: html(code)
     :language: html
@@ -41,7 +41,9 @@ Metadata
 .. role:: rst(code)
     :language: rst
 
-Assigns additional description and images to categories, authors and tags.
+Assigns additional description and images to categories, authors and tags in
+Pelican-powered sites. As it extends a Pelican-specific feature, it has no
+equivalent for other themes.
 
 .. contents::
     :class: m-block m-default
@@ -72,8 +74,9 @@ directories are as follows and can be configured with these settings:
 
 The m.css Pelican theme recognizes presence of this plugin and renders the
 additional metadata both in the page and in the `Open Graph <http://ogp.me/>`_
-and `Twitter Card <https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary-card-with-large-image>`_ social :html:`<meta>` tags, in addition to tags rendered by
-`articles themselves <{filename}/pelican/theme.rst#social-meta-tags-for-articles>`_.
+and `Twitter Card <https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary-card-with-large-image>`_
+social :html:`<meta>` tags, in addition to tags rendered by
+`articles themselves <{filename}/themes/pelican.rst#social-meta-tags-for-articles>`_.
 See below for more information.
 
 `Author metadata`_
@@ -115,7 +118,7 @@ following metadata are recognized:
     badge on articles, to author details on author page and in ``og:image`` /
     ``twitter:image`` social :html:`<meta>` tags on author page, overriding the
     global :py:`M_SOCIAL_IMAGE`. It's expected to be smaller and square
-    similarly to the :py:`M_SOCIAL_IMAGE` `described in the theme documentation <{filename}/pelican/theme.rst#global-site-image>`_.
+    similarly to the :py:`M_SOCIAL_IMAGE` `described in the theme documentation <{filename}/themes/pelican.rst#global-site-image>`_.
     If not set, the details and badges are rendered without images and no
     social tag is present. Does not affect ``twitter:card``, it's set to
     ``summary`` regardless of whether the image is present or not.
@@ -188,11 +191,11 @@ for category named *Guest posts* will be in a file named
     being in given category. The m.css Pelican theme uses it to add an image to
     category badges on articles, to category details on category page and
     in ``og:image`` / ``twitter:image`` social :html:`<meta>` tags on category
-    page. If `article cover image <{filename}/pelican/theme.rst#jumbo-articles>`_
+    page. If `article cover image <{filename}/themes/pelican.rst#jumbo-articles>`_
     is not specified, the image is used also for ``og:image`` / ``twitter:image``
     on given article, overriding the global :py:`M_SOCIAL_IMAGE`. It's expected
     to be smaller and square similarly to the
-    :py:`M_SOCIAL_IMAGE` `described in the theme documentation <{filename}/pelican/theme.rst#global-site-image>`_.
+    :py:`M_SOCIAL_IMAGE` `described in the theme documentation <{filename}/themes/pelican.rst#global-site-image>`_.
     If not set, the details and badges are rendered without images and no
     social tag is present. Does not affect ``twitter:card``, it's set to
     ``summary`` or ``summary_large_image`` depending only on presence of
index eb5824d39c4f33315cebe25cf08e18dd60b6d8e9..b25915ab46f5e5c8ddc9b85ec1ea2bfadba3ea62 100644 (file)
@@ -26,7 +26,7 @@ Test
 ####
 
 :save_as: plugins/plots-and-graphs/test/index.html
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
              {filename}/plugins/plots-and-graphs.rst Plots and graphs
 
 Plots
index a8520145db84ad689d84c8aa71a49ea1d126dd92..2c24482fbec7c197f619217c5b3bf628928edd7e 100644 (file)
 Plots and graphs
 ################
 
-:breadcrumb: {filename}/plugins.rst Pelican plugins
+:breadcrumb: {filename}/plugins.rst Plugins
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« Math and code <{filename}/plugins/math-and-code.rst>`_ | `Pelican plugins <{filename}/plugins.rst>`_ | `Links and other » <{filename}/plugins/math-and-code.rst>`_
+        `« Math and code <{filename}/plugins/math-and-code.rst>`_ | `Plugins <{filename}/plugins.rst>`_ | `Links and other » <{filename}/plugins/math-and-code.rst>`_
 
 .. role:: dot(code)
     :language: dot
@@ -57,15 +57,17 @@ the graphics is rendered to a SVG that's embedded directly in the HTML markup.
 `Plots`_
 ========
 
-Download the `m/plots.py <{filename}/plugins.rst>`_ file, put it including the
-``m/`` directory into one of your :py:`PLUGIN_PATHS` and add ``m.plots``
-package to your :py:`PLUGINS` in ``pelicanconf.py``.
+For Pelican, download the `m/plots.py <{filename}/plugins.rst>`_ file, put it
+including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
+``m.plots`` package to your :py:`PLUGINS` in ``pelicanconf.py``.
 
 .. code:: python
 
     PLUGINS += ['m.plots']
     M_PLOTS_FONT = 'Source Sans Pro'
 
+This feature has no equivalent in the `Doxygen theme <{filename}/documentation/doxygen.rst>`_.
+
 Set :py:`M_PLOTS_FONT` to a font that matches your CSS theme (it's Source Sans
 Pro for `builtin m.css themes <{filename}/css/themes.rst>`_), note that you
 *need to have the font installed* on your system, otherwise it will fall back
@@ -170,9 +172,9 @@ comment :rst:`..`.
 `Graphs`_
 =========
 
-Download the `m/dot.py <{filename}/plugins.rst>`_ file, put it including the
-``m/`` directory into one of your :py:`PLUGIN_PATHS` and add ``m.dot``
-package to your :py:`PLUGINS` in ``pelicanconf.py``.
+For Pelican, ownload the `m/dot.py <{filename}/plugins.rst>`_ file, put it
+including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
+``m.dot`` package to your :py:`PLUGINS` in ``pelicanconf.py``.
 
 .. note-danger::
 
@@ -190,7 +192,16 @@ theme (it's Source Sans Pro at :css:`16px` for
 `builtin m.css themes <{filename}/css/themes.rst>`_), note that you *need to
 have the font installed* on your system, otherwise it will fall back to
 whatever system font it finds instead (for example DejaVu Sans) and the output
-won't look as expected. In addition you need the
+won't look as expected.
+
+In case of Doxygen, this feature is builtin. Use the ``@dot`` and ``@dotfile``
+commands. It's possible to add extra CSS classes by placing ``@m_class`` in a
+paragraph before the actual graph block, see the
+`Doxygen theme-specific commands <http://localhost:8000/documentation/doxygen/#theme-specific-commands>`_
+for more information. Font name and size is controlled using the builtin
+:ini:`DOT_FONTNAME` and :ini:`DOT_FONTSIZE` options.
+
+In addition you need the
 `Graphviz <https://graphviz.org/>`_ library installed. Get it via your
 distribution package manager, for example on Ubuntu:
 
diff --git a/doc/themes.rst b/doc/themes.rst
new file mode 100644 (file)
index 0000000..b62e627
--- /dev/null
@@ -0,0 +1,58 @@
+..
+    This file is part of m.css.
+
+    Copyright © 2017, 2018, 2019 Vladimír Vondruš <mosra@centrum.cz>
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the "Software"),
+    to deal in the Software without restriction, including without limitation
+    the rights to use, copy, modify, merge, publish, distribute, sublicense,
+    and/or sell copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+    DEALINGS IN THE SOFTWARE.
+..
+
+Themes
+######
+
+On top of the low-level CSS styles, m.css provides ready-made themes suited
+mainly for static site generators and other tools powered by
+`reStructuredText <http://docutils.sourceforge.net/rst.html>`_.
+
+.. note-warning::
+
+    Please, in this case, don't judge the book by its cover --- the
+    :abbr:`reST <reStructuredText>` website might look like it was made in 1992
+    and never updated since, but believe me, it's a remarkably designed format.
+    Once you dive into it, you will not want to go back to Markdown.
+
+.. button-success:: https://magnum.graphics
+
+    Live demo
+
+    magnum.graphics
+
+`Writing reST content » <{filename}/themes/writing-rst-content.rst>`_
+=====================================================================
+
+Quick guide and tips for writing content using :abbr:`reST <reStructuredText>`.
+Chances are that you already know your way around from Sphinx or other
+documentation tools, nevertheless there are some hidden tricks that you might
+not know about yet.
+
+`Pelican theme » <{filename}/themes/pelican.rst>`_
+==================================================
+
+A feature-packed theme with modern and responsive design that exposes all of
+m.css functionality with goodies on top such as social meta tags, breadcrumb
+navigation and more. Used by this very website.
similarity index 91%
rename from doc/pelican/theme.rst
rename to doc/themes/pelican.rst
index ff37e68b4ca994470528dd0e09c3c95bf423d56b..fbedcf2df739cfd69ea8efc66b75b9e011acd7dd 100644 (file)
     DEALINGS IN THE SOFTWARE.
 ..
 
-Theme
-#####
+Pelican
+#######
 
-:breadcrumb: {filename}/pelican.rst Pelican
+:alias:
+    /pelican/index.html
+    /pelican/theme/index.html
+:breadcrumb: {filename}/themes.rst Themes
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `« Writing content <{filename}/pelican/writing-content.rst>`_ | `Pelican <{filename}/pelican.rst>`_
+        `« Writing reST content <{filename}/themes/writing-rst-content.rst>`_ | `Themes <{filename}/themes.rst>`_
 
 .. role:: html(code)
     :language: html
@@ -38,22 +41,97 @@ Theme
     :language: py
 .. role:: rst(code)
     :language: rst
+.. role:: sh(code)
+    :language: sh
 .. |x| unicode:: U+00D7 .. nicer multiply sign
 
-The second largest offering of m.css is a full-featured theme for the
-`Pelican static site generator <https://getpelican.com/>`_. The theme is
-designed to fit both the use case of a simple blog consisting of just articles
-or a full product/project/portfolio website where the blog is only a side dish.
+`Pelican <https://getpelican.com/>`_ is a static site generator powered by
+Python and unlike most other static site generators, it uses
+`reStructuredText <http://docutils.sourceforge.net/rst.html>`_ instead of
+Markdown for authoring content. m.css provides a theme for it, together with a
+set of useful plugins. The theme is designed to fit both the use case of a
+simple blog consisting of just articles or a full product/project/portfolio
+website where the blog is only a side dish.
+
+.. button-success:: https://magnum.graphics
+
+    Live demo
+
+    magnum.graphics
 
 .. contents::
     :class: m-block m-default
 
-`Quick start`_
-==============
+`First steps with Pelican`_
+===========================
+
+Install Pelican either via ``pip`` or using your system package manager.
+
+.. note-danger::
+
+    In order to use the m.css theme or `plugins <{filename}/plugins.rst>`_, you
+    need to install Pelican 4 and the Python 3 version of it. Most of the
+    plugins work with Python 3.4, while some (such as the
+    `math plugin <{filename}/plugins/math-and-code.rst#math>`_) need 3.5.
+    Python 2 is not supported and compatibility with Pelican 3.7 has been
+    dropped.
+
+.. code:: sh
+
+    # You may need sudo here
+    pip3 install pelican
+
+Note that using the m.css theme or Pelican plugins may require additional
+dependencies than just Pelican --- documentation of each lists the additional
+requirements, if any. Once you have Pelican installed, create a directory for
+your website and bootstrap it:
+
+.. code:: sh
+
+    mkdir ~/my-cool-site/
+    cd ~/my-cool-site/
+    pelican-quickstart
+
+This command will ask you a few questions. Leave most of the questions at their
+defaults, you can change them later. Once the quickstart script finishes, you
+can generate the website and spin up a auto-reload webserver for it with the
+following command:
+
+.. code:: sh
+
+    pelican -Dlr
+
+It will print quite some output about processing things and serving the data to
+the console. Open your fresh website at http://localhost:8000. The site is now
+empty, so let's create a simple article and put it into ``content/``
+subdirectory with a ``.rst`` extension. For this example that would be
+``~/my-cool-site/content/my-cool-article.rst``:
+
+.. code:: rst
+
+    My cool article
+    ###############
+
+    :date: 2017-09-14 23:04
+    :category: Cool things
+    :tags: cool, article, mine
+    :summary: This article has a cool summary.
+
+    This article has not only cool summary, but also has cool contents. Lorem?
+    *Ipsum.* `Hi, google! <https://google.com>`_
+
+If you did everything right, the auto-reload script should pick the file up and
+process it (check the console output). Then it's just a matter of refreshing
+your browser to see it on the page.
+
+*That's it!* Congratulations, you successfully made your first steps with
+Pelican. Well, apart from the fact that the default theme is a bit
+underwhelming --- so let's fix that.
+
+`Basic theme setup`_
+====================
 
-Following the `Pelican quick start guide <{filename}/pelican.rst#quick-start>`_,
-it's assumed you already have at least Python 3.4 and the Python 3 version of
-Pelican installed. The easiest way to start is putting the
+The easiest way to start is putting the
 :gh:`whole Git repository <mosra/m.css>` of m.css into your project, for
 example as a submodule:
 
similarity index 96%
rename from doc/pelican/writing-content.rst
rename to doc/themes/writing-rst-content.rst
index d83856620f71cf18199f78e3515a3e7383a44b9c..f0111c087ba4711b7dc978292d56206c7ee4d35a 100644 (file)
     DEALINGS IN THE SOFTWARE.
 ..
 
-Writing content
-###############
+Writing reST content
+####################
 
-:breadcrumb: {filename}/pelican.rst Pelican
+:alias: /pelican/writing-content/index.html
+:breadcrumb: {filename}/themes.rst Themes
 :footer:
     .. note-dim::
         :class: m-text-center
 
-        `Pelican <{filename}/pelican.rst>`_ | `Theme » <{filename}/pelican/theme.rst>`_
+        `Themes <{filename}/themes.rst>`_ | `Pelican » <{filename}/themes/pelican.rst>`_
 
 .. role:: html(code)
     :language: html
@@ -142,7 +143,7 @@ contents. Consecutive indented lines are treated as part of the same field.
 See the `Pelican documentation <https://docs.getpelican.com/en/stable/content.html>`_
 for details about recognized fields and how various metadata can be also
 automatically extracted from the filesystem. The
-`m.css Pelican theme <{filename}/pelican/theme.rst>`_ recognizes a few more
+`m.css Pelican theme <{filename}/themes/pelican.rst>`_ recognizes a few more
 fields.
 
 `Directives`_
@@ -217,7 +218,7 @@ Example and corresponding output, note the indentation:
 .. note-info::
 
     Please note that the above example code uses some directives provided by
-    `m.css Pelican plugins <{filename}/plugins.rst>`_ that are not builtin in
+    `m.css reST plugins <{filename}/plugins.rst>`_ that are not builtin in
     the :abbr:`reST <reStructuredText>` parser itself.
 
 `Interpreted text roles`_
@@ -447,7 +448,7 @@ info about `inline markup <http://docutils.sourceforge.net/docs/ref/rst/restruct
     in your document. Very useful for navigation in large pages and articles.
 
 For stuff like images, figures, code blocks, math listing etc., m.css provides
-`Pelican plugins <{filename}/plugins.rst>`_ that do it better than the builtin
+`various plugins <{filename}/plugins.rst>`_ that do it better than the builtin
 way. Head over to the official :abbr:`reST <reStructuredText>` documentation
 for `more info about builtin directives <http://docutils.sourceforge.net/docs/ref/rst/directives.html>`_.
 
@@ -461,7 +462,7 @@ for `more info about builtin directives <http://docutils.sourceforge.net/docs/re
 -   It's also possible to put raw HTML code inline by deriving from the
     `raw <http://docutils.sourceforge.net/docs/ref/rst/roles.html#raw>`__ role.
 
-Again, m.css provides `Pelican plugins`_ that allow you to have inline code,
-math, GitHub and Doxygen links and much more. Head over to the official
+Again, m.css provides `various plugins`_ that allow you to have inline
+code, math, GitHub and Doxygen links and much more. Head over to the official
 :abbr:`reST <reStructuredText>` documentation for
 `more info about builtin roles <http://docutils.sourceforge.net/docs/ref/rst/roles.html>`_.
index 99367ca2a1a3dd8c5e8099d0a3ca3e13ad62c957..df599a94c31427b38390331a57bd465ef27ba02b 100644 (file)
@@ -83,10 +83,11 @@ If you are like me, you want a website that presents your main work, not that
 your main work is presenting websites. So remove the unneeded hassle of paying
 extra for a dynamic webhosting, installing and maintaining a huge CMS and
 patching it twice a month for a neverending stream new CVEs. Together with
-`Pelican <{filename}/pelican.rst>`_, m.css provides a solution harnessing the
-endless possibilities of your local machine to generate a bunch of static HTML
-files, which you can then upload *anywhere*. And as a bonus, you have the full
-control over your content --- nothing's hidden in opaque databases.
+`Pelican <{filename}/themes/pelican.rst>`_, m.css provides a solution
+harnessing the endless possibilities of your local machine to generate a bunch
+of static HTML files, which you can then upload *anywhere*. And as a bonus, you
+have the full control over your content --- nothing's hidden in opaque
+databases.
 
 .. note-success::
 
index 0d298d2278761e4e10e0a9a6b540e9f8b02100f1..24fd4948027e0bb4a5b0f81170b713c6cb0cad45 100644 (file)
@@ -26,7 +26,6 @@ import os
 import shutil
 import subprocess
 import unittest
-import xml.etree.ElementTree as ET
 
 from doxygen import run, default_templates, default_wildcard, default_index_pages
 
index 7f04af2b5e74d2d6898f7aa2fd4356618c925dd2..1bf59d39d349815163724849ca5459acbf92bceb 100644 (file)
@@ -78,11 +78,13 @@ M_LINKS_NAVBAR1 = [('Why?', 'why/', 'why', []),
                         ('Components', 'css/components/', 'css/components'),
                         ('Page layout', 'css/page-layout/', 'css/page-layout'),
                         ('Themes', 'css/themes/', 'css/themes')]),
-                   ('Pelican', 'pelican/', 'pelican', [
-                        ('Writing content', 'pelican/writing-content/', 'pelican/writing-content'),
-                        ('Theme', 'pelican/theme/', 'pelican/theme')])]
+                   ('Themes', 'themes/', 'themes', [
+                        ('Writing reST content', 'themes/writing-rst-content/', 'pelican/writing-content'),
+                        ('Pelican', 'themes/pelican/', 'themes/pelican')])]
 
-M_LINKS_NAVBAR2 = [('Plugins', 'plugins/', 'plugins', [
+M_LINKS_NAVBAR2 = [('Doc generators', 'documentation/', 'documentation', [
+                        ('Doxygen C++ theme', 'documentation/doxygen/', 'documentation/doxygen')]),
+                   ('Plugins', 'plugins/', 'plugins', [
                         ('HTML sanity', 'plugins/htmlsanity/', 'plugins/htmlsanity'),
                         ('Components', 'plugins/components/', 'plugins/components'),
                         ('Images', 'plugins/images/', 'plugins/images'),
@@ -90,7 +92,6 @@ M_LINKS_NAVBAR2 = [('Plugins', 'plugins/', 'plugins', [
                         ('Links and other', 'plugins/links/', 'plugins/links'),
                         ('Plots and graphs', 'plugins/plots-and-graphs/', 'plugins/plots-and-graphs'),
                         ('Metadata', 'plugins/metadata/', 'plugins/metadata')]),
-                   ('Doxygen theme', 'doxygen/', 'doxygen', []),
                    ('GitHub', 'https://github.com/mosra/m.css', '', [])]
 
 M_LINKS_FOOTER1 = [('m.css', '/'),
@@ -108,11 +109,12 @@ M_LINKS_FOOTER2 = [('CSS', 'css/'),
                    ('Page layout', 'css/page-layout/'),
                    ('Themes', 'css/themes/')]
 
-M_LINKS_FOOTER3 = [('Pelican', 'pelican/'),
-                   ('Writing content', 'pelican/writing-content/'),
-                   ('Theme', 'pelican/theme/'),
+M_LINKS_FOOTER3 = [('Themes', 'themes/'),
+                   ('Writing reST content', 'themes/writing-rst-content/'),
+                   ('Pelican', 'themes/pelican/'),
                    ('', ''),
-                   ('Doxygen theme', 'doxygen/')]
+                   ('Doc generators', 'documentation/'),
+                   ('Doxygen C++ theme', 'documentation/doxygen/')]
 
 M_LINKS_FOOTER4 = [('Plugins', 'plugins/'),
                    ('HTML sanity', 'plugins/htmlsanity/'),
@@ -138,6 +140,7 @@ EXTRA_PATH_METADATA = {'static/favicon.ico': {'path': 'favicon.ico'}}
 
 PLUGIN_PATHS = ['../plugins']
 PLUGINS = ['m.abbr',
+           'm.alias',
            'm.code',
            'm.components',
            'm.dox',