1
0
Fork 0
Elpengu website source dir
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Stefan 58136a0cf9
Removed warning message
1 year ago
archetypes Initial website commit 1 year ago
content Added warning message 1 year ago
layouts Removed warning message 1 year ago
resources/_gen/assets/scss/scss Added warning message 1 year ago
script I hate cloudflare 1 year ago
static Added warning message 1 year ago
themes/hello-friend-ng Added warning message 1 year ago
.gitignore Added a script to simplify the process of creating blog posts 1 year ago
.hugo_build.lock Initial website commit 1 year ago
LICENSE Added license, finished webring 1 year ago
README.md Modified pull link destination 1 year ago
config.toml Changed index look, added new archetype 1 year ago

README.md

ElPengu website

ElPengu is a site about software freedom. Created in 2021, this site aims to promote the benefits of software freedom to as many people as possible, in a layout that reminds of the old web days, but at the same time provides modern features and design. This website is also used as a homepage for the many privacy-friendly instances hosted on my server. ElPengu uses no javascript, trackers or ads and is statically generated using Hugo.

Hugo

This website is built with Hugo. If you don't have already make sure to install it.

  • Arch Linux
$ sudo pacman -S hugo
  • Debian
$ sudo apt install hugo
  • Default
$ sudo go install github.com/gohugoio/hugo@latest

How to build

First, pull the root directory to your filesystem:

$ git pull https://git.elpengu.com/stefan911/elpengu.git
$ cd elpengu/

Using hugo, this site can be easily built using:

$ hugo

All static files are then put in the public/ directory, found in the project's source root directory.

ElPengu's site script

The blog script can be found in ./script/blog. To start using this script simply symlink it to a directory present in your $PATH.

$ ln -s $(realpath script/blog) $HOME/.local/bin

Usage:

  • Create or edit a new blog post
$ blog edit <post_name>
  • Delte a post (move it to ./.trash/)
$ blog remove <post_name>
  • Publish site
$ blog publish

Editing the script

You might want to edit the script to modify some variables, such as the editor the file is opened in or to integrate the sync-elpengu additional script into its source.

Deploying

Deploying can be either done by copying all files from public/ after build to a server, or by using the elpengu site script.

If you want to use the blog publish functionality, you must create a new script in the ~/.local/bin directory, with the name sync-elpengu. This script is not published on github to preserver personal information.

  1. Install rsync

Rsync should already come installed on your server. You need to have rsync installed on both your machine and your server.

# Arch Linux
$ sudo pacman -S rsync
# Debian
$ sudo apt install rsync
  1. Edit the ~/.local/bin/sync-elpengu file
# Use your favourite text editor
$ vim ~/.local/bin/sync-elpengu
  1. Paste and edit the following into the file:
#!/bin/sh
rsync -avW $1 SSH_USERNAME@YOUR_SERVER_HOST:/PATH_TO_YOUR_WEBPAGE_ROOTDIR --delete
  1. Replace variables with your specific server information and save the file.

Example:

#!/bin/sh
rsync -avW $1 root@example.com:/var/www/site --delete
  1. When done, add execute permissions.
$ chmod +x ~/.local/bin/sync-elpengu
  1. Now you can easily deploy your site using
$ blog publish

! ! ! Rsync permissions

Your site directory must have read and write permissions for the user you are logging in with. To ensure this, simply change your site directory's owner to the user you are ssh logging in with.

$ chown your_user /path/to/dir

License

This project is licensed under AGPL-3.0. For more information about licensing, please see the LICENSE file.