![]() |
11 yıl önce | |
---|---|---|
README.md | 11 yıl önce | |
bb.sh | 11 yıl önce |
A single Bash script to create blogs.
I created it because I wanted a very, very simple way to post entries to a blog by using a public folder on my server, without any special requirements and dependencies. Works on GNU/Linux, OSX and BSD.
You can see it live here: read the initial blog post. My blog has been 100% generated using bashblog, no additional tweaking.
bb.sh
and start blogging.ftpfs
and run this script locallycoreutils
on a Mac)Copy bb.sh into a public folder (for example, $HOME/public_html/blog
) and run
./bb.sh
This will show the available commands. If the file is not executable, you can either chmod +x bb.sh
or run it with bash bb.sh
Before creating your first post, you may want to configure the blog settings (title, author, etc). Read the Configuration section below for more information
To create your first post, just run:
./bb.sh post
When you're done, access the public URL for that folder (e.g. http://server.com/~username/blog
)
and you should see the index file and a new page for that post!
Configuration is not required for a test drive, but if you plan on running your blog with bashblog, you will want to change the default titles, author names, etc, to match your own.
There are two ways to configure the blog strings:
bb.sh
and modify the variables in the global_variables()
function.config
file with your configuration values (useful if you don't want to touch the script)The software will load the values in the script first, then overwrite them with the values in the .config
file.
This means that you don't need to define all variables in the config file, only those which you need to override
from the defaults.
The format of the .config
file is just one variablename="value"
per line, just like in the global_variables()
function. Please remember: quote the values, do not declare a variable with the dollar sign, do not use
spaces around the equal sign.
bashblog uses the $EDITOR
environment value to open the text editor.
./bb.sh post -m
. The third party library must support an invokation
like markdown_bin in.html > out.md
as the code calls it that way..backup.tar.gz
)Read the CHANGELOG section of the script header for more updates