@madakalab/lightpress
v0.0.3
Published
Static Contents Generator
Downloads
1
Maintainers
Readme
LightPress
Static Contents Generator for Small CMS Site
Instalation
npm i -D @madakalab/lightpress
Display help message
npx lightpress
Make contents
Generates a Markdown file to the config.inputPath.
npx lightpress make <content-type> <title>
content-type
default value: articles
title
default value: Untitled
Examples
npx lightpress make news 2024-01-01 npx lightpress make articles Hello World!
Build datas
Writes an array of data with added id and title to the metadata of a Markdown file to outputPath.
Import this data to create a list page.
npx lightpress build <options>
Options
-html
Writes HTML into the data. This will increase the file size, but allows for easy display of content.
-markdown
Writes markdown data into the data. If you use this option, consider directly importing the markdown file as well.
Configuration
package.json
{
"lightpress": {
"inputPath": "contents",
"outputPath": "src/contents",
"html": true,
"markdown": false,
}
}
Vue example
Import markdown files in the app and parse them to save on data size.
{
"lightpress": {
"inputPath": "src/contents",
"outputPath": "src/contents",
"html": false,
"markdown": false,
}
}