question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Steps to creating a similar homepage

See original GitHub issue

Hello,

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:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
tmeuzecommented, Oct 28, 2020

@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 in mkdocs.yml:

theme:
  custom_dir: docs/overrides
...

In the front matter of your index.md, you need to specify the template to use:

---
title: Title
template: home.html
---

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.

11reactions
Gutscommented, Nov 1, 2020

You can also have a look to others website like UP42:

image

Source: https://github.com/up42/up42-py

Ping @Arnaud-UP42 and @chrieke.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 simple steps to the web design process in 2023 - Webflow
Find out how following a structured website design process can help you deliver more successful websites faster and more efficiently.
Read more >
10 Key Steps To Building A Great Small Business Website
1. Obtain a good domain name · 2. Purchase secure, scalable website hosting with good tech support · 3. Prominently display a clear...
Read more >
How to Create a Website in 9 Simple Steps - QuickSprout
1. Choosing a domain is one of the most important decisions you can make for your site. 2. A website needs just two...
Read more >
Build and manage your website - Business Queensland
Step 1: Get a domain name and URL · Step 2: Set up an email address to match your domain name · Step...
Read more >
What Are the Different Ways to Build a Website? - DreamHost
1. Use a Website Builder · 2. Opt for a Content Management System (CMS) · 3. Do It Yourself with HTML and CSS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found