Standard Documentation Format #3088
Replies: 2 comments 1 reply
-
Adding link to this PR refactoring the refactor docs with further comments on the standard doc format |
Beta Was this translation helpful? Give feedback.
-
Sorry in advanceI've been thinking about this quite a bit, and I'm still not sure I have my thoughts entirely clear so bare with me through this essay. I genuinely started this thinking I'd just write up a short bit about what I'd been thinking 🥲 tl;dr: regardless of where it is, define truths at a sensible atomic level (in whatever hierarchy you want, being atomic means refactoring is easy using dendron), and use these within a context to ensure consistency and up-to-dateness, but go too far and you end up with absurd (but also strict) scenarios and difficulty when you have to re-combine truths. Setting the sceneI think for me it's not so much specifically about the hierarchy structure for me in either Okay but how does it workOkay so now we have those defined we can take it back to atomicity again, how far can we break something down to it's most singular level. This is relatively easy to follow for truths:
I personally find it harder to follow this breaking down process for a context, because (okay partly by my literal definition of them) they don't have such an atomic nature - the same truth may appear multiple times, or the truth is mixed in with an opinion that makes it harder to truly split these (bringing it slightly back to dendron, the lowest level we can realistically split at is a header, but within a header there may be a mix of context and facts). The other thing about contexts is that there is likely to be overlap between them - a workspace for example is a unique By keeping your truths separate and referencing/embedding them in your context you ensure that you always have the same information regardless of what context it's used in, and that if you need to update it, you only need to do it in one place. How should contexts reference truths?It's important that the context only mentions the whole truth (or even a higher level above the atomic truth) and doesn't try to add context to a sub-part of it (which if you need to, the truth need to be split further to a more atomic level). Take the dog photo example again; narrative in the context might refer to the dog in the photo, or the golden retriever, but shouldn't mention the good boy chasing a squirrel, because the photo might change to a good girl fetching a ball. If the context needs to explicitly reference what the dog is doing, the fact should be split to contain that information i.e.
Let's just recapSo we define the idea of truths and contexts. Truths are split only as atomic as needed for the contexts they are used in, and provide very specific content, often following a standard structure based on the type of truth. Contexts bring together truths and provide narrative around them to help convey the truths to a user, they can reference either the level of or higher level of a fact (e.g. they may talk about all dogs but use an image (truth) of a specific one, or may talk about how to use an API generally but provide a specific example (truth)). If the context needs to reference something of the truth that is not part of the truth's unique definition, then the truth should be further split so that becomes part of it's unique definition. Doing this ensures single source of truth updating, and allows for re-use of truths across multiple contexts, plus contexts can reference other contexts (but truths should not reference truths at the same or a higher level - they can reference lower levels to become a meta-truth). Okay now let's take it too far
I mentioned above that you could split code commands in two different paths, one for the command itself, and the other for the arguments of commands. You could also go further and add flags. Let's use git here as an example. So you might have something like the following
Great, we can now use the same definition of the
We can solve problem 1 by just further atomising, however this might get messy if the same argument name or flag gets lot's of different uses (although that might be bad just in general and highlight an issue?):
Problem number 2 I don't have a solution for, we could go deeper on a hierarchy but it feels like just doing it for the sake of it (or flip the previous approach but this then removes the ease of consolidating all uses of a term...):
It might seem like an extreme example but if you want to ensure that you are consistent with argument names or flags, this would be one way to enforce/identify it, but it isn't very elegant... In general I don't have a solution to this problem. So what does this actually look like?I've been subconsciously treating truths to mean a reference i.e. Downside is if you go quite atomic with the truths if you either end up with a lot of nested embeds (e.g. you reference a command that references arguments), or you have to embed a lot of small things throughout. annndd rest 💤 |
Beta Was this translation helpful? Give feedback.
-
Summary
This leaflet proposes some general guidelines for the Dendron public docs.
Goals:
Non-goals:
NOTE: this note was exported from this note. If certain links don't resolve, check the original note on github
Concepts
For the purposes of this discussion, howtos/reference/discussions/tutorials refer to the four types of documentation
Topic Branch
A topic branch is a feature in Dendron. It is represented using dendron.topic hierarchy
Details
There are two areas that this leaflet addresses.
Overall Structure of Docs
This leaflet proposes the following changes:
Resulting hierarchhy:
NavigationOrganizeStructureRefactoringTransferringdendron.principlesFAQdendron.contributedendron.guidesStructure for Features
All features today are added in the form
dendron.topic.{feature}[.{sub-feature}|{sub-component}]
Sections
These are headers for features and are directly inside
dendron.topic.{feature}
Feature Template (NOTE: link on handbook won't resolve on website, url: https://github.com/dendronhq/dendron-site/blob/dev/vault/templates.topic.md#L9:L9)
Children
These are the children of features and are located in
dendron.topic.{feature}.*
Top Level Feature (NOTE: link on handbook won't resolve on website. url: https://github.com/dendronhq/dendron-site/blob/dev/vault/dendron.contribute.documentation.tutorial.top-level-feature.md#L8:L8)
Structure for References
Summary
This covers the references section of Standard Documentation in more detail.
Concepts
Refs
For the purposes of this note, a ref is anything that fits under
dendron.ref
. Examples:Structure of References
there should be an individual note for each ref
refs should be children ot the corresponding topic branch [^topic]
[[dendron.topic.template.config]]
if a topic branch has subcomponents, then the ref should be the child of the closest matching subcomponent
the config that is the direct child of a topic branch should have the index of all configuration for subcompoents as well as the topic
eg.
dendron.topic.sidebar.config
dendron.ref.config should contain the index of all configuration, grouped by topic
Additional Thoughts
dendron.topic.sidebar.tree-view.config.nav_order
dendron.topic.sidebar.config
,dendron.topic.config
, anddendron.ref.config
as needed[^topic] : Topic Branch
Beta Was this translation helpful? Give feedback.
All reactions