-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[docs] Import local files in vuepress documentation #7929
Comments
I would be interested in supporting the project, and would be happy to help on this issue. |
@jwhitt3r sure, that would be great! Let us know here if you have any questions. |
Hey @jwhitt3r, We'd like to get this worked on. Are you still interested in taking it on? Otherwise we can assign to someone on our team. |
I think using local paths might be problematic. Consider the situation where a developer updates a file, adding ten new lines of code before the line where an example in the documentation starts. The example will display the same line range regardless of the update and the example will no longer be accurate. Each code update would require cross-referencing the documentation to make sure the code update does not cause unintended alterations to examples in the documentation. |
Hay sorry @clevinson I don't think I can commit to the project. Apologies for the late reply! |
@ryanchristo yeah good point. Maybe let's just close this issue then? The current way of doing things is fine. |
Sounds good. Closing for now. |
Summary
We use
+++
in md files to import code snippets from github.com, we should prefer<<<
with relative pathsProblem Definition
To include a code snippet in the docs, we use
+++
with a remote github hash, e.g.:+++
is a flavored Markdown syntax to import & display code blocks.There's no need to import code blocks from a specific tag, each doc should point to local code.
Proposal
I didn't manage to display local docs in vuepress with
+++
, also didn't find any official documentation on+++
.Vuepress does allow importing local code snippets with
<<<
: https://v1.vuepress.vuejs.org/guide/markdown.html#import-code-snippets. Note: this feature is still in beta.The proposal is to switch all docs to use
<<<
with local refs.For Admin Use
The text was updated successfully, but these errors were encountered: