-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
docs: use mkdocs and mkdocs-material theme for klipper3d.org [WIP] #4512
Conversation
I like it! I think it would be worthwhile to make this change, as it seems like a notable improvement on the docs. Do you know what steps I'd need to make to complete this change? I'd need to change github to use the ghpages branch, do something with CNAME?, and is an api key still needed? I saw a few minor things - all could be fixed after merge:
Thanks for working on this. |
…h mkdocs all markdown files must have a single H1 heading at the top. Signed-off-by: Damien Martin <damlobster@gmail.com> Update CNAME
This changes the framework used to generate the klipper3d site. Signed-off-by: Damien Martin <damlobster@gmail.com>
d72cc8f
to
eb17190
Compare
I also think it is a good improvement over the current documents and I find mkdocs much easier to use than Jekyll/JustTheDocs. Regarding the points you raised:
I tried my best to do a side-by-side comparison of the old klipper3d site with the new one, but I can't guarantee that I've missed out on something. At least if there are still errors, they should be minimal and not fundamentally impact the markdown rendering. The procedure for deploying the site should be quite simple: I updated the PR with www.klipper3d.org in the CNAME file and your google-analytic tag in If you want to try the deployment on klipper3d before merging this PR into master, you can test it in a new branch by updating the
|
- Keeps the markdown inside the code blocks as is - Logs the modified lines (mkdocs serve —verbose) Signed-off-by: Damien Martin <damlobster@gmail.com>
Thanks! I merged this change and made a few minor documentation changes on top. One thing I noticed after merging is that there is a new top-level file mkdocs.yml. Is it possible to move this file to the docs/_klipper3d/ directory (or docs/ )? -Kevin |
Great! I found a solution to move |
Thanks! I applied that change (commit ba16c0f). One other thing - we have a handful of cases where we pointed people to links like - https://www.klipper3d.org/Contact.html , which no longer work. The new link is https://www.klipper3d.org/Contact . Do you know if we can easily restore the old links? -Kevin |
Ah - I found the setting for using -Kevin |
Thanks again - the new site is great! I was thinking of making a change to the "section navigation" - the links on the left of the screen when the browser is in full screen mode. I'm finding the navigation to be a little confusing. It's good to be able to click on "Overview" to go to the Overview.html page, but it's confusing to click on "Device specific documents" and go to the Example_Configs.html link, for example. I'd say about half of the links make sense right now. Maybe removing the "mkdocs-section-index" plugin and simplifying the nav would be an option. Do you have any thoughts on this? -Kevin |
You’re right, some of the links in the navigation are a little bit confusing sometimes. I think there are two options:
The best thing to do is to test it locally. Unfortunately, I don't have my computer with me (I'll be back from vacation around mid-August), but if you don't want to wait, you can test your changes locally with this command:
This works very well and the browser automatically reloads the site when a file is modified. Sometimes there are errors in the console, but it's just a bug with the auto-reload. I hope this helps! Damien |
Yeah - I've been testing changes locally - a really nice benefit of mkdocs. I've been using docker:
I'll continue to play with it. Enjoy your vacation! -Kevin |
FYI, I updated the docs to not use section-index for now (commit bd0185c). -Kevin |
This is an alternative solution to PR #4327.
It uses mkdocs and mkdocs-material theme to render the site visible at klipper3d.org. The site is generated and deployed in the
gh-pages
branch by the github workflowklipper3d-deploy.yaml
.Here is the procedure to test the site locally:
pip install -r docs/_klipper3d/requirements.txt
mkdocs serve --reload
It also visible at: https://damlobster.github.io/klipper/
Note: changes will be needed to deploy it on klipper3d.org (CNAME, workflow)