-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steps to creating a similar homepage #1996
Comments
This is something I've wanted to add some documentation on, but haven't had the time yet. I'll leave this open as a reminder when there's some time for lower priority stuff 😊 |
Martin, That would be great! I like using mkdocs but one of the setbacks is that it doesnt seem easy to create a homepage that is unlike the other pages. Will be looking forward to it! |
@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
In the front matter of your
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. |
So, in the end, I decided to close this issue, as enough guidance should've been given by #1996 (comment) – it all boils down to using a custom template for a specific page, as noted in the comment, and providing the implementation for this template. |
Thanks for all your feedback here, it was really useful for us too 🙏🏼 💯 👏🏼 As a gesture of gratitude we add our 2 cents:
|
Hello, wow I did not realize there was a reply here! I am following your exact suggestions - but am getting this error: I added both a main.html and home.html to the overrides directory (just copied and pasted from material's site to try to get past this error but no luck). Additionally I added a main.html file in my docs directory as I see alot of other people have done that. I think there are still some missing steps. For example:
Just using squid's home.html and main.html until I get past this error. |
@asriley In my case it still works because I declare that in the
Consider that the I've followed @tmeuze instructions and everything worked as expected. And dont's forget to check this 👇🏼
|
Hi @squidfunk, Love the library! Thanks! I've been able to follow the instructions on this issue, and can successfully implement a home page for my site. Thanks! Even so, I still think that there is value in adding a page to your master docs (like you mentioned here). Just thinking out aloud, it may include some changes such as:
Before I commence working on this, I just wanted to check to see what you think? Thanks! - Chris M |
@chrimaho I'm currently not considering adding demo customizations to the repository. We've started building a new repository with examples, which is where such things should live. It's not ready yet, but it will contain examples for all (?) features from the documentation, which can also include customizations. When ready, we'll also add links from the docs for each feature. |
Sounds like a plan. Thanks! 👍 |
I share the interest in creating a landing / hero unit page, as discussed here. I am uncertain whether your intent to publish a new repo with examples will include this...? On this page, a file often cited is https://github.com/squidfunk/mkdocs-material/blob/master/material/overrides/home.html, but it's gone. That makes me uncertain whether to plow through this to try to get a landing hero. On this page, it appears that the expectation is that to get a landing-hero you need to become a sponsor. Is that correct? |
The source code of the landing page cannot be released due to licensing restrictions. Thus, yes, you would need to become a sponsor if you would want the source code of our own landing page. I'm sorry, but there's no way around this. Other than that, we'll consider providing additional landing page templates in the future. |
FWIW, our old landing page is here ( |
If there's anyone still struggling with this, I made a fairly simple and straightforward template based on the up42-py project (as pointed out in @Guts comment ) that also supports modification via the Project found here: https://github.com/tylerdotrar/mkdocs-coverpage
|
Thanks @tylerdotrar for sharing and making a customizable homepage 👏 |
Let me add my thanks to @tylerdotrar as well. This works fine. but is there a way to have markdown content follow the banner? I see you can add html, but I have quite a lot of md content I want to add... |
@valhuber have you found the answer to this question? I'm using the @tmeuze suggestion, but with So, my
|
with help from squidfunk/mkdocs-material#1996
can't open it. 404 - page not found |
@horizon365 we've redone our home page. The overrides are currently hosted in Insiders. Also see: |
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.
The text was updated successfully, but these errors were encountered: