Create a page that contains all of your listings
Project description
mkdocs-extract-listings-plugin
A small plugin to extract all your listings and put them in a single page.
Might for example be useful if the search plugin makes it hard finding a code snippet you want to find (or you disabled the search).
Just open the page with all listings and use the Find in page
function.
Setup
-
Install the plugin using pip:
pip install mkdocs-extract-listings-plugin
-
Add the plugin to your
mkdocs.yml
:plugins: - search - extract_listings
If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set.More information about plugins in the MkDocs documentation.
-
Add a Markdown file for the page that will be filled with all the listings. In that file add the placeholder where the listings should be inserted. The default configuration expects a file named
listings.md
in yourdocs
folder, which contains the placeholderPLACEHOLDER_LISTINGS_PLUGIN
. This can be changed, see details in the following section.
Configuration
You can configure the plugin like this:
- extract_listings:
listings_file: listings.md
placeholder: PLACEHOLDER_LISTINGS_PLUGIN
listings_file
listings_file
is expected to contain the relative path to the Markdown file, where the listings should be written to.
If the file does not exist, an error will be raised during the build process.
The default value the string listings.md
.
placeholder
The value for placeholder
will be searched in the file referenced by listings_file
and be replaced with the list of all listings.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs-extract-listings-plugin-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6503ef1e49c5612fe4f7b23deccfb6404875c64863db38bbb8c89d464fffac80 |
|
MD5 | 55d577b63c5311d68c3ec8e5c82484e8 |
|
BLAKE2b-256 | 530fe0e04d6c70eab88eed547d8149db951d04eabcfbf5fbef4b681290e78178 |
Hashes for mkdocs_extract_listings_plugin-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22e6c49791009774d22d45f93a59ba384922e028f135ab163ec277e93e624188 |
|
MD5 | 71a1989981ceb68cf2dd87b9a92340d9 |
|
BLAKE2b-256 | 8b7f2d6d7b3615ce646d6b2bb49bda587ccfd4a099329174574eec4db08a89ef |