ODA #107: Create snippet files for single-sourcing repetitive instructions#505
Conversation
slyon
left a comment
There was a problem hiding this comment.
Thank you very much for your contribution to Netplan!
This is a really nice cleanup, breaking up the big how-to guides into smaller snippets! (CC @ilvipero) I can confirm the rendered output looks identical. Also, all the CI tests are green, so you're local make spelling / make woke issues are fine; some of it got fixed just recently, upstream (e.g. #499).
Some remarks:
- suggestion (non-blocking): I like the new
reuse/directory that you introduced, this builds a nice structure. We might consider renaming it toinclude/, which is commonly used in code. @rkratky is there any convention around this in docs? For now, we don't need any additional sub-directory for "configure-vm", IMO, sharing a common prefix should be good for now (we might want to change that in the future, once the number of includes grows substantially). - note (non-blocking): Some of the includes are very small (heading + one line). But this way we're able to reuse most of it, so that's fine.
- question: why did you choose to use a
.txtsuffix. Those are still markdown snippets after all, shouldn't they end in.md?
Overall, this is looking very good already. I'd like to see a comment about the .txt vs .md, though. And wait for +1 from @rkratky
For whatever reason,
I was going to comment on this, too. There's a fine line between efficient single-sourcing and hard-decipher source files. That said, I'm fine with it as it is.
There was a reason for this, but I can't remember what it was :D Something to do with Sphinx, though my memory is really hazy. I'm asking around the docs group. If it turns out it's not a propblem (i.e. having |
|
Hey @rkratky & @slyon! Here's some context for the points above:
Let me know if you need me to make any changes. |
|
OK, the reason for |
This is for improved Markdown code highlighting. Also, update the conf.py to ignore/exclude reuse/*.md files.
slyon
left a comment
There was a problem hiding this comment.
Thanks for your input @nielsenjared and @rkratky !
I've pushed a commit to move reuse/*.txt to .md files. Other than that, I'm fine with it as-is (keep using reuse/ as used in the starter-pack & having a small prerequisites snippet).
LGTM.
…tions (#505) * add prereq snippet * add disable netfilter snippet * add check networking delete default snippet * add create bridge network snippet * add system prereq snippet * doc: move reuse/*.txt to .md files This is for improved Markdown code highlighting. Also, update the conf.py to ignore/exclude reuse/*.md files.
Description
This PR refers to canonical/open-documentation-academy#107 via @rkratky
It creates reusable snippets for the following docs pages:
Each snippet corresponds to a section of the page, demarcated by heading. Rather than add comments, I used descriptive file names for the snippets. I established a naming convention for the
reusedirectory by prepending each.txtfile withconfigure-vm, which could also be a subdirectory. Let me know if you would like me to make any changes.Checklist
make checksuccessfully.make check-coverage).I didn't run the above checks, but I did run the following per the documentation contribution guide:
make spelling: returned errors for preexisting words (such as NIC, InterVLAN, netfilter, unconfigured, autostart, etc.)make linkcheck: build succeededmake woke: returned Error 1 on.gitignore