From e44a1ef4584c6894ec910a23cacce24b4cf416a8 Mon Sep 17 00:00:00 2001 From: "D.C. Compton" Date: Fri, 27 Sep 2024 22:01:21 -0500 Subject: [PATCH] Revise content. --- docs/credits.md | 119 ++++++++++++++++++++++++- docs/index.md | 29 ++++-- docs/static/css/adjust.css | 2 +- marp/{ => notebook}/images/content.png | Bin marp/{ => notebook}/images/topic.png | Bin marp/{ => notebook}/notebook.css | 0 mkdocs.yml | 8 +- scripts/config.py | 2 +- 8 files changed, 150 insertions(+), 10 deletions(-) rename marp/{ => notebook}/images/content.png (100%) rename marp/{ => notebook}/images/topic.png (100%) rename marp/{ => notebook}/notebook.css (100%) diff --git a/docs/credits.md b/docs/credits.md index d41fdeb..26c116f 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -1,3 +1,118 @@ -https://github.com/squidfunk/mkdocs-material -Copyright (c) 2016-2024 Martin Donath \ No newline at end of file +## MkDocs + +=== "Acknowledgment" + + This project uses MkDocs to manage and produce the content and site. + + - [MkDocs](https://www.mkdocs.org/) + - [GitHub Project](https://github.com/mkdocs/mkdocs) + + > Copyright © 2014, Tom Christie. All rights reserved. + +=== "License" + + ``` + Copyright © 2014-present, Tom Christie. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, are permitted provided that the following + conditions are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + ``` + +--- + +## Material for MkDocs + +=== "Acknowledgment" + + This project uses the Material for MkDocs theme as the basis of the notebook. + + - [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) + - [GitHub Project](https://github.com/squidfunk/mkdocs-material) + + > Copyright (c) 2016-2024 Martin Donath + +=== "License" + + ``` + Copyright (c) 2016-2024 Martin Donath + + 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 NON-INFRINGEMENT. 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. + ``` + +--- + +## Marp Markdown Presentation Ecosystem + +=== "Acknowledgment" + + This project uses Marp to create the HTML and PDF presentations. + + - [Marp](https://marp.app/) + - [GitHub Project](https://github.com/marp-team/marp) + + > Copyright (c) 2018-2023 Marp team (marp-team@marp.app) + +=== "License" + + ``` + MIT License + + Copyright (c) 2018-2023 Marp team (marp-team@marp.app) + + 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. + ``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 15398f3..06eaff3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,19 +1,38 @@ -# Welcome to MkDocs +# Welcome to the Notebook -For full documentation visit [mkdocs.org](https://www.mkdocs.org). +For full documentation visit [chriscompton.github.io/notebook](https://chriscompton.github.io/notebook/). -## Commands +## MkDocs Commands -* `mkdocs new [dir-name]` - Create a new project. * `mkdocs serve` - Start the live-reloading docs server. * `mkdocs build` - Build the documentation site. -* `mkdocs -h` - Print help message and exit. + +## Marp Commands + +* `python scripts/marp.py` - Generate presentations when front matter has `marp: true` + +!!! note + + The **marp script will alter your markdown files** to add buttons at the bottom of the page for + HTML and PDF. If you change `marp: false`, it will cause the script to remove the links and + the generated files. ## Project layout mkdocs.yml # The configuration file. + scripts/ + marp.py # Scans for markdown files requiring presentations. + encode.py # Converts the png template images to css embeddable images. + marp/ + notebook/ + image/ # Has the png background images for presentations. + notebook.css # The CSS file used for presentation formatting. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files. + +## Formatting + +You can find great documentation on formatting content at the [mkdocs-material reference](https://squidfunk.github.io/mkdocs-material/reference/). \ No newline at end of file diff --git a/docs/static/css/adjust.css b/docs/static/css/adjust.css index 7bb7b75..e85bb17 100644 --- a/docs/static/css/adjust.css +++ b/docs/static/css/adjust.css @@ -1,5 +1,5 @@ -/* Sets a common highlight color */ +/* Sets a common highlight color .md-content a { color: #00833d; } diff --git a/marp/images/content.png b/marp/notebook/images/content.png similarity index 100% rename from marp/images/content.png rename to marp/notebook/images/content.png diff --git a/marp/images/topic.png b/marp/notebook/images/topic.png similarity index 100% rename from marp/images/topic.png rename to marp/notebook/images/topic.png diff --git a/marp/notebook.css b/marp/notebook/notebook.css similarity index 100% rename from marp/notebook.css rename to marp/notebook/notebook.css diff --git a/mkdocs.yml b/mkdocs.yml index 41e7eba..c0dcea1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,10 @@ site_name: Notebook +# docs_dir: ../your_docs_dir repo_url: https://github.com/ChrisCompton/notebook theme: name: material + palette: + primary: green plugins: - search @@ -54,4 +57,7 @@ markdown_extensions: exclude_docs: | __*.md draft_docs: | - DRAFT_*.md \ No newline at end of file + DRAFT_*.md + +extra: + generator: false \ No newline at end of file diff --git a/scripts/config.py b/scripts/config.py index 64c90d8..3b909a0 100644 --- a/scripts/config.py +++ b/scripts/config.py @@ -1,3 +1,3 @@ markdown_source_path = 'docs' -marp_theme_path = 'marp' +marp_theme_path = 'marp/notebook' marp_theme_image_path = 'marp/images' \ No newline at end of file