sc0ttj / mdsh

A simple static site generator, using Markdown and Bash
https://sc0ttj.github.io/mdsh/
10 stars 0 forks source link

Easy publish/unpublish #3

Closed sc0ttj closed 5 years ago

sc0ttj commented 5 years ago

Create a publish script that does something like:

git add .
git commit -m "blah"
git push origin gh-pages

Create an unpublish script that will:

  1. Comment out the post you want to unpublish in posts.csv
  2. then run rebuild to re-build all index pages
  3. run the publish script

    NOTE: requires fixes in various places, so that commented lines are ignored when parsing posts.csv

sc0ttj commented 5 years ago
  1. new post should ask to publish each time it's run:

do commit message "added new post ($post_slug) and re-built site indexes."

  1. rebuild should ask to publish each time is it run.

If -all not given, do commit message "re-built site indexes"

If -all was given, do commit message "re-built all pages"

If -ALL was given, do commit message "re-built all pages from mdsh sources"

sc0ttj commented 5 years ago

publish should not publish any pages which are commented out in posts.csv.

In fact, it should 'unpublish' them - they should not be included categories & tags lists (etc) during rebuilds, and should not appear online.

Reason:

Any posts commented out in posts.csv should be considered "drafts" - not ready to be published, and not to be deleted.

Any posts removed from posts.csv should have their (html, css, etc) files deleted.