├── LICENSE ├── README.md ├── cookiecutter.json └── {{cookiecutter.repo_name}} ├── .gitignore ├── LICENSE ├── MANIFEST.in ├── docs └── index.md ├── mkdocs.yml ├── setup.py └── {{cookiecutter.repo_name}} ├── __init__.py ├── base.html ├── css └── theme.css ├── js └── theme.js ├── nav.html └── search.html /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2016, Dougal Matthews. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or 4 | without modification, are permitted provided that the following 5 | conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 15 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 16 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MkDocs Theme Template 2 | 3 | Basic [Cookiecutter](https://cookiecutter.rtfd.org) template for 4 | MkDocs themes. 5 | 6 | # Usage 7 | 8 | Create a new theme with: 9 | 10 | cookiecutter gh:mkdocs/theme-template 11 | -------------------------------------------------------------------------------- /cookiecutter.json: -------------------------------------------------------------------------------- 1 | { 2 | "email": "dougal@dougalmatthews.com", 3 | "full_name": "Dougal Matthews", 4 | "repo_name": "theme_name", 5 | "repo_url": "http://theme-url.com", 6 | "theme_name": "my_mkdocs_theme", 7 | "year": "2016" 8 | } 9 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | dist/ 3 | *.egg-info/ 4 | site/ 5 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © {{cookiecutter.full_name}}, {{cookiecutter.full_name}}. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or 4 | without modification, are permitted provided that the following 5 | conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 15 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 16 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include {{cookiecutter.repo_name}} *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff 2 | recursive-exclude * __pycache__ 3 | recursive-exclude * *.py[co] 4 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/docs/index.md: -------------------------------------------------------------------------------- 1 | # {{cookiecutter.theme_name}} 2 | 3 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: {{cookiecutter.theme_name}} - MkDocs Theme 2 | theme_dir: {{cookiecutter.repo_name}} 3 | 4 | repo_url: {{cookiecutter.repo_url}} 5 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | VERSION = '0.0.1' 4 | 5 | 6 | setup( 7 | name="{{cookiecutter.repo_name}}", 8 | version=VERSION, 9 | url='{{cookiecutter.repo_url}}', 10 | license='BSD', 11 | description='Minimal theme for MkDocs', 12 | author='{{cookiecutter.full_name}}', 13 | author_email='{{cookiecutter.email}}', 14 | packages=find_packages(), 15 | include_package_data=True, 16 | entry_points={ 17 | 'mkdocs.themes': [ 18 | '{{cookiecutter.repo_name}} = {{cookiecutter.repo_name}}', 19 | ] 20 | }, 21 | zip_safe=False 22 | ) 23 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkdocs/theme-template/9ab09300ce1848ce08b4da6e674dee7b977ad320/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/base.html: -------------------------------------------------------------------------------- 1 | {% raw %} 8 | 9 | 10 | 11 | 15 | {% if page_title %}{{ page_title }} - {% endif %}{{ site_name }} 16 | 17 | 21 | {% if favicon %} 22 | 23 | {% else %} 24 | 25 | {% endif %} 26 | 27 | 31 | 32 | 33 | 34 | 35 | 42 | {% for path in extra_css %} 43 | 44 | {% endfor %} 45 | 46 | 51 | 52 | 53 | 60 | {% for path in extra_javascript %} 61 | 62 | {% endfor %} 63 | 64 | 69 | {% if google_analytics %} 70 | 79 | {% endif %} 80 | 81 | {% block extrahead %} 82 | {% endblock %} 83 | 84 | 85 | 86 | 87 |

This is an example theme for MkDocs.

88 | 89 |

90 | It is designed to be read by looking at the theme HTML which is heavily 91 | commented. The easiest way to do that is by 92 | 93 | looking at the source on GitHub.. Otherwise this is just a 94 | demonstration that the theme is fully functional. 95 |

96 | 97 |
98 | 99 |

Documentation Navigation

100 | 101 | 110 | 115 | 116 |
117 | 118 |

Support for search

119 | 125 |
126 |
127 | 128 |
129 |
130 | 131 |
132 | 133 |

Next and previous links

134 | 137 | {% if next_page or previous_page %} 138 |
139 | {% if previous_page %} 140 | ← Previous Page 141 | {% else %} 142 | ← Previous Page 143 | {% endif %} 144 | - 145 | {% if next_page %} 146 | Next Page → 147 | {% else %} 148 | Next Page → 149 | {% endif %} 150 |
151 | {% endif %} 152 | 153 |
154 | 155 |

Link to the source

156 | 159 | {% if repo_url %} 160 | {% if repo_name == 'GitHub' %} 161 | Edit on GitHub 162 | {% elif repo_name == 'Bitbucket' %} 163 | Edit on BitBucket 164 | {% else %} 165 | Edit in Repository 166 | {% endif %} 167 | {% endif %} 168 | 169 |
170 | 171 |

Show the table of contents for the current page

172 | 180 | 181 |
182 | 183 | {% block content %} 184 | {{ content }} 185 | {% endblock %} 186 | 187 |
188 | 189 | Built with MkDocs. 190 | 191 | 195 | 196 | 197 | 198 | {% endraw %} 199 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/css/theme.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 1em; 3 | } 4 | 5 | .active a { 6 | color: red; 7 | font-weight: bold; 8 | } 9 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/js/theme.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This JavaScript doesn't do anything. The file exists just to demonstrate 3 | * including static assets from the HTML in themes. 4 | */ 5 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/nav.html: -------------------------------------------------------------------------------- 1 | {% raw %} 4 | {% if not nav_item.children %} 5 |
  • 6 | {{ nav_item.title }} 7 |
  • 8 | {% else %} 9 |
  • 10 | {{ nav_item.title }} 11 | 16 |
  • 17 | {% endif %} 18 | {% endraw %} 19 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/search.html: -------------------------------------------------------------------------------- 1 | {% raw %} 2 | {% extends "base.html" %} 3 | 4 | {% block extrahead %} 5 | 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 | 11 |

    Search Results

    12 | 13 | 17 | 18 |
    19 | Sorry, page not found. 20 |
    21 | 22 | {% endblock %} 23 | {% endraw %} 24 | --------------------------------------------------------------------------------