Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

writr

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

writr - npm Package Compare versions

Comparing version 0.2.2 to 0.3.1

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc