I can give you most of a website for useR! events, ready (almost) out of the box. I have a number of sections to help you out:
- Title Page with:
- Overview/ About section supporting Markdown
- Important Dates table
- Twitter feed section
- Organizing and Programming committee bios
- Recent News section, supporting markdown blogging
- Sponsors section
- Social links in the footer
- Pages supporting Markdown for:
- Program
- Participation (ticket registration and paper submission)
- Venue information (with google maps)
- News section with all blog posts
- FAQ
- Contact section with contact form
- Code of Conduct Section
- About
I am a Hugo website, with two themes. Universal provides the base layer of theming, with a custom useR theme which overides some areas of Universal. The folder themes/[theme]/layout/partials/
contain all the .html
needed for the website pages, with the exception of the Markdown, which is saved in /content/
.
This part will be done for you by a member of the RFCC.
-
Log on to the R-conferences GitLab.
-
Create a new repository for the year the site will be for. E.g. https://gitlab.com/R-conferences/user[YEAR].git
-
In a terminal with access to git, navigate to a directory where you will clone the repository.
-
Create a bare clone of the repository.
git clone --bare https://github.com/lockedata/user_hugo_template
-
Mirror-push to the new repository.
cd user_hugo_template.git git push --mirror https://gitlab.com/R-conferences/user[YEAR].git
Note, if you get the error
remote: HTTP Basic: Access denied
you may need to run the following command first
git config --system --unset credential.helper
(if using the Windows command prompt you will need to be running as Administrator).
-
Remove the temporary local repository you created in step 1.
cd .. rm -rf user_hugo_template.git
- Login to Netlify via R-conferences GitLab account.
- Click "New site from Git".
- Select GitLab as the git provider.
- Select the repository created in the previous steps.
- Use the build command
hugo
. - Use the publish directory
public
.
This part should be done by anyone maintaining the website.
- Clone the new repository set up at https://gitlab.com/R-conferences/user[YEAR].git.
If you want to run the site locally to view when you're making changes, you need to initialise the submodules
- Open a terminal with access to git.
- Navigate to the new repo.
- Initialise and fetch the submodules.
git submodule init git submodule update
The file config.toml gives you access to a number of points on the site, mostly using site params.
A high level overview of these features:
enable
- boolean to render or hide that section
title
/subtitle
/description
/button text
/...- strings to display text in that position
bg
- boolean to toggle lightly shaded backgrounds on or off for that section
photo1
/photo2
- toggle between
background-image-fixed-1
/background-image-fixed-2
as a background, which are located instatic/img/
- toggle between
The team bios are constructed from the [[params.programming.members]]
and [[params.organising.members]]
. Most of these fields are optional and can be deleted to prevent them rendering in the site.
The icons can be changed per person with FontAwesome.
The headshots are held in static/img/organising
and static/img/programming
. The 'faceholder' is in /themes/hugo-user-theme/static/img/[organising and programming]
, but you should place yours in the root /static/img/[organising and programming]
, which will mask/override the blanks.
Sponsor images should be held in static/img/sponsors
. The files in /data/sponsors/
control the how and what sponsor image is displayed, and it's location in a folder tier1
, tier2
, and tier3
control where it is on the page.
Is sourced from a csv stored in /csv
.
Markdown files are located in /content
. The News/blog is driven from /content/blog
, and the other pages in the navbar are driven from the files in /content/
. An example of how subpages could be constructed is located in this commit where the shared 'parent' of 2 content.md
are specified in the config.
In the hopefully rare event that even more specific material is needed you can explore the following. Make use of the hugo inheritance method to override defaults where applicable, rather than modify the defaults in place.
- Copy the base
hugo-user-theme/static/css/styledefault.css
into/static/css/style.css
in your root- This will now be the style sheet for your website, overriding the themes
- Either
- find a partial from
/layouts/partials
in the existing themes you want to base your work on, copy it to the project/layouts/partials
, and modify the copy - write a new
myfile.html
from scratch and include it in the project/layouts/partials
- find a partial from
- then make sure that it is referenced in
index.html
The website created for you by the RFCC will be automatically updated when you push your changes to the master branch.