You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/design/d5.md
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Minimalist Hugo Template for Academic Websites"
3
3
date: 2024-07-16
4
-
lastmod: 2025-04-17
4
+
lastmod: 2025-05-02
5
5
url: /d5/
6
6
author: "Pascal Michaillat"
7
7
description: "This template produces a personal academic website with Hugo. The website has a minimalist design and is hosted on GitHub Pages."
@@ -65,17 +65,13 @@ The design has been customized for academic websites. The first goal was to obta
65
65
66
66
## Usage
67
67
68
-
### Development
68
+
### Local development
69
69
70
-
To check that everything works, experiment with the code, and slowly develop your website, start by rebuilding the website locally. In the terminal, navigate to your website directory and run `hugo server` from there. The command builds the website with Hugo and starts a local web server. The website is then available at http://localhost:1313 in any web browser. Hugo automatically rebuilds the site and refreshes the web page in the browser as changes are made to the files (content, templates) in the repository. This allows you to see changes instantly as you are developing your website.
70
+
To check that everything works, to experiment with the code, and to slowly develop your website, start by rebuilding the website locally. In the terminal, navigate to the website directory via `cd`and run `hugo server` from there. The command builds the website with Hugo and starts a local web server. The website is available at http://localhost:1313 in any web browser. Hugo automatically rebuilds the site and refreshes the webpage in the browser as you change the content and template files in the repository. This allows you to see changes instantly as you are developing the website.
71
71
72
-
### Compilation
72
+
### Online deployment
73
73
74
-
Once your website is ready to be made public, run `hugo` in the terminal from your website directory. This command will convert content files into HTML pages, handles static assets, generates URLs and organizes pages, and finally compile the website into the `public` folder for deployment. The [current version of the website](https://pascalmichaillat.org/hugo-website/) is built with Hugo v0.128.2.
75
-
76
-
### Deployment
77
-
78
-
With GitHub Desktop, you can just commit the changes and push them to the GitHub repository online. Then, GitHub Actions will build the website and deploy it to GitHub Pages. The workflow used by GitHub Actions is in the `hugo.yml` file stored in the `.github/workflows` folder. It usually takes a few minutes for the website to be deployed and go live.
74
+
Once your website is ready to be made public, commit the changes and push them to the GitHub repository online via GitHub Desktop. Then, the GitHub Actions workflow will build the website with Hugo and deploy it to GitHub Pages. The workflow used by GitHub Actions is in the `hugo.yml` file stored in the `.github/workflows` folder. It usually takes a few minutes for the website to be deployed and go live. Using Hugo, the workflow will convert content files into HTML pages, handles static assets, generates URLs and organizes pages, and finally create a static website. The [current version of the website](https://pascalmichaillat.org/hugo-website/) is built with Hugo v0.128.0.
The template is mostly in grayscale. For ease of navigation, however, links are underlined in slate blue. The same blue color is used for the template's favicon, and a lighter shade of slate bluw is used for hovered buttons.
267
+
The template is mostly in grayscale. For ease of navigation, however, links are underlined in slate blue. The same blue color is used for the template's favicon, and a lighter shade of slate blue is used for hovered buttons.
272
268
273
269
It is easy to personalize the color used for links and buttons. The color is specified in the file `assets/css/core/theme-vars.css`. The code snippet specifying the color is:
274
270
@@ -277,7 +273,7 @@ It is easy to personalize the color used for links and buttons. The color is spe
277
273
--lightcolor: #cbd1de;
278
274
```
279
275
280
-
The two shades of blue are specifed by their hex code. Enter [other hex codes](https://www.colorhexa.com/) to modify your website's color scheme. Using the same hex codes, it is easy to produce [a new favicon](https://favicon.io/favicon-generator/) with a different color to match your website's color scheme.
276
+
The two shades of blue are specified by their hex code. Enter [other hex codes](https://www.colorhexa.com/) to modify your website's color scheme. Using the same hex codes, it is easy to produce [a new favicon](https://favicon.io/favicon-generator/) with a different color to match your website's color scheme.
281
277
282
278
---
283
279
@@ -303,7 +299,7 @@ cover:
303
299
304
300
The cover image is `paper1.png`, found in the same folder as the `index.md` file. The image is in PNG format, which is the recommended format for cover images.
305
301
306
-
Cover images should be 1280x720 pixels. This size ensures that the cover image has a 16:9 aspect ratio (recommended for most social media), have a good resolution, while not being too large (100–300 KB is recommended). The image should also have some white padding around, to prevent important material from being cropped out.
302
+
Cover images should be 1280 x 720 pixels. This size ensures that the cover image has a 16:9 aspect ratio (recommended for most social media), have a good resolution, while not being too large (100–300 KB is recommended). The image should also have some white padding around, to prevent important material from being cropped out.
307
303
308
304
To produce good cover images, [Image Magick](https://imagemagick.org) is a great software. It is free and open source and can be obtained on a Mac with Homebrew: `brew install imagemagick`. Once you have installed Image Magick, you can transform any image in PNG format to a cover image of the appropriate size with some padding:
309
305
@@ -400,9 +396,9 @@ This method is useful to manage redirects and ensure a seamless user experience
400
396
401
397
## Public folder
402
398
403
-
The `public` folder contains the fully generated static website files that are ready to be deployed to GitHub Pages. When you run the `hugo` command, Hugo processes your content, templates, and other project files and generates a static website. The resulting output is placed in the `public` folder by default.
399
+
In your local website repository, you will find a `public` folder. The folder is created when you run `hugo server` or `hugo`. The `hugo` commands process your content, templates, and other project files, and create a fully generated static website files that is ready to be deployed locally or online. The resulting output is placed in the `public` folder by default.
404
400
405
-
The `public` folder can always be safely deleted. A new version of the `public` folder will be created when you run the `hugo` command in the terminal.
401
+
The `public` folder is not sent to the GitHub repository (it is in the `.gitignore` file) because it is not needed there. During the GitHub Actions workflow, a fresh `public` folder is generated at build time by Hugo. That folder is then used ephemerally in the GitHub Actions runner. (As a result, there is no `public` folder at all in the GitHub repository.)
0 commit comments