GeoServer makes use of include and literalinclude directives, map these to mkdocs-include plugin use.
Although material-for-mkdocs recommends use of snippets the mkdocs-include plugin closely matches the sphinx-build functionality.
Implementation notes:
- Use of absolute path is assumed from
docs folder
- Use
./ or ../ to indicate a relative path
Reference:
literal include directive mapping
Used to include code example:
RichStructuredText:
.. literalinclude:: files/counteries.sld
:language: xml
Markdown:
```xml
{% include "./files/countries.sld" %}
```
include directive markdown
Used to include rst content inline:
RichStructuredText
.. include:: /../../../../LICENSE.md
:start-after: GeoServer is distributed under the GNU General Public License Version 2.0 license:
:end-before: For latest contact information of Open Source Geospatial Foundation see the website at
MarkDown:
{%
include-markdown "../../../../../LICENSE.md"
start="GeoServer is distributed under the GNU General Public License Version 2.0 license:"
end="For latest contact information of Open Source Geospatial Foundation see the website at"
dedent=true
%}
GeoServer makes use of include and literalinclude directives, map these to mkdocs-include plugin use.
Although material-for-mkdocs recommends use of
snippetsthe mkdocs-include plugin closely matches the sphinx-build functionality.Implementation notes:
docsfolder./or../to indicate a relative pathReference:
literal include directive mapping
Used to include code example:
RichStructuredText:
Markdown:
include directive markdown
Used to include rst content inline:
RichStructuredText
MarkDown:
{% include-markdown "../../../../../LICENSE.md" start="GeoServer is distributed under the GNU General Public License Version 2.0 license:" end="For latest contact information of Open Source Geospatial Foundation see the website at" dedent=true %}