Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@synion/md-docs
Advanced tools
Readme
md-docs is a cli tool which generates a static website by resolving files recursivly from a source folder.
See the test set for more information.
This script copies every file and directory from the docs directory into the dist directory and transforms every *.md
file into a html file while adding the following features:
*.model.yml
anchor is automatically converted into a model viewer;*.bpmn
anchor is automatically converted into a BPMN.io viewer;*openapi.yaml
anchor is automatically converted into a HTML documentation page;*.feature
anchor is automatically converted into a feature details list;*.dashboard.yaml
anchor is automatically converted into a BDD dashboard;*.user-task.yaml
anchor is automatically converted into a user-interface;*.puml
filer is automatically converted into an SVG image file;*.drawio
file is automatically into an SVG image file;*.java
, *.cs
, *.ts
, *.js
, *.json
, *.py
, *.yml
, *.yml
anchor is automatically converted in a code block;_
is automatically added to the markdown file;All links are relative, so you do not need a web server.
The application is written in node js and implements a plug in architecture. It uses Awilix under the hood for dependency resolving. Plugins can be used by extending App and adding or replacing service registrations.
There are several plugin strategies:
const App = require('md-docs-cli/app');
module.exports = class MyApp extends App {
constructor(options) {
super(options);
}
_getServices(options) {
const services = super(options);
//Option 1
services['newFileParser'] = asClass(NewFileParser).singleton();
services.fileParsers.push('newFileParser');
//Option 2
services['newHtmlParser'] = asClass(NewHtmlParser).singleton();
services.htmlParsers.push('newHtmlParser');
//Option 3
services['newAnchorParser'] = asClass(NewAnchorParser).singleton();
services.anchorParsers.push('newAnchorParser');
//Option 4
services.pageComponent = asClass(MyPageComponent).singleton();
//Option 5
services.pageComponentRenderFn = asValue((data) => '<html />');
return services;
}
}
npm install @biz-dev-ops/md-docs -g
mkdir ../documentation
cd documentation
mkdir docs
echo "# It works!" > docs/index.md
md-docs
google-chrome dist/index.html
md-docs -b
You can override all assets files by adding the same files to docs folder: docs/assets/style/custom-theme.css can then be overwritten by a custom theme implementation.
md-docs -s branch1 branch2
Set the environment to development. All intermediate steps are saved as files in the dist directory.
export NODE_ENV=development
FAQs
Business driven living documentation static site generator.
The npm package @synion/md-docs receives a total of 62 weekly downloads. As such, @synion/md-docs popularity was classified as not popular.
We found that @synion/md-docs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.