diff --git a/examples/blog-standalone/docs/README.md b/examples/blog-standalone/docs/README.md new file mode 100644 index 0000000..62b03a4 --- /dev/null +++ b/examples/blog-standalone/docs/README.md @@ -0,0 +1,23 @@ +# Creating a standalone blog + +Sometimes it is desirable to set up a website that has a blog as its central +feature. Rather than being embedded into a wider website with its own complex +structure, the blog structure organizes most of the content. + +This example shows how set up such a blog using the [blog plugin]. + +It shows how to: + +- configure the `mkdocs.yml` to activate and configure the plugin +- set up navigation to prominently feature the blog structure +- set up a directory structure in your `docs/` folder +- add an `.authors.yml` file with author information + +The naming of the files containing the blog posts is just a +suggestion, you can name them any way you like. What matters is the +meta data at in the header. + + [blog plugin]: https://squidfunk.github.io/mkdocs-material/plugins/blog/ + + + diff --git a/examples/blog-standalone/docs/demo/.authors.yml b/examples/blog-standalone/docs/demo/.authors.yml new file mode 100644 index 0000000..6119bc8 --- /dev/null +++ b/examples/blog-standalone/docs/demo/.authors.yml @@ -0,0 +1,9 @@ +authors: + squidfunk: + name: Martin Donath + description: Creator + avatar: https://github.com/squidfunk.png + alexvoss: + name: Alex Voss + description: Weltenwanderer + avatar: https://github.com/alexvoss.png diff --git a/examples/blog-standalone/docs/demo/about/index.md b/examples/blog-standalone/docs/demo/about/index.md new file mode 100644 index 0000000..d07fe8c --- /dev/null +++ b/examples/blog-standalone/docs/demo/about/index.md @@ -0,0 +1 @@ +# About... \ No newline at end of file diff --git a/examples/blog-standalone/docs/demo/index.md b/examples/blog-standalone/docs/demo/index.md new file mode 100644 index 0000000..e69de29 diff --git a/examples/blog-standalone/docs/demo/posts/firstpost.md b/examples/blog-standalone/docs/demo/posts/firstpost.md new file mode 100644 index 0000000..5cdcd8c --- /dev/null +++ b/examples/blog-standalone/docs/demo/posts/firstpost.md @@ -0,0 +1,32 @@ +--- +authors: + - alexvoss +date: 2023-10-11 +categories: + - meta +--- + +# My first blog post + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec +maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula +erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. +Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris +Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in +sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac +metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. + + + +Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum +massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam +tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet +molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. + +Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. +In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc +pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis +arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. +In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque +tellus id elit ultricies, vel finibus erat cursus. + diff --git a/examples/blog-standalone/docs/demo/posts/secondpost.md b/examples/blog-standalone/docs/demo/posts/secondpost.md new file mode 100644 index 0000000..352d997 --- /dev/null +++ b/examples/blog-standalone/docs/demo/posts/secondpost.md @@ -0,0 +1,32 @@ +--- +authors: + - squidfunk +date: 2023-10-12 +categories: + - hello +--- + +# A second post + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec +maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula +erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. +Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris +Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in +sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac +metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. + + + +Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum +massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam +tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet +molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. + +Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. +In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc +pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis +arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. +In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque +tellus id elit ultricies, vel finibus erat cursus. + diff --git a/examples/blog-standalone/mkdocs.yml b/examples/blog-standalone/mkdocs.yml new file mode 100644 index 0000000..ac40da1 --- /dev/null +++ b/examples/blog-standalone/mkdocs.yml @@ -0,0 +1,46 @@ +# Copyright (c) 2016-2023 Martin Donath +# Alex Voss + +# 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. + +# ----------------------------------------------------------------------------- +# Recommended: set up configuration validation, see https://t.ly/xpZXU +# ----------------------------------------------------------------------------- + +# Project information +site_name: Standalone blog example + +# Theme +theme: + name: material + features: + - navigation.tabs + - navigation.indexes + +# Plugins +plugins: + - search + - blog: + blog_dir: demo + +nav: + - Our Blog: + - demo/index.md + - About: + - demo/about/index.md diff --git a/examples/blog-standalone/requirements.txt b/examples/blog-standalone/requirements.txt new file mode 100644 index 0000000..df8b44f --- /dev/null +++ b/examples/blog-standalone/requirements.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2016-2023 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. + +mkdocs-material