Skip to content
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

Remove code duplication with AsciiDoc's Include Directive #73

Open
Tracked by #72
codespearhead opened this issue Mar 27, 2024 · 0 comments
Open
Tracked by #72

Remove code duplication with AsciiDoc's Include Directive #73

codespearhead opened this issue Mar 27, 2024 · 0 comments

Comments

@codespearhead
Copy link

codespearhead commented Mar 27, 2024

As can be seen here, the documentation is duplicated across src/docs/asciidoc and src/docs/asciidoc/v1, which is not only a burden to maintain, but also runs a high risk of them going out of sync, as shown here.

The solution is to create folder src/docs/asciidoc/common and use AsciiDoc's include directive:

An include directive imports content from a separate file or URL into the content of the current document. When the current document is processed, the include directive syntax is replaced by the contents of the include file. Think of the include directive like a file expander. [Source]

/docs
├── common
├── v1
└── v2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant