My personal web page. https://alfredgg.dev
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
Alfred 8bc7bfcfca Update 9 місяці тому
content Add member section 1 рік тому
themes/personal Update 9 місяці тому
.gitignore first commit 3 роки тому
README.md Update 9 місяці тому
config.cat.toml first commit 3 роки тому
config.toml Update 9 місяці тому
fabfile.py Add more basic info 1 рік тому

README.md

Personal Web Page

This is the new version of my personal web page. It mainly is a Hugo template with some tricks to adapt it to my personal requirements.

You can easily download and modify it, for that you just need Hugo Static Generator installed (my current version is v0.50) and follow its pipeline to locally build the page.

I added a Fabric file to perform the deploy to my server. It allows to easily use Hugo commands with some additions:

  • clean will erase the public folder.
  • serve will serve locally the webpage using all the .toml files located into the root folder, except production.toml. In case you want to use production.toml you should launch it as fab serve:production=yes.
  • build will only build the webpage on the public, also using all the .toml files located into the root folder.
  • publish will upload all the files to the server.
  • deploy will perform clean, build, and publish actions.

You can add a production.tomlfile to the root folder. It will be taken into account when build the webpage and you can set some variables on that to add some extra information to the generated code:

[ Params ]
    extraHeadContent = """
		< To add new information into the head tag of the main page >
    """

[ Params.contact ]
  form_url = " < To set the end-point url to send the contact form >"

How to upgrade this code?

rm -Rf public
hugo --config config.cat.toml,config.toml,production.toml

To update styles you will need the sass tool. Go to the path: /themes/personal/static/styles/scss and execute:

sass --watch main.scss:../stylesheet.cs

How to deploy this code?

First, generate the end-files:

hugo --config config.cat.toml,config.toml,production.toml

Then, copy them to your server replacing the old ones. An example:

rsync -r ./public/ --exclude=.DS_Store --exclude=.sass_cache --delete --no-perms -c {host}:/srv/data/nginx/webpage