Some minor cleanup and comment changes.
Added a page_bottom plugin.
Changed to 2mb.codes.
A single Bash script to create blogs.
Originally created because Carlos Fenollosa wanted a very, very simple way to post entries to a blog by using a public folder on his server, without any special requirements and dependencies. Works on GNU/Linux and possibly OSX and BSD but I do not have these to test my changes. Expanded because I wanted to do writing locally, then post to a server after the fact, and I wanted to extend functionality without bloating the code beyond recognition.
How simple? Just three easy steps.
Check out other BasHTML users
Run bashtml.sh in the directory where you want content created. This can be on the server itself, or your local computer.
./bashtml.sh
This will generate the .config file on the first run. On subsequent executions it will show the available commands.
To create your first post, just run:
./bashtml.sh post
It will try to use Markdown, if installed. To force HTML:
./bashtml.sh post -html
The script will handle the rest.
When you're done, if you edited files on the server, 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! If you created on your computer, you will have to upload the files first.
bashtml.sh
and start blogging.date
, basename
, grep
, sed
, head
, etc)Configuration is not required for a test drive, but if you plan on running your blog with BasHTML, you will want to change the default titles, author names, etc, to match your own.
To customize your configuration edit the .config file generated on the first run of bashtml.sh.
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. Just use the syntax of the generated file as a guide.
BasHTML uses the $EDITOR
environment value to open the text editor.
.backup.tar.gz
)Simply drop your plugins into a directory called plugins. If you want them available system wide, put them in /usr/share/bashtml/plugins. This is a work in progress, so more documentation is coming soon. Until then, check the bashtml.sh code for details. A plugin repository is available at https://git.2mb.codes/~stormdragon2976/bashtml-plugins.
Features
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.