-
-
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: switch to the Jekyll JustTheDocs template #4327
Conversation
Interesting. Thanks. I agree the final web pages looks pretty good and the search function is very nice. However, it looks like the automatic page table-of-contents on klipper3d.org (built from javascript) is no longer available (it was rendered to the left of the screen). That would be a notable loss for pages like Config_Reference.md .
Unfortunately, this change is not something I'm comfortable with. Many people use the github rendering of the documentation (eg, https://github.com/damlobster/klipper/blob/docs_site/docs/API_Server.md ) and those links would render very strangely with this change. For a similar reason, I would not wish to add I'm not sure if there is a way to get the new features without having to alter all of the individual Thanks again, |
Thanks Kevin for your feedback.
I totally forgot this one!
Yes, I know it add a table at the beginning of each files. But as the goal is that the github repository is primilarly targeted to developers, I find it's acceptable for this audience.
AFAIK, it's not possible only with Jekyll. The only way I see is to put all the metadata in one file and to setup a github workflow that reads this file, modify the
I reverted the back to the "manual" ToC. |
I found a solution to remove the jekyll metadata from the The code is in another branch: https://github.com/damlobster/klipper/tree/docs_site_with_workflow The site is built, and the files pushed to a Basically it first copy all the The metadata are defined in the file If you prefer this solution and want to update the documentation site, should I close the current PR and open a new one? https://damlobster.github.io/klipper/ is updated with this version |
Thanks Sineos! It should now be better. |
Thanks. As high-level feedback, the new web page looks nice to me. Some comments:
Thanks again, |
Thanks Kevin. 2: yes it's the process. It's required as we have to insert the "front matter" before generating the html with jekyll. But it could also be seen as an advantage because we can see the log of the build process in the case of a problem.
Although the navigation is not essential and use quite a bit of space, I think that it's faster to navigate in the documentation with it than with Overview.md page. 5: I didn't look to how to extract search from the theme. But it would require for sure to deploy the site via github actions because a json index file of all the pages content has to be created (lunr.js is used in the browser to search in this index). I am quite busy for the coming weeks, but I'll try to find better ways of placing the ToCs. |
I updated this PR with the changes done in the docs_site_with_workflow branch and added the following changes:
As before, the publishing is done by the workflow Regarding the extraction of the theme search functionality, I don't think it's worth it. It's deployed there: https://damlobster.github.io/klipper/ Let me know what you think about it. |
Thanks. My high-level feedback is that the new site looks very nice, and I agree it would be an improvement to convert the klipper3d.org site to it. This is a big change to the documentation and I think it would be useful to make some minor changes before merging.
Thanks for working on this. |
00c0379
to
ccb4fe8
Compare
Great! The deployement workflow needs write access to the repository to be able to push the site to the You will also need to change the GitHub Pages source branch from The deployement workflow is executed for all commits in the master branch that modify/add a file in the docs/ folder. I hope that everything will work without any problems! |
Modifies the Jekyll template used to generate the klipper3d.org site. - uses the Just The Docs template - the metadata specifying the navigation tree are centralized in the `_klipper3d/page_metadata.ini` file and are reinserted in the md files by the `_klipper3d/pages_insert_metadata.py` script when deploying the site - the github workflow `klipper3d-deploy.yaml` is responsible for the generation of the site. It is executed when a push modifies a file in `docs/` and it deploys the site to the `gh-pages` branch. Signed-off-by: Damien Martin <damlobster@gmail.com>
I missed a bug that was causing the table of contents of the page not to be displayed. It's fixed... |
@KevinOConnor, I just came across MkDocs and the very good Material theme: https://squidfunk.github.io/mkdocs-material/ It's unfortunate that I didn't saw it before because it supports out of the box everything that I modified (metadata outside markdown files, search + highlight, TOC, ...). To test it locally:
Using this solution would be much simpler, and surely more robust, than using Jekyll+JustTheDocs: it requires only a github workflow, a Many md files will nevertheless need to be modified for search and TOC to work properly: each page must have a single H1 heading at the top containing the page title. But I think that these modifications would not impact negatively the rendering of the docs on github. If you are interested, I can spend some time on this alternative solution. |
Interesting. I don't have any love for Jekyll, so I don't see an issue with using a different rendering tool. If you want to investigate that, we can put the current implementation on hold for a couple of weeks to see what an alternative looks like. Does mkdocs use the same "ghpages" branch trick for github pages? I can't seem to figure out what the ominous Thanks. |
Ok, I think it's worth a try. The name of the branch to which the documents are deployed can be specified in I expect to be able to work on it by mid August. I will make a new PR as soon as I have a first working version. |
I think this PR has been superseded by #4512. -Kevin |
Of course, I close it! |
Modify the documentation site to use the Jekyll template "Just The Docs". In my opinion this improves the usability of the site quite a bit and adds a search in the documentation (not perfect, but still useful). This modification is greatly inspired by the Fluidd documentation site.
I tried to keep the structure of the current site and to make as few changes as possible to the existing files, except for the following points:
The result is visible here: https://damlobster.github.io/klipper/
Signed-off-by: Damien Martin damlobster@gmail.com