Skip to content

Contributing๐ŸŽฃ

Introduction๐ŸŽฃ

TODO: What is this page about?

DuckDuckLib Firefox extension๐ŸŽฃ

TODO

website๐ŸŽฃ

note:

Warning

You should never edit files in your pages repository by hand if you’re using the gh-deploy command because you will lose your work the next time you run the command.

Question: if this is the case what is the purpose of edit_uri in mkdocs.yml? see docs

mkDocs๐ŸŽฃ

See mkdocs.yml in the github repo for all enabled configuration options

Environment๐ŸŽฃ

In addition to mkdocs, the following 3rd party plugins are required to build the website. Install scripts listed first, all together, followed by details about what they are and why they are needed.

# mkdcomments
pip3 pip install git+https://github.com/ryneeverett/python-markdown-comments.git
# mkdocs-material
pip3 install mkdocs-material
# mkdocs-git-revision-date-plugin
pip3 install mkdocs-git-revision-date-plugin

pip3 install mkdocs-git-revision-date-localized-plugin
mkdcomments๐ŸŽฃ

github: ryneeverett/python-markdown-comments

Removes triple-dashed html comments (``) in preprocessing.

required to fix (workaround) issue: YAML frontmatter parsed totally wrong when published to github pages via gh-deploy ยท Issue #23 ยท DuckDuckLib/duckduckLib

mkdocs-material๐ŸŽฃ

github: squidfunk/mkdocs-materialย | docs/demo: Material for MkDocs

Create a branded static site from a set of Markdown files to host the documentation of your Open Source or commercial project โ€“ customizable, searchable, mobile-friendly, 40+ languages. Set up in 5 minutes.

Note: If considering install method other than pip, please be aware that some things won’t work properly, e.g. this note re theme structure:

Theme extension prerequisites

As the custom_dir variable is used for the theme extension process, Material for MkDocs needs to be installed via pip and referenced with the name parameter in mkdocs.yml. It will not work when cloning from git.

Another example in this note on the regarding configuration.

Using other methods may cause problems in building.

mkdocs-git-revision-date-plugin๐ŸŽฃ

Source | Plugin

The git-revision-date plugin adds support for displaying the date a document was last updated at the bottom of each page.

mkdocs-git-revision-date-localized-plugin๐ŸŽฃ

Source ยท Plugin

adds support for adding a localized last updated date at the bottom of each page.

Building๐ŸŽฃ

cd ../DuckDuckLib.github.io
mkdocs gh-deploy --config-file mkdocs.yml

Writing๐ŸŽฃ

Template๐ŸŽฃ

use template

Admonitions๐ŸŽฃ

The Admonition plugin is enabled.

!!! type "optional explicit title within double quotes"
    Any number of other indented markdown elements.

    This is the second paragraph.

Last update: 2021-03-20