Comparing version 0.2.2 to 0.3.1
{ | ||
"name": "writr", | ||
"version": "0.2.2", | ||
"version": "0.3.1", | ||
"description": "A Markdown Blog for Your Node App", | ||
@@ -13,7 +13,7 @@ "main": "./dist/index", | ||
"clean-all": "clean && rm -rf node_modules", | ||
"clean": "rm -rf ./dist && rm -rf ./out", | ||
"clean": "rm -rf ./dist && rm -rf ./blog_output", | ||
"compile": "yarn clean && tsc -p .", | ||
"build": "yarn test && yarn compile", | ||
"test": "yarn nyc mocha", | ||
"test-output": "yarn compile && node ./dist/index.js -c ./test/blog/config.json -o ./out --json", | ||
"test-output": "yarn compile && node ./dist/index.js -p ./blog_example", | ||
"coverage": "nyc report --reporter=json && codecov -f coverage/*.json -t 62b3983c-08a1-425f-99b9-71e84fef74bc" | ||
@@ -20,0 +20,0 @@ }, |
@@ -12,36 +12,19 @@ ![Writr](logo.png) | ||
> npm install writr | ||
> npm install -g writr | ||
or | ||
## Setup your directory (look at /blog_example for how to do this) | ||
> yarn add writr | ||
* Setup your content in a directory like so: | ||
``` | ||
blog/... << Articles go here>> | ||
blog/images... << Images and other content that you link to go here>> | ||
blog/*.md //markdown files in the folder root | ||
blog/images //images for the blog | ||
blog/config.json //config file | ||
``` | ||
We will default to the `blog/` folder unless you configure the custom path in the configuration. | ||
* Create your Markdown Documents with the following `Meta Header` example. | ||
```yaml | ||
--- | ||
title: 'Docula: Persistent Links and Styles!' | ||
tags: | ||
- Github | ||
- Open Source | ||
- Docula | ||
date: 2017-03-07 19:49:09 | ||
featured_image: Docula_%20Persistent%20Links%20and%20Styles%201.jpeg | ||
--- | ||
``` | ||
## Run Writr on it with defaults | ||
## CLI | ||
> writr --path ./blog | ||
> writr -c blog/writr.config -o ./blog_output | ||
## This will output everything to ./blog_output | ||
## CLI with JSON (data.json) Output | ||
> writr -c blog/writr.config -o ./blog_output --json | ||
## Express Integration | ||
@@ -52,10 +35,15 @@ | ||
```javascript | ||
app.use("/blog/*/images", express.static(path.join(__dirname, "blog/images"))) | ||
app.use("/blog/images", express.static(path.join(__dirname, "blog/images"))) | ||
app.use("/blog/*/images", express.static(path.join(__dirname, "blog_output/images"))) | ||
app.use("/blog/images", express.static(path.join(__dirname, "blog_output/images"))) | ||
app.use("/blog", express.static(path.join(__dirname, "blog_output"))) | ||
``` | ||
## CLI | ||
``` | ||
> writr -p ./blog -o ./blog_output | ||
## CLI with JSON (data.json) Output | ||
> writr -p ./blog -o ./blog_output --json | ||
### Markdown | ||
@@ -62,0 +50,0 @@ To learn more about Markdown go here: https://markdownguide.org |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
4459
3
0
56
2