Skip to content

Commit

Permalink
Merge pull request #15 from DARPA-ASKEM/14-task-update-mkdocs-mkdocs-…
Browse files Browse the repository at this point in the history
…material-versions-and-add-print-site-plugin

#14 Update mkdocs versions, add print site plugin
  • Loading branch information
mecrouch authored Mar 21, 2024
2 parents 36e5fb5 + 006929d commit 88d8038
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ bin/
overrides/.icons/
_notes.md
site/
vale.ini
styles/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The help is designed to build with the latest MkDocs and Material theme. It also

- [mkdocs-glightbox](https://github.com/blueswen/mkdocs-glightbox) enables zoom functionality for images.
- [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) allows the use of variables in Markdown files.
- [mkdocs-print-site-plugin](https://github.com/timvink/mkdocs-print-site-plugin) creates a single page with all site content so that it can be exported to PDF.

To install the latest MkDocs, theme, and extensions:

Expand All @@ -20,6 +21,7 @@ pip install mkdocs
pip install mkdocs-material
pip install mkdocs-glightbox
pip install mkdocs-macros-plugin
pip install mkdocs-print-site-plugin
```

## Building the help site ##
Expand Down
4 changes: 4 additions & 0 deletions docs/assets/custom_banner.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>
<em>This box will disappear when printing</em>
</p>
<p>This page combines all help site pages into one. Export to PDF using <b>File > Print > Save as PDF</b>.</p>
19 changes: 13 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
site_name: Terarium Help
site_author: Uncharted Software Inc.

copyright: Copyright &copy; 2023 Uncharted Software Inc.
copyright: Copyright &copy; 2024 Uncharted Software Inc.

theme:
name: material
Expand Down Expand Up @@ -35,9 +35,15 @@ theme:
language: custom

plugins:
search: {}
glightbox: {}
macros: {}
- search: {}
- glightbox: {}
- macros: {}
- print-site:
enumerate_headings: false
add_cover_page: true
add_to_navigation: true
add_print_site_banner: true
print_site_banner_template: "docs/assets/custom_banner.tpl"

extra:
social:
Expand All @@ -58,11 +64,12 @@ markdown_extensions:
alternate_style: true
pymdownx.keys: {}
pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
options:
custom_icons:
- overrides/.icons
tables:

extra_css:
- stylesheets/extra.css
Expand Down
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Requirements for mkdocs
mkdocs == 1.5.2
mkdocs-material == 9.2.7
mkdocs-glightbox == 0.3.4
mkdocs-macros-plugin == 0.7.0
mkdocs == 1.5.3
mkdocs-material == 9.5.13
mkdocs-glightbox == 0.3.7
mkdocs-macros-plugin == 1.0.5
mkdocs-print-site-plugin == 2.3.6

0 comments on commit 88d8038

Please sign in to comment.