revert v1
[pb.git] / README.md
1 All you really need is just the pb file, the others are there for demonstration purposes, you can just download that file by itself if you don't want the extra garbage.
2
3 This project was inspired by Luke's [lb](https://github.com/LukeSmithxyz/lb). I found it a bit annoying to have to edit the html snippet that gets inserted for new blog posts, so this project abstracts the snippet out as a template file that the user can edit. Of course, that means that this is much more bloated.
4
5 # 'Installation'
6 Before running the script, open it up and change the variables at the top of the file to your liking.
7
8 You need a couple of things to get the script:
9 - A blog index file (a page with a list of all of your posts)
10 - A rolling blog file (a feed of posts will be placed here)
11 - A rss file
12 - A template for each blog entry
13
14 In each of these files, you need to include the comments:
15 ```
16 <!-- BLOG START -->
17 <!-- BLOG END -->
18 ```
19
20 # Usage
21 ### n / new
22 Takes in a name for your blog post, put the name inside quotations if you want to have spaces. Also, only alphanumeric characters, underscores, dashes and spaces are allowed in the blog name (at this point).
23
24 ### p / publish
25 Publishes a draft, which means that it takes the html snippet you wrote and shoves it inside your template file.
26
27 ### d / delete
28 Deletes an already published blog post, this does not delete your draft.
29
30 ### r / refresh (planned)
31 Used when you change the template file and want to keep all blog entries consistent. It deletes all html files and republishes them all.
32
33 # Configuration
34 For more fine tuned configuration, navigate to the data\_dir directory that was created (by default it's blog/) and find the templates folder.
35 These are the html snippets that get included in your index, rolling and rss files.
36 You can use certain keywords that will be substituted in:
37 - {{TITLE}} for the title of the blog post
38 - {{DATE}}
39 - {{URL}} pointing to that post
40 - {{BODY}} the html body of the blog post