rpi-hugo Fork of hypriot/rpi-hugo
Raspberry Pi compatible Docker Image with Hugo - a static webpage builder
You need to create a workpace for your project. This workspace is where you can create, start a live server and build your project.
For there features, you need to clone this git. I recommanded you delete the .git directory for make this your own.
git clone -b master https://github.com/WindAFlame/rpi-hugo.git
rm -rf ./.git
The project is based on a configuration file "Makefile.conf".
You need to modify this file for put in your stuff.
By default, we have the following configuration :
- Build a docker image with this name : ew/rpi-hugo.
- Use the following hugo version when the docker image is build : 0.37.1.
- Deploy the live preview on this url http://127.0.0.1:1313/.
Here, you need to put your network address. Without that, your website will not loaded as expected.
- Store your hugo project in $(pwd)/blog.
- Create a docker container with this name : rpi-hugo_blog.
- Can't push your project in a git repository because this data is EMPTY.
Before work on your hugo project. You need to create an image with your hugo version.
By default, this project can create a docker image with the version 0.37.1 of hugo.
make docker-build
Many features are included in my Makefile for use docker.
Your project need to create a hugo project. With the following command, you can start a hugo project.
make
make hugo-themes
or you can take a specific theme like this (Here, we want "hugo-inito" into the directory by default)
make
git submodule add https://github.com/miguelsimoni/hugo-initio.git blog/themes/hugo-initio
Be carefull with this, the project is created in ./blog but if yours was create in /www/blog you need to adapt the git submodule command.
If you want to create a post, you can it with this command.
make hugo-post
Next, you need to go into your hugo project to edit the post in your favorite writer.
make hugo-live
and on your notebook
open http://<ip-of-your-rpi>:<port-defined-in-conf>
make hugo-live-out
make hugo-build
Work in progress
The MIT License (MIT)
Copyright (c) 2015 Hypriot
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.