brog [](https://drone.io/github.com/aybabtme/brog/latest)
February 26, 2016 ยท View on GitHub
Static blog app.
Usage
Install brog.
go get github.com/aybabtme/brog
Use brog.
cd your/blog/path
# Creates brog files, required to run the brog
brog init
# Creates a new brog post named my_post.md
brog create my post
# Starts serving the brog at current location.
brog server
Installation
linux
wget -qO- https://github.com/aybabtme/brog/releases/download/0.3/brog_linux.tar.gz | tar xvz
darwin
wget -qO- https://github.com/aybabtme/brog/releases/download/0.3/brog_darwin.tar.gz | tar xvz
Config
Look at the brog_config.json file, it should be pretty clear.
Something you should know
By default, brog will regenerate any harm caused to its vital structure.
That is, when brog server runs, it watches its templates and reload them
at every change.
- If a vital template has been deleted or renamed,
brogwill regenerate the template at its original location. - If a vital template has been modified and
brogfind that it is corrupted (fails to parse),brogwill repeal the threat and rewrite the file with its default version.
You can change this setting in brog_config.json.
Development
You need to have GOPATH properly setup.
Additionally, you need to have $GOPATH/bin in your PATH, because some tools
in the build scripts rely on the use of go tools.
To install brog on your system:
make install
To build brog for the first time (not required if you make install):
make configure
make
To do a normal build:
make
To remove artifacts resulting in a build/run at the root folder of brog:
make clean
Deploying Brog for production
Brog is not too picky about how it is deployed, yet some users have found the following to be helpful.
- Create a system user and group for Brog (brog:brog)
- Install Brog in a standalone location. There is no hard requirement on that, but make sure the location is possessed by the user running Brog
- If using nginx as a reverse proxy to the Brog socket, make sure nginx can access the socket
- Init your Brog and then test it manually
- Deploy the init script, configure it and make sure it works
- Start the service and let it run. You now have a working brog!
License
All of brog proper is MIT licensed. See LICENSE.md.
Some files bundled with brog have their own license. Their licenses can also be found in LICENSE.md. If you do not agree to their terms, feel free to remove the related parts.
highlight.js is copyright (c) 2006, Ivan Sagalaev