Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mskian/create-markdown-post

Create Markdown Post for blog and website using Mustache Template System.
https://github.com/mskian/create-markdown-post

express expressjs markdown markdown-editor md mdx mustache mustache-js mustache-templates

Last synced: 10 days ago
JSON representation

Create Markdown Post for blog and website using Mustache Template System.

Awesome Lists containing this project

README

        

# Create Markdown Post

![build-test](https://github.com/mskian/create-markdown-post/workflows/build-test/badge.svg)

Create Markdown Post for blog and website using Mustache Template System.

Don't use this Directly - Fork this repo and Modify according to your Needs also not Recommended for Production use.

## Features

- Express.js for Server and API
- Mustache.JS for Template
- Slugify for Generate SEO Friedly Filename and Slug
- Auto Date Generation
- Handlebar for HTML Template page
- CSRF Token -
- axios HTTP Client for Post data
- HTTP basic auth -
- Bulma CSS Framework
- Express Validator

## Development and usage

- Clone or Download the repo

```sh
git clone https://github.com/mskian/create-markdown-post.git
cd create-markdown-post
yarn
```

- Start the Dev server

```sh
yarn dev
```

- Start the Production Server

```sh
yarn start
```

- Post New Content

```sh
http://localhost:3005/api
```

- Post via API - it Require Basic HTTP Auth - Update password in `config.js` file

```sh
http://localhost:3005/api?title=This%20is%20Example%20Post%20title&description=This%20is%20Example%20Post%20Meta%20Description%20-%20post%20via%20HTTP%20Client%20via%20API.&postcontent=This%20is%20Example%20Post%20Meta%20Description%20-%20post%20via%20HTTP%20Client%20via%20API.&tag=Test
```

- if you want to update HTTP auth username find this line `users: { 'admin':sitedata.password },` in `index.js` - Default username `admin` and password `123456789`

- Post via Javascript Markdown Editor - refer: - Example: `/views/editor.hbs`

```sh
http://localhost:3005/markdown
```

## Modification

- Modify the Post template Content data on `index.js`
- Add storage path, Markdown Extension, Password and Manual URL Slug Generation Name in `config.json`
- if you want add custom slug in Markdown File - `template.md`

```md
---
title: "{{title}}"
date: {{date}}
description: "{{description}}"
tags:
- "{{tag}}"
slug: "{{seo_url}}"
---

{{postcontent}}

```

## Others

- Example Post -
- Modify Template Content data -
- HTTP Username -

## LICENSE

MIT