Contents for this website, built with Hugo, a static site generator, and deployed to netlify.com.
This website is based on the HTML5 Editorial template.
- Fork and create a branch on your fork.
- Install
hugo
from package file on GitHub (v0.65.3).- Ubuntu:
hugo_extended_0.65.3_Linux-64bit.deb
(e.g. runwget https://github.com/gohugoio/hugo/releases/download/v0.65.3/hugo_0.65.3_Linux-64bit.deb
) - Windows:
hugo_extended_0.65.3_Windows-64bit.zip
- macOS:
hugo_extended_0.65.3_macOS-64bit.tar.gz
- Ubuntu:
- Run
hugo serve
on this directory while editing. It will autoreload changes onlocalhost:1313
. - Add, commit, push and submit PR. Netlify will create a deploy preview for you on the PR.
- Wait for review.
Use hugo new
! This will autopopulate some fields for you (e.g. date). You need to specify the path to the new document, like:
hugo new projects/my_new_project.md
Notice how the path is relative to /content
. Hugo will guess that you are creating a new page of type project
(because of the parent folder), and use the corresponding template in /archetypes
.
You can use shortcodes along your normal markdown for this. Path is relative to /content
. Notice the {{% %}}
syntax!
{{% content "path/to/page/to/be/inserted.md" %}}
In addition to the default shortcodes, we provide:
{{< xfigure ... >}}
: derived fromfigure
, but using the theme image wrappers for responsiveness. Also accepts animageclass
attribute to define custom fittings:fit
,left
,right
.{{% content ... %}}
: insert a markdown content in another article.{{% person ... %}}
: link to a person profile using their person key (check/data/team/members.yaml
).
Every project is described at /content/projects/project_name.md
. The frontmatter define most of the metadata you need. The markdown content after the frontmatter is free text and can be considered the "abstract" of the project.
Research pages live at /content/research/research_line.md
. They provide overviews of the different research fields of the group, and can embed project pages thanks to the {{% content %}}
shortcode. The content
shortcode will only embed the Markdown text, though! It does provide a link to the project page for more information.
- Welcome:
content/_index.md
- Research:
content/research/_index.md/
. Subitems in the menu are in the corresponding*.md
files. - The team:
content/team/_index.md
(intro text) +data/team/members.yaml
(member info). Almost everything is encoded in the YAML file. Adding more members is a matter of editing the lists. Responsible code for orchestrating the layout is inlayouts/section/team.html
; each individual member is rendered throughlayouts/partials/person.html
. - Publications:
content/publications/_index.md
(intro text) +data/publications/publications.yaml
(database). Read the comments at the top of the YAML file for more info.
Hardcoded in partials/contact.html
Hardcoded in partials/sidebar_footer.html
Where the social icons are listed on the right. This part is hardcoded in partials/topbar.html
.
After creating a new *.md
file in content/
, you can add it to the menu by specifying this metadata in the YAML header:
menu: "main"
If the default ordering is not suitable, it can be overriden with a weight:
weight: 10
Nested submenus must specify the parent too:
menu:
main:
parent: Research
- HTML5 Editorial sample content: Check out content options.
- Hugo shortcodes: Use shortcodes instead of HTML in markdown content. We can create more if needed (check
/layouts/shortcodes
), so let us know if you need something extra.
- You added a new markdown content file
/content/folder/file.md
but the file content does not show up on the website's menu or a section?- Check if the
publishdate
in your file is in the future. If so, you will only be able to see the page when rendering the website usinghugo serve -F
. - Check if
draft: true
. If that's the case, these will only be rendered withhugo serve -D
. Remember to setdraft: false
when the content is ready to be published (or remove that line entirely).
- Check if the