
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@synion/md-docs
Advanced tools
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
Pupeteer requires a chromium browser to operate. By default pupeteer will try to install a chromium browser. Create the folowing environment variables if you want to use your own chrome / chromium browser:
md-docs depends on java to render UML diagrams. Make sure that the java is installed and that the bin folder is added to path environment variable.
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.
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 0 open source maintainers 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.