https://github.com/scriptype/writ-cms
The timeless SSG + CMS
https://github.com/scriptype/writ-cms
blog-engine cms content-management-system ssg static-site-generator
Last synced: 8 months ago
JSON representation
The timeless SSG + CMS
- Host: GitHub
- URL: https://github.com/scriptype/writ-cms
- Owner: scriptype
- License: gpl-3.0
- Created: 2022-11-09T17:41:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-04-16T00:23:14.000Z (12 months ago)
- Last Synced: 2025-08-11T12:46:48.307Z (8 months ago)
- Topics: blog-engine, cms, content-management-system, ssg, static-site-generator
- Language: JavaScript
- Homepage: https://enes.in/writ-cms
- Size: 3.19 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Writ-CMS
The timeless SSG + CMS, in the making.
[](https://github.com/scriptype/writ-cms/actions/workflows/tests.yml)
[](https://coveralls.io/github/scriptype/writ-cms?branch=master)
## Contents
- [The idea](#the-idea)
- [Example websites](#example-websites)
- [Usage](#usage)
- [Installation](#installation)
- [Manual](#manual)
- [Development](#development)
## The idea
When I'm writing a blog post, I want to deal with the least amount of software complexity.
- I should be able to compose freeform html, rich text and markdown
- I should be able to just use GUI from start to end
- I should be able to organize categories, posts and pages using folders and text files
- I should get automated index pages, pagination, sitemap, rss, search etc. without touching code
- I should be able to easily customize it
- I should be able to use it without remembering much
- And, **everyone** also should be able to do all of those.
## Example websites
- [Writ](https://writ.enes.in) ([source](https://github.com/scriptype/writ))
- [Reads Feed](https://enes.in/feed) ([source](https://github.com/scriptype/feed))
- [Upstairs is boiling](https://upstairsisboiling.com) ([source](https://github.com/upstairsisboiling/upstairsisboiling.github.io))
- [Uç! Uç!](https://ucuc.info) ([source](https://github.com/uc-uc/uc-uc.github.io))
## Usage
### 1) Name your site
```sh
mkdir "All about trees"
cd "All about trees"
```
### 2) Create a post
```sh
echo "Pines are nice" > "Hello world.txt"
```
### 3) Preview and edit
```sh
writ start
```
## Installation
```sh
npm install -g scriptype/writ-cms
```
## Manual
### Entry formats
- Accepted text file extensions: .txt, .md, .markdown, .hbs, .html.
### Categories
1) Create a folder
Folder name can be human readable and it will be used as the display name.
### Posts
Create a new uncategorized post:
1) Create a text file
Create a categorized post:
1) Go to a category folder
2) Create a text file inside the folder
#### Foldered posts
If you need to refer/embed static assets, such as photos or demo iframes, within the post,
the easiest way is to have a folder for everything the post needs, including the post itself.
Create a foldered post:
1) Create a folder
2) Inside the folder, create a text file named "post". e.g post.md, post.txt
Human readable name of the folder will be the post title.
A post file can look like this:
```
My new post starts like this.
And it ends like this.
```
You can also add metadata like this in the beginning of a post file
```
---
type: text
date: 2023-01-05, 01:57
tags: bananas, books
musiclist:
- Your favorite artist - A song
---
My new post starts like this.
And it ends like this.
```
"musiclist" is displayed at the end of the post when it's rendered.
### Subpages
1) Create a folder named "pages"
2) Create a text file inside the folder
#### Foldered subpages
Just like with foldered posts, foldered subpages is the easiest way to manage local assets.
1) Create a folder inside the "pages" directory
2) Inside the folder, create a text file named "page". e.g. page.txt, page.md, page.html
You can use a different folder for pages by adding this to `settings.json`:
```
"pagesDirectory": "my-different-pages-folder"
```
### Static assets
1) Create a folder named "assets"
2) Put any static assets into this folder
You can use a different folder for assets by adding this to `settings.json`:
```
"assetsDirectory": "my-different-assets-folder"
```
## Development
Clone writ-cms by running:
```sh
git clone git@github.com:scriptype/writ-cms.git
```
Then set it up:
```sh
cd writ-cms
npm install
# Sets up the git hooks
npm run hookup
# Recommended for being able to quickly test things in any directory
npm i -g .
```