-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mrc-ide/initial-site
Initial site
- Loading branch information
Showing
15 changed files
with
263 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Sample workflow for building and deploying a Hugo site to GitHub Pages | ||
# Mostly copied from https://gohugo.io/hosting-and-deployment/hosting-on-github/ | ||
name: Publish Hugo site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- main | ||
- initial-site | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
HUGO_VERSION: 0.134.2 | ||
steps: | ||
- name: Install Hugo CLI | ||
run: | | ||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | ||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | ||
- name: Install Dart Sass | ||
run: sudo snap install dart-sass | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v5 | ||
- name: Install Node.js dependencies | ||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
- name: Build with Hugo | ||
env: | ||
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache | ||
HUGO_ENVIRONMENT: production | ||
TZ: Europe/London | ||
run: | | ||
hugo \ | ||
--gc \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./public | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.hugo_build.lock | ||
/public | ||
/resources | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "themes/beautifulhugo"] | ||
path = themes/beautifulhugo | ||
url = https://github.com/halogenica/beautifulhugo.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# noticeboard | ||
DIDE noticeboard website | ||
# Noticeboard | ||
|
||
This repository defines the content for the DIDE noticeboard website, and publishes the site on GitHub Pages to | ||
https://mrc-ide.github.io/noticeboard/ | ||
|
||
The site is built with [Hugo](https://gohugo.io/), using the [Beautiful Hugo](https://github.com/halogenica/beautifulhugo.git) | ||
theme (referenced as a submodule) | ||
|
||
## Adding content | ||
|
||
All content is written in [Markdown](https://github.com/halogenica/beautifulhugo.git). | ||
|
||
To add a blog post which will automatically appear on the front page, create a new file in the `/content/post` folder, including | ||
title, author and date metadata, as shown in the example "first post" file. | ||
|
||
To add a static page, create a new file in the `/content/page` folder. You can link to your page from other pages, or add it to the | ||
menu defined in `hugo.toml`, either as a top level item, or sub-menu item (by defining its `parent`). Pages can be | ||
organised into subfolders as required. | ||
|
||
Images should be saved to `static/img` | ||
|
||
## Local testing | ||
|
||
To test your content locally: | ||
1. Install hugo, as described [here](https://gohugo.io/installation/). You may find that the default version of hugo available | ||
for your operating system is too old to support the theme (this has been observed for Ubuntu). In this case you will need | ||
to download the [latest package version](https://github.com/gohugoio/hugo/releases/latest) and install from that. | ||
2. Run `hugo server` and browse to http://localhost:1313. Content changes will be automatically built and reflected in the browser. | ||
|
||
## Publishing | ||
|
||
Content will be published automatically to https://mrc-ide.github.io/noticeboard/ on GitHub Pages, by a GitHub Action which runs when new commits are pushed or merged | ||
to the main branch. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
+++ | ||
title = '{{ replace .File.ContentBaseName "-" " " | title }}' | ||
date = {{ .Date }} | ||
draft = true | ||
+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Welcome to the DIDE noticeboard. Here you will find useful information on departmental training, the RESIDE research | ||
software group and help with common technical issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Help | ||
|
||
Check back here for help with common technical issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Reside | ||
|
||
Check back here for information about the Reside research software group. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Training | ||
|
||
Check back here for details of DIDE departmental training. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: New DIDE Noticeboard site! | ||
date: 2024-09-30 | ||
author: Emma Russell | ||
--- | ||
|
||
DIDE Noticeboard in currently a work in progress! Check back for more content soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
baseurl = "https://username.github.io" | ||
DefaultContentLanguage = "en" | ||
title = "DIDE noticeboard" | ||
# Using theme as git submodule | ||
theme = "beautifulhugo" | ||
|
||
pygmentsStyle = "trac" | ||
pygmentsUseClasses = true | ||
pygmentsCodeFences = true | ||
pygmentsCodefencesGuessSyntax = true | ||
#pygmentsUseClassic = true | ||
#pygmentOptions = "linenos=inline" | ||
|
||
[Services] | ||
[Services.Disqus] | ||
# Shortname = "XXX" | ||
[Services.googleAnalytics] | ||
# id = "XXX" | ||
|
||
[Params] | ||
homeTitle = "DIDE Noticeboard" # Set a different text for the header on the home page | ||
subtitle = "" | ||
mainSections = ["post"] | ||
logo = "img/mrc.jpg" # Expecting square dimensions | ||
favicon = "" | ||
dateFormat = "January 2, 2006" | ||
commit = false | ||
rss = false | ||
comments = true | ||
readingTime = true | ||
wordCount = true | ||
useHLJS = true | ||
socialShare = false | ||
delayDisqus = true | ||
showRelatedPosts = true | ||
# cusdisID = "XXX" # Get your App id from cusdis.com | ||
# hideAuthor = true | ||
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic" | ||
# disclaimerText = "The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way." | ||
|
||
#[[Params.bigimg]] | ||
# src = "img/triangle.jpg" | ||
# desc = "Triangle" | ||
#[[Params.bigimg]] | ||
# src = "img/sphere.jpg" | ||
# desc = "Sphere" | ||
# # position: see values of CSS background-position. | ||
# position = "center top" | ||
#[[Params.bigimg]] | ||
# src = "img/hexagon.jpg" | ||
# desc = "Hexagon" | ||
|
||
[Params.author] | ||
# Set only your "username" for default hosts and full URLs otherwise (e.g., "https://MyGitLab.org/username") | ||
name = "MRC GIDA" | ||
website = "https://www.imperial.ac.uk/mrc-global-infectious-disease-analysis/" | ||
github = "mrc-ide" | ||
twitter = "MRC_Outbreak" | ||
|
||
[[menu.main]] | ||
name = "Blog" | ||
url = "" | ||
weight = 1 | ||
|
||
[[menu.main]] | ||
name = "Training" | ||
url = "page/training/" | ||
weight = 2 | ||
|
||
[[menu.main]] | ||
name = "Help" | ||
url = "page/help/" | ||
weight = 3 | ||
|
||
[[menu.main]] | ||
identifier = "reside" | ||
name = "Reside" | ||
weight = 4 | ||
|
||
[[menu.main]] | ||
parent = "reside" | ||
name = "General info" | ||
url = "page/reside/" | ||
weight = 1 | ||
|
||
[[menu.main]] | ||
parent = "reside" | ||
name = "Reside Blog" | ||
url = "https://reside-ic.github.io/" | ||
weight = 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- | ||
If you want to include any custom html just before </body>, put it in this file. | ||
Or you can delete these file if you don't need it. | ||
--> | ||
<!-- for example, you could include some js libraries: | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.js" integrity="sha256-HdIuWBZj4eftihsoDCJoMYjZi6aNVaw7YlUpzKT3ZxI=" crossorigin="anonymous"></script> | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- | ||
If you want to include any custom html just before </head>, put it in this file. | ||
Or you can delete these file if you don't need it. | ||
--> | ||
<!-- for example, you could insert this custom css, which makes the bigimg not stretch: | ||
<style> | ||
.intro-header.big-img, .intro-header.big-img .big-img-transition { | ||
-webkit-background-size: contain !important; | ||
-moz-background-size: contain !important; | ||
background-size: contain !important; | ||
-o-background-size: contain !important; | ||
background-color: lightgrey; | ||
} | ||
</style> | ||
--> | ||
<!-- or you could include some additional css libraries: | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.css" integrity="sha256-I1UoFd33KHIydu88R9owFaQWzwkiZV4hXXug5aYaM28=" crossorigin="anonymous" /> | ||
--> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Submodule beautifulhugo
added at
fd74af