Skip to content

Known issue: auto-generated index files for sections can clash on name #64

@FransBouma

Description

@FransBouma

See: #61 for a PR that didn't get merged, but has a discussion about the issue.

See #61 (comment) and #61 (comment) about the details regarding this issue.

This issue can only be solved if it allows docnet to generate documentation which matches the output with the bug, as existing documentation relies on this bug and that can't change as that's too much work. I posted this tool on github for others to use as well, but not with the intention to give myself a lot of extra work (as the tool is used by our own documentation, and fixing this issue causes problems with our massive set of docs which rely on this documentation already as well as external links to the docs) due to changes in this application.

I know this issue is likely not affecting a lot of people but nevertheless it can be something you run into.

To really properly solve this, folders where files are generated in shouldn't be in the docnet.json file with the file description, instead the folders should be defined in the section header, so files in a section inherit the folder. Example of how it is now:

"Quick start guides" :
{
	"From Database to source code": 
	{
		"__index": "qsg\\dfscenario1\\index.md",
		"Create a project" : "qsg\\dfscenario1\\CreateProject.md",
		"Create entities based on a database": "qsg\\dfscenario1\\df_reverseengineer.md",
		"Generate source code":"qsg\\dfscenario1\\generatesourcecode.md"
	},

how it should be:

"Quick start guides" :
{
	"__folder": "qsg",
	"From Database to source code": 
	{
		"__folder": "dfscenario1",
		"__index": "index.md",
		"Create a project" : "CreateProject.md",
		"Create entities based on a database": "df_reverseengineer.md",
		"Generate source code":"generatesourcecode.md"
	},

The files then inherit the path from the container(s) they're in and this won't lead to clashes, as everything has a proper folder: auto-generated index files can be placed in the right folder as the containing container section has a folder (or inherits it from its parent, which then will be the same).

Additionally, "__folder" could be optional, in which case the folder is created from the section name.

This is a format change and behavior change and therefore does require a setting, to make it possible to switch between the behavior (so existing behavior is preserved).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions