Socket
Socket
Sign inDemoInstall

writr

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

writr

A Simple to Use Markdown Blog


Version published
Weekly downloads
461
decreased by-21.33%
Maintainers
1
Weekly downloads
 
Created
Source

Writr


A Simple to Use Markdown Blog

Build Status GitHub license codecov


Getting Started

1. Install Writr

npm install -g writr

2. Setup your directory (look at /blog_example for how to do this)

blog/*.md           //markdown files in the folder root
blog/images         //images for the blog
blog/config.json    //config file 

3. Run Writr on it with defaults. This will output everything to ./blog_output

writr --path ./blog

4. Express Integration

Then in express map your blog_output via static files:

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

  • -h, --help: Output usage information
  • -p, --path: Path of where the blog, config, and template are located
  • -o, --output: Path of where to output the generated blog
  • -r, --render: What do you want rendered such as html or json (example --render html,json)
  • -t, --template: The template you want to use in the /templates directory
  • -c, --config: Configuration file location if different than 'path'

Templates

There are three templates that are part of every instance of Writr:

  • index: This is the main template that lists all of the latest blogs or what you want to add.
  • post: The post itself and usually supporting items around that such as what is next to look at and tags.
  • tags: Showing articles by tag filtering.

Markdown

To learn more about Markdown go here: https://markdownguide.org

FAQs

Package last updated on 05 Sep 2019

Did you know?

Socket

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.

Install

Related posts

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