docs: refactor to use mdbook instead of wiki [Work in Progress]#2140
docs: refactor to use mdbook instead of wiki [Work in Progress]#2140madisongh merged 17 commits intoOE4T:masterfrom
Conversation
|
Looking good! I added a doc workflow page, so I could understand how it works - very nice setup: |
|
One thing I typically enforce on my projects is markdown formatting.
Like with code, this helps ensure consistent formatting and minimizes merge hassles. If this sounds OK, I can add this. |
|
@cbrake thanks for the suggestions and changes, please do add whatever you've found useful. |
9bd3334 to
748cae3
Compare
|
I've updated to use the OE4T repo for docs at https://github.com/OE4T/oe4t.github.io as discussed in the meeting, and made changes to the documentation workflow to describe the new setup, also updated the remaining steps above. I'm still struggling with exactly how to move the "Which branch should I use" page and yet keep release notes on branches. We discussed in the last monthly meeting only moving the Which branch should I use page to the master branch but keeping release notes on individual branches.
It seems the ideal workflow would be that when you backport a release from new branch to old branch you can just apply all the commits, including docs commits, to the old branch. That would mean we'll keep multiple copies of the release notes on each branch, and if we update the release notes between backports we need to remember to also backport the release note patches or we'll have one of the copies out of date. This feels like we need either:
Am I overthinking this? |
|
How about we update the "Which branch should I use" page so that it has a link on it to the copy that is generated off the master branch (along with some text to say "click here for the latest version" or some such)? Then we can just do copies for back-ports, the copy of that page would be a snapshot, but there would always be a link to latest available. BTW, I took a quick look at https://oe4t.github.io - looks great! |
After further discussion in [1], move all release notes and the "Which branch should I use" page into the repo instead of the wiki. We'll link all wiki pages to the master branch version of each respective page and keep historical copies in old branches which may be out of date. 1: OE4T#2140 (comment) Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
After further discussion in [1], move all release notes and the "Which branch should I use" page into the repo instead of the wiki. We'll link all wiki pages to the master branch version of each respective page and keep historical copies in old branches which may be out of date. 1: OE4T#2140 (comment) Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
|
OK that direction makes sense to me, essentially we prioritize keeping backports of documentation pain-free at the expense of possibly having out of date and duplicate information on old branches. I think it would not be too difficult to add a warning banner on all pages other than master to state that documentation may be out of date, similar to what openembedded and other projects use. I haven't tried to implement that yet. I did pull in all the release notes, which branch should I use and updated all the content to reflect the latest on the wiki as of today, including some changes for link resolution. I think this is pretty close for both these two branches. When we are ready to pull the trigger on this I think I can replace every wiki page (other than meeting notes and archived) with some text like this:
Should we organize the docs into subdirectories instead of just a flat tree? Might be good for release notes at least. The symlinks back to README and CONTRIBUTING files are a little odd and mean that we can't link to other documentation pages from these easily. Would probably be better to move the main copy into the docs dir and make the symlink exist in the base repo but I'm not sure you want to do that, especially for the README. Let me know if you'd like changes beyond this. I've updated the summary to list the remaining steps. Let me know if you'd like me to do anything different with commit history on the master or scarthgap branches. Otherwise I think those are both ready to go, pending the questions above and comment in the summary of this ticket. I'll backport to all other branches and create PRs for whatever else you want too, just let me know. |
|
Oh one other change I could make could be to try to make the docs github actions only run when the content in the docs directory changed, that might be a good thing to do too. Need to also include README.md and CONTRIBUTING.md files pending the discussion about symlinks above. |
The README.md in the top directory has to remain exactly as it is - the Yocto layer checks expect to see specific content there. Likewise for SECURITY.md. The CONTRIBUTING file can be moved, though. I think the front page of the documentation web site should be more of a general intro to the overall project and a maybe navigation guide for the documentation, rather than what's in the README. We can sort out the details once the overall structure is in place, though. Thanks! |
Result of `mdbook init mdbook` in the docs directory. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Source the "Flashing the Jetson Dev Kit" page as an intial test of mdbook content. Run mdbook serve to serve the book. Add resulting index.html to .gitignore Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Supports building master and scarthgap branch into a combined gh-pages branch. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Based on discussion in monthly meeting, put docs under docs directory and mdbook specific content under mdbook directory. This way browsing the docs directory at a given branch is the same as browsing the mdbook. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
* Add version-dropdown.js file on the left side of the screen, which supports selecting/switching to different documentation branches. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
* copy content from the wiki, unmodified, excluding: * OE4T meeting notes files * Anything archived with ZZZ * Which branch should I use * Home * Jetpack-*Notes * L4T-*otes Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Rewrite links to oe4t wiki as relative links within the same local branch of the docs documentation location. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Changes from initial docs workflow PR at #4 plus: * Add dedicated section for editing tips. * Move serving section to its own heading * gitignore: ignore books dir Created when running `mdbook serve` locally per the instructions here Signed-off-by: Cliff Brake <cbrake@bec-systems.com> Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Use a dedicated documentation repo at https://github.com/OE4T/oe4t.github.io instead of a gh-pages branch in the current repository. Use latest checkout and deploy to avoid deprecation warnings printed during actions steps Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
After further discussion in [1], move all release notes and the "Which branch should I use" page into the repo instead of the wiki. We'll link all wiki pages to the master branch version of each respective page and keep historical copies in old branches which may be out of date. 1: OE4T#2140 (comment) Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
* Add a symlink to the CONTRIBUTING.md so I can link this relative to the branch as well, similar to the README. * Use markdown formatted links in all cases, so links to external sites are correctly implemented in the mdbook. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Remove wiki references, add notes about submitting documentation changes through PR on master branch. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
* Move release notes to the end and remove chapters * Swap order of README and Home page, make Home.md the landing Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Only run workflows on docs/** subdirs, README.md or CONTRIBUTING.md files. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
After further discussion in [1], move all release notes and the "Which branch should I use" page into the repo instead of the wiki. We'll link all wiki pages to the master branch version of each respective page and keep historical copies in old branches which may be out of date. 1: OE4T#2140 (comment) Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
* Add a page to host release notes so we don't clutter up the mdbook with a bunch of individual chapters. * Move the release notes to the release-notes subdir to keep the docs directory more organized. Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
mdbook expects to use the docs/README.md file as the introduction page. To have a different mdbook intro page than the default meta-tegra README we need to make the symlink for the meta-tegra-README something other than docs/README.md. Make the Home.md page the docs/README.md page Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Makes sense, I think as long as I leave one there I may as well leave them both but let me know if you have a different preference.
Also makes sense. mdbook requires the README.md to be the landing page so I've repurposed to match the Home.md file content from the existing wiki as a starting point. Let me know if you have something different in mind. I also reorganized the release notes a bit to try to remove some of the clutter and added the github actions filter to avoid re-running the workflow when there weren't docs changes. What else would you like me to do on this one? Backport as-is to other current branches? Make some additional content changes first? |
I missed this in [1] as it wasn't a .md file but an asciidoc file. Convert from asciidoc to markdown and move this into the repo. 1: OE4T#2140 Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
I missed this in [1] as it wasn't a .md file but an asciidoc file. Convert from asciidoc to markdown and move this into the repo. 1: OE4T#2140 Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
I missed this in [1] as it wasn't a .md file but an asciidoc file. Convert from asciidoc to markdown and move this into the repo. 1: #2140 Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
This PR is not yet ready to merge but creating here as a starting point for discussion and likely place for a discussion in the upcoming meeting
Remaining tasks:
OE4T_GITHUB_DEPLOY_KEY- either get from Dan or Generate yourself.