DOCX
Visual Studio Code extension that facilitate access to your documentations
Demo •
Installation •
Configuration •
Access token •
Usage •
Features •
Other
Demo
Installation
Visit the extension's page on the Visual Studio Code Marketplace.
Configuration (manual)
Create a .docx.json
file at the root of the project.
{
"ignorePatterns": ["node_modules", ".git", "dist"],
"associations": {
"file/or/folder": ["path/to/your/documentation.md"],
"file/or/folder/2": [
"path/to/your/documentation.md"
"github/or/gitlab/url/to/your/documentation.md",
]
}
}
Examples:
Local documentations
Github documentations
Gitlab documentations
Website documentations
Configuration (automatic)
Generate your .docx.json
automatically based on the project.
- Open the command palette in Visual Studio Code:
Ctrl+Shift+P (Windows/Linux) or
Command+Shift+P (Mac)
Remove unused associations :
- Open the command palette in Visual Studio Code:
Ctrl+Shift+P (Windows/Linux) or
Command+Shift+P (Mac)
How to add your access token
Access tokens are indispensable for private repositories.
We highly suggest adding your access token if you use public repositories to avoid API restrictions :
Provider |
Without token |
With token |
Github |
50 requests/h |
5000 requests/h |
Gitlab |
500 requests/min |
1500 requests/min |
Step 1: Create your access token by visiting the following links: Github, Gitlab
Step 2: Open the command palette in Visual Studio Code:
Ctrl+Shift+P (Windows/Linux) or Command+Shift+P (Mac)
Step 3: Type the appropriate command based on your provider:
Usage
Example project architecture:
.
├── .docx.json
├── myFile.ts
└── myDoc.md
.docx.json
:
{
"associations": {
"myFile.ts": ["myDoc.md"]
}
}
Open a file linked to a documentation, e.g., "myFile.ts." and click on the button "doc" in the top right corner of the screen.
Choose the documentation you're interested in from the list.
Enjoy your documentation.
Features
- [x] Ability to link a file or folder to one or multiple documentations.
- [x] Support for local documentation.
- [x] Support for documentation in a public or private repository (access token needed)
- [x] Support for documentation as website.
- [ ] Support workspace
License
Distributed under the MIT License. See LICENSE
for more information.
Other
Note: The extension will add the following configuration to your Visual Studio Code user settings.json
:
"json.schemas": [
{
"fileMatch": [
"/.docx.json"
],
"url": "https://raw.githubusercontent.com/Mehdi-Verfaillie/docx/main/src/config/.docx.schema.json"
}
]
This configuration ensures that Visual Studio Code recognizes the .docx.json
file format and provides schema support.