Posts from the Hugo category

Gitlab CI for Hugo

I have been playing around with a private Gitlab server. My goal was to automatically build and deploy my hugo site for my private web server. After looking around in the internet for similar solutions, I came up with the following solution for .gitlab-ci.yml

stages:
  - build
  - deploy

build:
  stage: build
  image: registry.gitlab.com/pages/hugo/hugo_extended:latest
  script:
  - hugo
  artifacts:
    paths:
    - public
  only:
  - master

# deploy with ftp following instructions from https://www.savjee.be/2019/04/gitlab-ci-deploy-to-ftp-with-lftp/
deploy:
  stage: deploy
  image: alpine
  before_script:
    - apk update
    - apk add lftp
  script:
    # Sync to FTP
    - lftp -c "set ftp:ssl-allow no; open ftp.ssl-login.nl; user $FTP_USERNAME $FTP_PASSWORD; mirror -X .* -X .*/ --reverse --verbose --delete public/ public_html/"

I use gitlab’s hugo_extended image because I use SASS for my stylesheet and this needs to be converted automatically. I then use an alpine image and add lftp to be able to upload the converted files to my web server.

read more

Etxean.net goes Hugo

I was looking for a good CMS to revive our personal website. Drupal would seem logical since I am one of the maintainers of the website of the ice skating club IJCE and we built that site in Drupal 8. But Drupal is quite complex and we don’t need that for a simple site with blog-like stories.

Because Drupal is overkill, the previous site was built with Bolt CMS. That was a reasonable choice, because it is a lot easier to maintain than Drupal. But still, the whole CMS system was taking up a lot of space on our small webserver, so I was reconsidering my choice. I wanted an even simpler system that still gave me a lot of flexibility.

read more