Quickstart
Get started with Docmach in a few simple steps.
Installation
# Install locally
npm i docmach
npx docmach
# Or install globally
npm i docmach -g
docmach
Create a New Project
mkdir my-docs
cd my-docs
Basic Configuration
Add the following to your package.json
file:
"docmach": {
"docs-directory": "./docs",
"build-directory": "./docmach",
"assets-folder": "./assets"
}
Create Your First Document
Create a file called index.md
in your docs directory:
<docmach type="fragment" file="template.html" params="title=My First Docmach Page">
<docmach type="wrapper" replacement="replacement" file="fragments/post-wrapper.html" params="title: post 2;">
<h1>Nice h1 tag</h1>
</docmach>
# Hello Docmach!
This is my first page created with Docmach.
</docmach>
Start the Development Server
docmach
Or just build a single md file
import Docmach from "docmach";
await Docmach(file);
This assumes the file exists in the docs folder.
So, that why you can programmatically use this for a blog engine.
You can write the file to s3 then the docs folder. then call Docmach(file);
Then configure Nginx to sever your build folder.
Visualize the pages in your site.
docmach print
View Your Site
Open your browser and navigate to http://localhost:4000
Next Steps
- Create more Markdown files in your docs directory
- Customize templates in your fragments directory
- Add function templates for dynamic content
- Explore custom themes and Tailwind CSS options