Steps to creating a similar homepage
See original GitHub issueHello,
Firstly thank you all for the contributions! This theme really is amazing and elegant!
I have been trying to follow the code here: https://github.com/squidfunk/mkdocs-material/blob/master/material/base.html for creating my own homepage on my material themed mkdocs site. However, the auto-generated nature of the base.html, index.html and home.html leave me wondering if I can actually do this after a few failed attempts now.
I have used these sources: https://www.mkdocs.org/user-guide/styling-your-docs/ and https://squidfunk.github.io/mkdocs-material/customization/.
However, neither source (nor them together) actually really inform me about how to extend my current index.md file to be something like this: https://squidfunk.github.io/mkdocs-material/.
I can find nothing about this on youtube or within search engines. Just not sure what steps to take to create my own index.md as a nice templated homepage…
Misc Info:
Mkdocs version: mkdocs, version 1.1.2 from /usr/local/lib/python3.8/site-packages/mkdocs (Python 3.8)
My project is hosted on bitbucket and not github.
I am not a web developer.
Any help will be appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:8 (3 by maintainers)
Top GitHub Comments
@asriley This is the file you are looking for: overrides/home.html. You’ll want to copy it over to your own overrides directory. Make sure you’ve set your
custom_dir
inmkdocs.yml
:In the front matter of your
index.md
, you need to specify the template to use:One important thing that took me a while to realize: you need a newline at the end of your md file. If you don’t have one, the content will not display. I guess it’s processed as having null content if you don’t include the newline.
You can also have a look to others website like UP42:
Source: https://github.com/up42/up42-py
Ping @Arnaud-UP42 and @chrieke.