-
Notifications
You must be signed in to change notification settings - Fork 28
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
Doc structure checker #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if it's possible to do the checks without Javascript. I'll also update the how-to-contribute.md
before merging.
} | ||
|
||
if (typeof section.path !== "string") { | ||
throw new Error(`Invalid document structure: 'path' property for section '${key}' must be a string`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the error message can also say that the path should start with docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another checker to make sure that the file path is correct (i.e. try to open corresponding file using given path).
function checkFilePath(filePath) {
try {
fs.accessSync(filePath, fs.constants.F_OK);
return true; // File exists
} catch (error) {
throw new Error(`File "${filePath}" does not exist`);
}
}
Finally turned back to js and make it only runs with github action, cause running js on local env need to add |
Please also try fixing the docs action for the website. I tried to fix it but it still is not completely correct. If we cannot fix it, let's at least make sure it doesn't remove all docs. |
@TimXLHan please fix merge conflicts and this can be merged. |
Conflicts resolved. |
./check.sh
with no errorsIssues
This PR is about omnipaxos documentation structure management.
Breaking Changes
how-to-contribute
.github/scripts
ci.yml