fix: add support for Hugo v0.55

Requires Hugo v0.55.2+.
Does not work with Hugo v0.55.0 due to bugs fixed in v0.55.2.

Fix #1017
This commit is contained in:
George Cushen 2019-04-17 19:26:51 +01:00
commit 585bdf643b
43 changed files with 218 additions and 255 deletions

View file

@ -74,22 +74,20 @@ You can choose from one of the following four methods to install:
* One-click install of Academic creates an `academic-kickstart` repository in your GitHub or GitLab account
* Netlify will provide you with a customizable URL to access your new site, [or get your own domain](https://sourcethemes.com/academic/docs/domain/)
* Shortly after editing content in your repository, your site will automatically update
* Optionally, use [Git](https://git-scm.com/downloads) to clone your new repository to your computer for offline editing
* Optionally, to edit your site in a [Markdown editor](https://www.typora.io) on your computer, perform the steps in the [*Install with Git*](#install-with-git) section below
### Install with Git
Prerequisites:
* [Download and install Git](https://git-scm.com/downloads)
* [Download and install Hugo v0.53](https://gohugo.io/getting-started/installing/#quick-install)
* [Download and install Hugo v0.55.2+](https://gohugo.io/getting-started/installing/#quick-install)
Install:
1. [Fork](https://github.com/sourcethemes/academic-kickstart#fork-destination-box) the *Academic Kickstart* repository and clone your fork with Git:
1. [Fork](https://github.com/sourcethemes/academic-kickstart#fork-destination-box) the *Academic Kickstart* repository and clone your fork with Git, replacing `sourcethemes` with your GitHub username (unless you wish to clone without forking):
git clone https://github.com/sourcethemes/academic-kickstart.git My_Website
*Note that if you forked Academic Kickstart, the above command should be edited to clone your fork, i.e. replace `sourcethemes` with your GitHub username.*
2. Initialize the theme:
@ -100,7 +98,7 @@ Install:
Prerequisites:
* [Download and install Hugo v0.53](https://gohugo.io/getting-started/installing/#quick-install)
* [Download and install Hugo v0.55.2+](https://gohugo.io/getting-started/installing/#quick-install)
Install:

View file

@ -40,7 +40,6 @@ paginate = 10 # Number of items per page in paginated lists.
enableEmoji = true
footnotereturnlinkcontents = "<sup>^</sup>"
ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
preserveTaxonomyNames = true
[outputs]
home = [ "HTML", "CSS", "RSS", "JSON" ]

View file

@ -1,16 +1,16 @@
+++
title = "Academic: the website designer for Hugo"
title = "Academic: the website builder for Hugo"
subtitle = "Create a beautifully simple website in under 10 minutes :rocket:"
date = 2016-04-20T00:00:00
lastmod = 2018-01-13T00:00:00
draft = false
date = 2016-04-20T00:00:00 # Schedule a publish date
lastmod = 2019-04-17T00:00:00 # Date last modified
draft = false # Display this post? (true/false)
# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
authors = ["admin"]
tags = ["Academic"]
summary = "Create a beautifully simple website or blog in under 10 minutes."
summary = "Create a beautifully simple website in under 10 minutes."
# Projects (optional).
# Associate this post with one or more of your projects.
@ -76,10 +76,12 @@ image = "theme-cupcake.png"
caption = "Cupcake"
+++
**Academic** makes it easy to create a beautiful website for free using Markdown. Customize anything on your site with widgets, themes, and language packs.
**Create a free website with Academic using Markdown, Jupyter, or RStudio. Choose a beautiful color theme and build anything with the Page Builder - over 40 _widgets_, _themes_, and _language packs_ included!**
Follow our easy [step by step guide](https://sourcethemes.com/academic/docs/install/) to learn how to build your own free website with Academic. [Check out the personal demo](https://academic-demo.netlify.com/) or the [business demo](https://sourcethemes.com/academic/) of what you'll get in less than 10 minutes.
[Check out the latest **demo**](https://academic-demo.netlify.com/) of what you'll get in less than 10 minutes, or [view the **showcase**](https://sourcethemes.com/academic/#expo) of personal, project, and business sites.
- [**Setup Academic**](#install)
- [**Get Started**](https://sourcethemes.com/academic/docs/get-started/)
- [View the documentation](https://sourcethemes.com/academic/docs/)
- [Ask a question](http://discuss.gohugo.io/)
- [Request a feature or report a bug](https://github.com/gcushen/hugo-academic/issues)
@ -92,19 +94,29 @@ Follow our easy [step by step guide](https://sourcethemes.com/academic/docs/inst
[![Screenshot](https://raw.githubusercontent.com/gcushen/hugo-academic/master/academic.png)](https://github.com/gcushen/hugo-academic/)
Key features:
**Key features:**
- Easily manage various content including homepage, blog posts, publications, talks, and projects
- Extensible via **color themes** and **widgets/plugins**
- Write in [Markdown](https://sourcethemes.com/academic/docs/writing-markdown-latex/) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
- Social/academic network linking, [Google Analytics](https://analytics.google.com), and [Disqus](https://disqus.com) comments
- Responsive and mobile friendly
- Simple and refreshing one page design
- Multilingual and easy to customize
- **Page builder** - Create *anything* with [**widgets**](https://sourcethemes.com/academic/docs/page-builder/) and [**elements**](https://sourcethemes.com/academic/docs/writing-markdown-latex/)
- **Edit any type of content** - Blog posts, publications, talks, slides, projects, and more!
- **Create content** in [**Markdown**](https://sourcethemes.com/academic/docs/writing-markdown-latex/), [**Jupyter**](https://sourcethemes.com/academic/docs/jupyter/), or [**RStudio**](https://sourcethemes.com/academic/docs/install/#install-with-rstudio)
- **Plugin System** - Fully customizable [**color** and **font themes**](https://sourcethemes.com/academic/themes/)
- **Display Code and Math** - Code highlighting and [LaTeX math](https://en.wikibooks.org/wiki/LaTeX/Mathematics) supported
- **Integrations** - [Google Analytics](https://analytics.google.com), [Disqus commenting](https://disqus.com), Maps, Contact Forms, and more!
- **Beautiful Site** - Simple and refreshing one page design
- **Industry-Leading SEO** - Help get your website found on search engines and social media
- **Media Galleries** - Display your images and videos with captions in a customizable gallery
- **Mobile Friendly** - Look amazing on every screen with a mobile friendly version of your site
- **Multi-language** - 15+ language packs including English, 中文, and Português
- **Multi-user** - Each author gets their own profile page
- **Privacy Pack** - Assists with GDPR
- **Stand Out** - Bring your site to life with animation, parallax backgrounds, and scroll effects
- **One-Click Deployment** - No servers. No databases. Only files.
## Color Themes
Academic is available in different color themes and font themes.
Academic comes with **day (light) and night (dark) mode** built-in. Click the sun/moon icon in the top right of the [Demo](https://academic-demo.netlify.com/) to see it in action!
Choose a stunning color and font theme for your site. Themes are fully customizable and include:
{{< gallery >}}
@ -117,76 +129,18 @@ Academic is available in different color themes and font themes.
You can choose from one of the following four methods to install:
* one-click install using your web browser (recommended)
* install on your computer using Git with the Command Prompt/Terminal app
* install on your computer by downloading the ZIP files
* install on your computer with RStudio
* [**one-click install using your web browser (recommended)**](https://sourcethemes.com/academic/docs/install/#install-with-web-browser)
* [install on your computer using **Git** with the Command Prompt/Terminal app](https://sourcethemes.com/academic/docs/install/#install-with-git)
* [install on your computer by downloading the **ZIP files**](https://sourcethemes.com/academic/docs/install/#install-with-zip)
* [install on your computer with **RStudio**](https://sourcethemes.com/academic/docs/install/#install-with-rstudio)
### Quick install using your web browser
1. [Install Academic with Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/sourcethemes/academic-kickstart)
* Netlify will provide you with a customizable URL to access your new site
2. On GitHub, go to your newly created `academic-kickstart` repository and edit `config.toml` to personalize your site. Shortly after saving the file, your site will automatically update
3. Read the [Quick Start Guide](https://sourcethemes.com/academic/docs/) to learn how to add Markdown content. For inspiration, refer to the [Markdown content](https://github.com/gcushen/hugo-academic/tree/master/exampleSite) which powers the [Demo](https://academic-demo.netlify.com/)
### Install with Git
Prerequisites:
* [Download and install Git](https://git-scm.com/downloads)
* [Download and install Hugo](https://gohugo.io/getting-started/installing/#quick-install)
1. [Fork](https://github.com/sourcethemes/academic-kickstart#fork-destination-box) the *Academic Kickstart* repository and clone your fork with Git:
git clone https://github.com/sourcethemes/academic-kickstart.git My_Website
*Note that if you forked Academic Kickstart, the above command should be edited to clone your fork, i.e. replace `sourcethemes` with your GitHub username.*
2. Initialize the theme:
cd My_Website
git submodule update --init --recursive
### Install with ZIP
1. [Download](https://github.com/sourcethemes/academic-kickstart/archive/master.zip) and extract *Academic Kickstart*
2. [Download](https://github.com/gcushen/hugo-academic/archive/master.zip) and extract the *Academic theme* to the `themes/academic/` folder from the above step
### Install with RStudio
[View the guide to installing Academic with RStudio](https://sourcethemes.com/academic/docs/install/#install-with-rstudio)
## Quick start
1. If you installed on your computer, view your new website by running the following command:
hugo server
Now visit [localhost:1313](http://localhost:1313) and your new Academic powered website will appear. Otherwise, if using Netlify, they will provide you with your URL.
2. Read the [Quick Start Guide](https://sourcethemes.com/academic/docs/) to learn how to add Markdown content, customize your site, and deploy it. For inspiration, refer to the [Markdown content](https://github.com/gcushen/hugo-academic/tree/master/exampleSite) which powers the [Demo](https://academic-demo.netlify.com/)
3. Build your site by running the `hugo` command. Then [host it for free using Github Pages](https://georgecushen.com/create-your-website-with-hugo/) or Netlify (refer to the first installation method). Alternatively, copy the generated `public/` directory (by FTP, Rsync, etc.) to your production web server (such as a university's hosting service).
Then [personalize and deploy your new site](https://sourcethemes.com/academic/docs/get-started/).
## Updating
Feel free to *star* the project on [Github](https://github.com/gcushen/hugo-academic/) to help keep track of updates and check out the [release notes](https://sourcethemes.com/academic/updates) prior to updating your site.
[View the Update Guide](https://sourcethemes.com/academic/docs/update/).
Before updating the framework, it is recommended to make a backup of your entire website directory (or at least your `themes/academic` directory) and record your current version number.
By default, Academic is installed as a Git submodule which can be updated by running the following command:
```bash
git submodule update --remote --merge
```
[Check out the update guide](https://sourcethemes.com/academic/docs/update/) for full instructions and alternative methods.
## Feedback & Contributing
Please use the [issue tracker](https://github.com/gcushen/hugo-academic/issues) to let me know about any bugs or feature requests, or alternatively make a pull request.
For support, head over to the [Hugo discussion forum](http://discuss.gohugo.io).
Feel free to *star* the project on [Github](https://github.com/gcushen/hugo-academic/) to help keep track of [updates](https://sourcethemes.com/academic/updates).
## License

View file

@ -77,7 +77,7 @@ Click on the **Slides** button above to view the built-in slides feature.
Slides can be added in a few ways:
- **Create** slides using Academic's *Slides* feature and link using `url_slides` parameter in the front matter of the talk file
- **Create** slides using Academic's [*Slides*](https://sourcethemes.com/academic/docs/managing-content/#create-slides) feature and link using `slides` parameter in the front matter of the talk file
- **Upload** an existing slide deck to `static/` and link using `url_slides` parameter in the front matter of the talk file
- **Embed** your slides (e.g. Google Slides) or presentation video on this page using [shortcodes](https://sourcethemes.com/academic/docs/writing-markdown-latex/).

View file

@ -2,7 +2,7 @@
{{ partial "navbar.html" . }}
{{/* Just display author name as title if user profile unavailable. */}}
{{ if not ($.Site.GetPage (printf "/author/%s" (urlize .Title))) }}
{{ if not (site.GetPage (printf "/author/%s" (urlize .Title))) }}
<div class="universal-wrapper pt-3">
<h1 itemprop="name">{{ .Title }}</h1>
</div>
@ -13,7 +13,7 @@
{{/* Only show About widget if a profile has been configured for this user. */}}
{{ $widget := "widgets/about.html" }}
{{ $params := dict "root" $ "page" . "author" .Title }}
{{ with $.Site.GetPage (printf "/author/%s" (urlize .Title)) }}
{{ with site.GetPage (printf "/author/%s" (urlize .Title)) }}
{{ partial $widget $params }}
{{ end }}

View file

@ -12,7 +12,7 @@
{{ $paginator := .Paginate .Data.Pages }}
{{ range $k, $v := $paginator.Pages }}
{{ $person_page_path := (printf "/author/%s" (urlize $v.Title)) }}
{{ $person_page := $.Site.GetPage $person_page_path }}
{{ $person_page := site.GetPage $person_page_path }}
{{ $name := "" }}
{{ if $person_page }}
{{ $person := $person_page.Params }}

View file

@ -1,5 +1,5 @@
{{- $scr := .Scratch -}}
{{- $scr.Set "site" $.Site -}}
{{- $scr.Set "site" site -}}
{{- partial "css/parse_theme.css" . -}}

View file

@ -1,4 +1,4 @@
{{ if not (isset $.Site.Params "color_theme") }}
{{ if not (isset site.Params "color_theme") }}
{{ errorf "Please complete the installation of Academic by following the steps at https://sourcethemes.com/academic/docs/install/" }}
{{ end }}
{{ partial "widget_page.html" . }}

View file

@ -4,7 +4,7 @@
{{- /* Add the index page of docs separately since it's not in RegularPages above. */ -}}
{{- $pages := $pages | union (where (where .Site.Pages "Kind" "section") "Type" "docs") -}}
{{- /* Add author pages to index so their bios can be searched. Hide empty `/author/` node. */ -}}
{{- $pages := $pages | union (where (where $.Site.Pages "Section" "author") "Params.name" "!=" nil) -}}
{{- $pages := $pages | union (where (where site.Pages "Section" "author") "Params.name" "!=" nil) -}}
{{- range $pages -}}
{{- /* Do not index drafts or private pages. */ -}}
@ -29,7 +29,7 @@
{{- if eq .Section "author" -}}
{{- $title = .Params.name -}}
{{- $dir := path.Base (path.Split .Path).Dir -}}
{{- with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) -}}
{{- with site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) -}}
{{- $permalink = .Permalink -}}
{{- $rel_permalink = .RelPermalink -}}
{{- end -}}
@ -41,7 +41,7 @@
{{- $authors = slice -}}
{{- range $k, $v := .Params.authors -}}
{{- $person_page_path := (printf "/author/%s" (urlize $v)) -}}
{{- $person_page := $.Site.GetPage $person_page_path -}}
{{- $person_page := site.GetPage $person_page_path -}}
{{- if $person_page -}}
{{- $person := $person_page.Params -}}
{{- $authors = $authors | append $person.name -}}
@ -54,7 +54,7 @@
{{- end -}}
{{- /* Add page to index. */ -}}
{{- $index = $index | append (dict "objectID" .UniqueID "date" .Date.UTC.Unix "publishdate" .PublishDate "lastmod" .Lastmod.UTC.Unix "expirydate" .ExpiryDate.UTC.Unix "lang" .Lang "permalink" $permalink "relpermalink" $rel_permalink "title" $title "summary" (plainify $desc) "content" .Plain "authors" $authors "kind" .Kind "type" .Type "section" .Section "tags" .Params.Tags "categories" .Params.Categories) -}}
{{- $index = $index | append (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "publishdate" .PublishDate "lastmod" .Lastmod.UTC.Unix "expirydate" .ExpiryDate.UTC.Unix "lang" .Lang "permalink" $permalink "relpermalink" $rel_permalink "title" $title "summary" (plainify $desc) "content" .Plain "authors" $authors "kind" .Kind "type" .Type "section" .Section "tags" .Params.Tags "categories" .Params.Categories) -}}
{{- end -}}
{{- end -}}

View file

@ -39,7 +39,7 @@
</div>
<div class="body-footer">
{{ i18n "last_updated" }} {{ $.Lastmod.Format $.Site.Params.date_format }}
{{ i18n "last_updated" }} {{ $.Lastmod.Format site.Params.date_format }}
</div>
</article>

View file

@ -10,14 +10,14 @@
<span><i class="fas fa-bars"></i></span>
</button>
{{ if eq $.Site.Params.search.engine 1 }}
{{ if eq site.Params.search.engine 1 }}
<input name="q" type="search" class="form-control" id="search-query" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
{{ end }}
</form>
<nav class="collapse docs-links" id="docs-nav">
{{ with (index .Site.Menus $menu_name) }}
{{ range (index $.Site.Menus $menu_name).ByWeight }}
{{ range (index site.Menus $menu_name).ByWeight }}
<div class="docs-toc-item{{ if $current_page.IsMenuCurrent $menu_name . }} active{{ end }}">
<a class="docs-toc-link" {{ if .URL }}href="{{ .URL }}"{{else if .HasChildren }}href="{{ (index .Children 0).URL }}"{{end}}>{{ .Name }}</a>

View file

@ -42,8 +42,8 @@
{{ end }}
{{/* Comments JS. */}}
{{ $comments_enabled := and $.Site.DisqusShortname (not (or $.Site.Params.disable_comments $.Params.disable_comments)) }}
{{ if and $comments_enabled ($.Site.Params.comment_count | default true) }}
{{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments $.Params.disable_comments)) }}
{{ if and $comments_enabled (site.Params.comment_count | default true) }}
<script id="dsq-count-scr" src="//{{ .Site.DisqusShortname }}.disqus.com/count.js" async></script>
{{ end }}
@ -78,7 +78,7 @@
</script>
{{ end }}
{{ if eq $.Site.Params.search.engine 1 }}
{{ if eq site.Params.search.engine 1 }}
{{/* Fuse search result template. */}}
<script id="search-hit-fuse-template" type="text/x-template">
<div class="search-hit" id="summary-{{"{{key}}"}}">
@ -91,7 +91,7 @@
</div>
</div>
</script>
{{ else if eq $.Site.Params.search.engine 2 }}
{{ else if eq site.Params.search.engine 2 }}
{{/* Algolia search result template. */}}
<script id="search-hit-algolia-template" type="text/html">
<div class="search-hit">
@ -135,7 +135,7 @@
{{ $js_bundle := slice }}
{{ if eq .Site.Params.search.engine 1 }}
{{ $js_bundle = slice $js_academic $js_academic_search }}
{{ else if eq $.Site.Params.search.engine 2 }}
{{ else if eq site.Params.search.engine 2 }}
{{ $js_bundle = slice $js_academic $js_algolia_search }}
{{ else }}
{{ $js_bundle = slice $js_academic }}

View file

@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Source Themes Academic {{ .Site.Data.academic.version }}">
{{ .Hugo.Generator }}
{{ $scr := .Scratch }}
@ -14,7 +13,7 @@
{{ $superuser_name := "" }}
{{ $superuser_username := "" }}
{{ $superuser_role := "" }}
{{ range first 1 (where (where $.Site.Pages "Section" "author") "Params.superuser" true) }}
{{ range first 1 (where (where site.Pages "Section" "author") "Params.superuser" true) }}
{{ $superuser_name = .Params.name }}
{{ $superuser_username = delimit (last 1 (split (substr .File.Dir 0 -1) "/")) "" }}
{{ $superuser_role = .Params.role }}
@ -133,9 +132,9 @@
{{ end }}
{{ end }}
{{ if or .Site.RSSLink .RSSLink }}
<link rel="alternate" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="feed" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
{{ with .OutputFormats.Get "RSS" }}
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
<link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
{{ end }}
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}">
@ -154,7 +153,7 @@
{{ else if .Site.Params.sharing_image }}
{{ $og_image = printf "img/%s" .Site.Params.sharing_image | absURL }}
{{ else if .Site.Params.avatar }}
{{ $og_image = (printf "img/%s" $.Site.Params.avatar) | absURL }}
{{ $og_image = (printf "img/%s" site.Params.avatar) | absURL }}
{{ $twitter_card = "summary" }}
{{ else }}
{{ $og_image = "img/icon-192.png" | absURL }}

View file

@ -37,11 +37,11 @@
{{ end }}
<span itemprop="startDate">
{{ $date := $item.Date }}
{{ (time $date).Format $.Site.Params.date_format }}
{{ (time $date).Format site.Params.date_format }}
{{ if not $item.Params.all_day }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
{{ with $item.Params.date_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
&mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
{{ end }}
{{ end }}
</span>

View file

@ -2,7 +2,7 @@
<i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
{{/* APA Style */}}
{{ if eq ($.Site.Params.publications.citation_style | default "apa") "apa" }}
{{ if eq (site.Params.publications.citation_style | default "apa") "apa" }}
<span itemprop="author" class="article-metadata li-cite-author">
{{ partial "page_metadata_authors" . }}

View file

@ -46,11 +46,11 @@
<div>
<span itemprop="startDate">
{{ $date := $item.Date }}
{{ (time $date).Format $.Site.Params.date_format }}
{{ (time $date).Format site.Params.date_format }}
{{ if not $item.Params.all_day }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
{{ with $item.Params.date_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
&mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
{{ end }}
{{ end }}
</span>

View file

@ -26,11 +26,11 @@
<div class="article-metadata">
<span itemprop="startDate">
{{ $date := $item.Date }}
{{ (time $date).Format $.Site.Params.date_format }}
{{ (time $date).Format site.Params.date_format }}
{{ if not $item.Params.all_day }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
{{ with $item.Params.date_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
&mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
{{ end }}
{{ end }}
</span>

View file

@ -15,12 +15,12 @@
{{ end }}
{{ $person_page_path := (printf "/author/%s" $author_urlize) }}
{{ $person_page := $.Site.GetPage $person_page_path }}
{{ $person_page := site.GetPage $person_page_path }}
{{ with $person_page }}
{{ $link := printf "/authors/%s" $author_urlize | relURL }}
{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
<div class="media author-card" itemscope itemtype="http://schema.org/Person">
{{ if and $.Site.Params.gravatar .Params.email }}
{{ if and site.Params.gravatar .Params.email }}
<img class="portrait mr-3" src="https://s.gravatar.com/avatar/{{ md5 .Params.email }}?s=200')" itemprop="image" alt="Avatar">
{{ else if $avatar }}
{{ $avatar_image := $avatar.Fill "250x250 Center" }}

View file

@ -1,10 +1,10 @@
{{ $is_list := .is_list }}
{{ $ := .content }}
{{ $page := .page }}
{{ $link := "" }}
{{/* ***** TODO: Deprecate `url_preprint` in favour of `url_pdf` given there's now a dedicated "Preprint" pub. type. ***** */}}
{{ with $.Params.url_preprint }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_preprint }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -15,12 +15,12 @@
</a>
{{ end }}
{{ $pdf := "" }}
{{ $resource := $.Resources.GetMatch (printf "%s.pdf" $.File.ContentBaseName) }}
{{ $resource := $page.Resources.GetMatch (printf "%s.pdf" $page.File.ContentBaseName) }}
{{ with $resource }}
{{ $pdf = .RelPermalink }}
{{ else }}
{{ if $.Params.url_pdf }}
{{ $pdf = $.Params.url_pdf | relURL }}
{{ if $page.Params.url_pdf }}
{{ $pdf = $page.Params.url_pdf | relURL }}
{{ end }}
{{ end }}
@ -29,15 +29,15 @@
{{ i18n "btn_pdf" }}
</a>
{{ end }}
{{ $resource := $.Resources.GetMatch "*.bib" }}
{{ $resource := $page.Resources.GetMatch "*.bib" }}
{{ with $resource }}
<button type="button" class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}} js-cite-modal"
data-filename="{{ .RelPermalink }}">
{{ i18n "btn_cite" }}
</button>
{{ end }}
{{ with $.Params.url_code }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_code }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -47,8 +47,8 @@
{{ i18n "btn_code" }}
</a>
{{ end }}
{{ with $.Params.url_dataset }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_dataset }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -58,25 +58,25 @@
{{ i18n "btn_dataset" }}
</a>
{{ end }}
{{ if $.Params.projects }}
{{ range $.Params.projects }}
{{ with ($.Site.GetPage (printf "project/%s" .)) }}
{{ if $page.Params.projects }}
{{ range $page.Params.projects }}
{{ with (site.GetPage (printf "project/%s" .)) }}
<a class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}}" href="{{ .RelPermalink }}">
{{ i18n "btn_project" }}
</a>
{{ else }}
{{/* errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $.File.Path . */}}
{{/* errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $page.File.Path . */}}
{{ end }}
{{ end }}
{{ else }}
{{ with $.Params.url_project }}
{{ with $page.Params.url_project }}
<a class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}}" href="{{ . }}" target="_blank" rel="noopener">
{{ i18n "btn_project" }}
</a>
{{ end }}
{{ end }}
{{ with $.Params.url_poster }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_poster }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -86,15 +86,15 @@
{{ i18n "btn_poster" }}
</a>
{{ end }}
{{ if $.Params.slides }}
{{ with ($.Site.GetPage (printf "slides/%s" $.Params.slides)) }}
{{ if $page.Params.slides }}
{{ with (site.GetPage (printf "slides/%s" $page.Params.slides)) }}
<a class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}}" href="{{ .RelPermalink }}" target="_blank">
{{ i18n "btn_slides" }}
</a>
{{ end }}
{{ else }}
{{ with $.Params.url_slides }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_slides }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -105,8 +105,8 @@
</a>
{{ end }}
{{ end }}
{{ with $.Params.url_video }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_video }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -116,8 +116,8 @@
{{ i18n "btn_video" }}
</a>
{{ end }}
{{ with $.Params.url_source }}
{{ $resource := $.Resources.GetMatch . }}
{{ with $page.Params.url_source }}
{{ $resource := $page.Resources.GetMatch . }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}
@ -127,12 +127,12 @@
{{ i18n "btn_source" }}
</a>
{{ end }}
{{ with $.Params.doi }}
{{ with $page.Params.doi }}
<a class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}}" href="https://doi.org/{{ . }}" target="_blank" rel="noopener">
DOI
</a>
{{ end }}
{{ range $.Params.links }}
{{ range $page.Params.links }}
{{ $pack := or .icon_pack "fas" }}
{{ $pack_prefix := $pack }}
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
@ -142,7 +142,7 @@
{{ $scheme := (urls.Parse $link).Scheme }}
{{ $target := "" }}
{{ if not $scheme }}
{{ $resource := $.Resources.GetMatch .url }}
{{ $resource := $page.Resources.GetMatch .url }}
{{ if $resource }}
{{ $link = $resource.RelPermalink }}
{{ else }}

View file

@ -1,19 +1,20 @@
{{/* Div wrapper around page links. */}}
{{/* The wrapper is hidden when the page has no link buttons. */}}
{{ $page := . }}
{{ $pdf_link := false }}
{{ $cite_link := false }}
{{ $slug := "" }}
{{ if eq $.File.TranslationBaseName "index" }}{{/* Check if using dir-based page bundles. */}}
{{ $slug = delimit (last 1 (split (substr $.Dir 0 -1) "/")) "" }}
{{ if eq $page.File.TranslationBaseName "index" }}{{/* Check if using dir-based page bundles. */}}
{{ $slug = delimit (last 1 (split (substr $page.File.Dir 0 -1) "/")) "" }}
{{ end }}
{{ $resource := $.Resources.GetMatch (printf "%s.pdf" $slug) }}
{{ $resource := $page.Resources.GetMatch (printf "%s.pdf" $slug) }}
{{ with $resource }}
{{ $pdf_link = true }}
{{ end }}
{{ $resource := $.Resources.GetMatch "*.bib" }}
{{ $resource := $page.Resources.GetMatch "*.bib" }}
{{ with $resource }}
{{ $cite_link = true }}
{{ end }}
@ -23,6 +24,6 @@
{{ with .Params.external_link }}
<a class="btn btn-outline-primary my-1" href="{{ . }}" target="_blank" rel="noopener">{{ i18n "open_project_site" }}</a>
{{ end }}
{{ partial "page_links" (dict "content" . "is_list" 0) }}
{{ partial "page_links" (dict "page" $page "is_list" 0) }}
</div>
{{ end }}

View file

@ -19,9 +19,9 @@
{{ if not (in (slice "talk" "page") $.Type) }}
<span class="article-date">
{{ $date := $.Lastmod.Format $.Site.Params.date_format }}
{{ $date := $.Lastmod.Format site.Params.date_format }}
{{ if eq $.Type "publication" }}
{{ $date = $.Date.Format ($.Site.Params.publications.date_format | default "January, 2006") }}
{{ $date = $.Date.Format (site.Params.publications.date_format | default "January, 2006") }}
{{ else }}
{{ if ne $.Params.Lastmod $.Params.Date }}
{{ i18n "last_updated" }}
@ -42,15 +42,15 @@
</span>
{{ end }}
{{ if and (eq $.Type "post") (not (or (eq $.Site.Params.reading_time false) (eq $.Params.reading_time false))) }}
{{ if and (eq $.Type "post") (not (or (eq site.Params.reading_time false) (eq $.Params.reading_time false))) }}
<span class="middot-divider"></span>
<span class="article-reading-time">
{{ $.ReadingTime }} {{ i18n "minute_read" }}
</span>
{{ end }}
{{ $comments_enabled := and $.Site.DisqusShortname (not (or $.Site.Params.disable_comments (eq $.Params.comments false))) }}
{{ if and $comments_enabled ($.Site.Params.comment_count | default true) }}
{{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments (eq $.Params.comments false))) }}
{{ if and $comments_enabled (site.Params.comment_count | default true) }}
<span class="middot-divider"></span>
<a href="{{ $.RelPermalink }}#disqus_thread"><!-- Count will be inserted here --></a>
{{ end}}
@ -62,7 +62,7 @@
<span class="article-categories">
<i class="fas fa-folder"></i>
{{ range $k, $v := $.Params.categories }}
<a href="{{ ($.Site.GetPage (printf "categories/%s" .)).RelPermalink }}">{{ . }}</a>
<a href="{{ (site.GetPage (printf "categories/%s" .)).RelPermalink }}">{{ . }}</a>
{{- if lt $k (sub $categoriesLen 1) -}}, {{ end }}
{{ end }}
</span>

View file

@ -5,10 +5,10 @@
{{ range $k, $v := $.Params.authors -}}
<span itemscope itemprop="author" itemtype="http://schema.org/Person">
<span itemprop="name">
{{ $link := ($.Site.GetPage (printf "/authors/%s" $v)).RelPermalink }}
{{ $link := (site.GetPage (printf "/authors/%s" (urlize $v))).RelPermalink }}
{{ $person_page_path := (printf "/author/%s" (urlize $v)) }}
{{ $person_page := $.Site.GetPage $person_page_path }}
{{ $person_page := site.GetPage $person_page_path }}
{{ if $person_page }}
{{ $person := $person_page.Params }}
{{- printf "<a href=\"%s\">%s</a>" $link $person.name | safeHTML -}}

View file

@ -2,10 +2,10 @@
<nav>
<ul class="pagination justify-content-center">
{{ if .Paginator.HasPrev }}
<li class="page-item"><a class="page-link" href="{{ .Paginator.Prev.URL }}">&laquo;</a></li>
<li class="page-item"><a class="page-link" href="{{ .Paginator.Prev.RelPermalink }}">&laquo;</a></li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="page-item"><a class="page-link" href="{{ .Paginator.Next.URL }}">&raquo;</a></li>
<li class="page-item"><a class="page-link" href="{{ .Paginator.Next.RelPermalink }}">&raquo;</a></li>
{{ end }}
</ul>
</nav>

View file

@ -12,7 +12,7 @@
</div>
<div id="search-box">
{{ if eq $.Site.Params.search.engine 1 }}
{{ if eq site.Params.search.engine 1 }}
<input name="q" id="search-query" placeholder="{{i18n "search_placeholder"}}" autocapitalize="off"
autocomplete="off" autocorrect="off" role="textbox" spellcheck="false" type="search">
{{ else }}

View file

@ -3,7 +3,7 @@
{{ if gt $tagsLen 0 }}
<div class="article-tags">
{{ range $k, $v := $.Params.tags }}
<a class="badge badge-light" href="{{ ($.Site.GetPage (printf "tags/%s" .)).RelPermalink }}">{{ . }}</a>
<a class="badge badge-light" href="{{ (site.GetPage (printf "tags/%s" .)).RelPermalink }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}

View file

@ -9,7 +9,7 @@
{{end}}
{{ $person_page_path := (printf "/author/%s" (urlize $author)) }}
{{ $person_page := $.Site.GetPage $person_page_path }}
{{ $person_page := site.GetPage $person_page_path }}
{{ if not $person_page }}
{{ errorf "Could not find an author page at `%s`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist." $person_page_path }}
{{end}}
@ -17,11 +17,11 @@
{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
<!-- About widget -->
<div class="row" itemprop="author" itemscope itemtype="http://schema.org/Person" itemref="{{ if $.Site.Params.email }}person-email{{ end }}{{ if $.Site.Params.phone }} person-telephone{{ end }}{{ if $.Site.Params.address}} person-address{{ end }}">
<div class="row" itemprop="author" itemscope itemtype="http://schema.org/Person" itemref="{{ if site.Params.email }}person-email{{ end }}{{ if site.Params.phone }} person-telephone{{ end }}{{ if site.Params.address}} person-address{{ end }}">
<div class="col-12 col-lg-4">
<div id="profile">
{{ if $.Site.Params.gravatar }}
{{ if site.Params.gravatar }}
<img class="portrait" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=200')" itemprop="image" alt="Avatar">
{{ else if $avatar }}
{{ $avatar_image := $avatar.Fill "250x250 Center" }}

View file

@ -17,10 +17,10 @@
{{ if eq $page.Params.email_form 1 }}
{{ $post_action = "netlify" }}
{{ else }}
{{ if not $.Site.Params.email }}
{{ if not site.Params.email }}
{{ errorf "Please set an email address for the contact form using the `email` parameter in `config.toml`. Otherwise, set `email_form = 0` to disable the contact form." }}
{{ end }}
{{ $post_action = printf "action=\"https://formspree.io/%s\"" $.Site.Params.email }}
{{ $post_action = printf "action=\"https://formspree.io/%s\"" site.Params.email }}
{{end}}
<div class="mb-3">
@ -44,16 +44,16 @@
<ul class="fa-ul" itemscope>
{{ if and $.Site.Params.email (not $page.Params.email_form) }}
{{ if and site.Params.email (not $page.Params.email_form) }}
<li>
<i class="fa-li fas fa-envelope fa-2x" aria-hidden="true"></i>
<span id="person-email" itemprop="email">
{{- if $autolink }}<a href="mailto:{{ $.Site.Params.email }}">{{ $.Site.Params.email }}</a>{{ else }}{{ $.Site.Params.email }}{{ end -}}
{{- if $autolink }}<a href="mailto:{{ site.Params.email }}">{{ site.Params.email }}</a>{{ else }}{{ site.Params.email }}{{ end -}}
</span>
</li>
{{ end }}
{{ with $.Site.Params.phone }}
{{ with site.Params.phone }}
<li>
<i class="fa-li fas fa-phone fa-2x" aria-hidden="true"></i>
<span id="person-telephone" itemprop="telephone">
@ -62,21 +62,21 @@
</li>
{{ end }}
{{ with $.Site.Params.address }}
{{ with site.Params.address }}
<li>
<i class="fa-li fas fa-map-marker fa-2x" aria-hidden="true"></i>
<span id="person-address" itemprop="address">{{ . | markdownify | emojify }}</span>
</li>
{{ end }}
{{ with $.Site.Params.office_hours }}
{{ with site.Params.office_hours }}
<li>
<i class="fa-li fas fa-clock fa-2x" aria-hidden="true"></i>
<span>{{ . | markdownify | emojify }}</span>
</li>
{{ end }}
{{ with $.Site.Params.appointment_url }}
{{ with site.Params.appointment_url }}
<li>
<i class="fa-li fas fa-calendar-check fa-2x" aria-hidden="true"></i>
<a href="{{ . }}" target="_blank" rel="noopener">{{ i18n "book_appointment" | default "Book an appointment" }}</a>
@ -84,7 +84,7 @@
{{ end }}
{{/* Contact links. */}}
{{ range $.Site.Params.contact_links }}
{{ range site.Params.contact_links }}
{{ $pack := or .icon_pack "fas" }}
{{ $pack_prefix := $pack }}
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
@ -106,14 +106,14 @@
</ul>
{{ if $.Site.Params.map }}
{{ if site.Params.map }}
<div class="d-none">
<input id="map-provider" value="{{ $.Site.Params.map }}">
<input id="map-lat" value="{{ $.Site.Params.latitude }}">
<input id="map-lng" value="{{ $.Site.Params.longitude }}">
<input id="map-dir" value="{{ $.Site.Params.address }}">
<input id="map-zoom" value="{{ $.Site.Params.zoom | default "15" }}">
<input id="map-api-key" value="{{ $.Site.Params.map_api_key }}">
<input id="map-provider" value="{{ site.Params.map }}">
<input id="map-lat" value="{{ site.Params.latitude }}">
<input id="map-lng" value="{{ site.Params.longitude }}">
<input id="map-dir" value="{{ site.Params.address }}">
<input id="map-zoom" value="{{ site.Params.zoom | default "15" }}">
<input id="map-api-key" value="{{ site.Params.map_api_key }}">
</div>
<div id="map"></div>
{{ end }}

View file

@ -8,19 +8,19 @@
{{ $items_sort := $st.Params.content.order| default "desc" }}
{{/* Query */}}
{{ $query := where (where $.Site.RegularPages "Type" $items_type) "Params.featured" true }}
{{ $query := where (where site.RegularPages "Type" $items_type) "Params.featured" true }}
{{/* Filters */}}
{{ if $st.Params.content.filters.tag }}
{{ $archive_page := $.Site.GetPage (printf "tags/%s" $st.Params.content.filters.tag) }}
{{ $archive_page := site.GetPage (printf "tags/%s" $st.Params.content.filters.tag) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.category }}
{{ $archive_page := $.Site.GetPage (printf "categories/%s" $st.Params.content.filters.category) }}
{{ $archive_page := site.GetPage (printf "categories/%s" $st.Params.content.filters.category) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.publication_type }}
{{ $archive_page := $.Site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}
{{ $archive_page := site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}

View file

@ -14,20 +14,20 @@
{{ $items_sort := $st.Params.content.order | default "desc" }}
{{/* Query */}}
{{ $query := where $.Site.RegularPages "Type" $items_type }}
{{ $archive_page := $.Site.GetPage "Section" $items_type }}
{{ $query := where site.RegularPages "Type" $items_type }}
{{ $archive_page := site.GetPage "Section" $items_type }}
{{/* Filters */}}
{{ if $st.Params.content.filters.tag }}
{{ $archive_page = $.Site.GetPage (printf "tags/%s" $st.Params.content.filters.tag) }}
{{ $archive_page = site.GetPage (printf "tags/%s" $st.Params.content.filters.tag) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.category }}
{{ $archive_page = $.Site.GetPage (printf "categories/%s" $st.Params.content.filters.category) }}
{{ $archive_page = site.GetPage (printf "categories/%s" $st.Params.content.filters.category) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.publication_type }}
{{ $archive_page = $.Site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}
{{ $archive_page = site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $st.Params.content.filters.exclude_featured }}

View file

@ -11,7 +11,7 @@
{{ with $page.Content }}
<div class="col-md-12">
<p>{{ . | markdownify }}</p>
<p>{{ . }}</p>
</div>
{{ end }}
@ -20,18 +20,18 @@
<h2 class="mb-4">{{ . | markdownify }}</h2>
</div>
{{ $query := where (where $.Site.Pages "Section" "author") ".Params.user_groups" "intersect" (slice .) }}
{{ $query := where (where site.Pages "Section" "author") ".Params.user_groups" "intersect" (slice .) }}
{{ range $query }}
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
{{/* Get link to user's profile page. */}}
{{ $link := "" }}
{{ with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) }}
{{ with site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).File.Dir)) }}
{{ $link = .RelPermalink }}
{{ end }}
<div class="col-12 col-sm-auto people-person">
{{ $src := "" }}
{{ if $.Site.Params.gravatar }}
{{ if site.Params.gravatar }}
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=200" (md5 .Params.email) }}
{{ else if $avatar }}
{{ $avatar_image := $avatar.Fill "150x150 Center" }}

View file

@ -67,7 +67,7 @@
{{ end }}
<div class="{{ if or $st.Params.content.filter_button (eq $st.Params.design.view 3) }}isotope projects-container{{end}} {{if eq $st.Params.design.view 3}}js-layout-masonry{{else}}row js-layout-row{{end}} {{ if eq $st.Params.design.view 5 }}project-showcase mt-5{{end}}">
{{ range $idx, $item := where $.Site.RegularPages "Type" $items_type }}
{{ range $idx, $item := where site.RegularPages "Type" $items_type }}
{{ $link := $item.RelPermalink }}
{{ $target := "" }}
{{ if $item.Params.external_link }}

View file

@ -3,28 +3,28 @@
<div class="row">
<div class="col-12 col-lg-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
<h1>{{ with $page.Title }}{{ . | markdownify | emojify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
</div>
<div class="col-12 col-lg-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ with $page.Content }}<p>{{ . }}</p>{{ end }}
{{ if not (eq (len $.Site.Taxonomies.tags) 0) }}
{{ if not (eq (len site.Taxonomies.tags) 0) }}
{{ $fontSmall := 0.8 }}
{{ $fontBig := 2.5 }}
{{ $fontDelta := sub $fontBig $fontSmall }}
{{ $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages }}
{{ $max := add (len (index $.Site.Taxonomies.tags.ByCount 0).Pages) 1 }}
{{ $min := len (index site.Taxonomies.tags.ByCount.Reverse 0).Pages }}
{{ $max := add (len (index site.Taxonomies.tags.ByCount 0).Pages) 1 }}
{{ $delta := sub $max $min }}
{{ $fontStep := div $fontDelta $delta }}
<div class="tag-cloud">
{{ range $name, $taxonomy := $.Site.Taxonomies.tags }}
{{ range $name, $taxonomy := site.Taxonomies.tags }}
{{ $tagCount := len $taxonomy.Pages }}
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
{{ $fontSize := add $fontSmall (mul (sub $fontBig $fontSmall) $weight) }}
<a href="{{ ($.Site.GetPage (printf "tags/%s" $name)).RelPermalink }}" style="font-size:{{ $fontSize }}rem">{{ $name }}</a>
<a href="{{ .Page.RelPermalink }}" style="font-size:{{ $fontSize }}rem">{{ $name }}</a>
{{ end }}
</div>
{{ end }}

View file

@ -21,7 +21,7 @@
{{ partial "pub_types.html" $ }}
{{ $pub_types := $.Scratch.Get "pub_types" }}
{{ range $index, $pubtype := .Params.publication_types }}
<a href="{{ ($.Site.GetPage "section" "publication").RelPermalink }}#{{ . | urlize }}">
<a href="{{ (site.GetPage "section" "publication").RelPermalink }}#{{ . | urlize }}">
{{ index $pub_types (int .) }}
</a>
{{ end }}

View file

@ -1,21 +1,30 @@
{{/* Generate RSS with full page content rather than just summary. */}}
{{- $pages := .Data.Pages -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}</title>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
{{ range first 15 .Data.Pages }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Author.email }}<author>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>

View file

@ -1,5 +1,5 @@
<div class="alert alert-{{ .Get 0 }}">
<div>
{{ .Inner }}
{{ .Inner | markdownify | emojify }}
</div>
</div>

View file

@ -1 +1 @@
<span class="markup-quote">{{ .Inner }}</span>
<span class="markup-quote">{{ .Inner | markdownify | emojify }}</span>

View file

@ -1,5 +1,5 @@
<ul class="list-unstyled">
{{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
{{ range (site.GetPage "taxonomyTerm" "categories").Pages }}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{ end }}
</ul>

View file

@ -1,5 +1,5 @@
<ul class="list-unstyled">
{{ range ($.Site.GetPage "taxonomyTerm" "tags").Pages }}
{{ range (site.GetPage "taxonomyTerm" "tags").Pages }}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{ end }}
</ul>

View file

@ -1,3 +1,3 @@
<aside class="notes">
{{ .Inner | markdownify }}
{{ .Inner | markdownify | emojify }}
</aside>

View file

@ -1,14 +0,0 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
<url>
{{ if .IsTranslated }}
<xhtml:link rel="alternate" href="{{ .Permalink }}" hreflang="{{ .Lang }}"/>{{ range .Translations }}
<xhtml:link rel="alternate" href="{{ .Permalink }}" hreflang="{{ .Lang }}"/>{{ end }}
{{ end }}
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
</url>
{{ end }}
</urlset>

View file

@ -20,12 +20,12 @@
<div class="col-12 col-md-3 pub-row-heading">{{ i18n "date" }}</div>
<div class="col-12 col-md-9" itemprop="datePublished">
{{ $date := .Date }}
{{ (time $date).Format $.Site.Params.date_format }}
{{ (time $date).Format site.Params.date_format }}
<div class="talk-time">
{{ if not .Params.all_day }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
{{ with .Params.date_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
&mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
{{ end }}
{{ end }}
</div>

View file

@ -5,7 +5,7 @@
[build.environment]
HUGO_THEME = "repo"
HUGO_VERSION = "0.53"
HUGO_VERSION = "0.55.2"
HUGO_ENABLEGITINFO = "true"
[context.production.environment]

View file

@ -1,25 +1,42 @@
name = "Academic"
license = "MIT"
licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md"
description = "The website designer for Hugo. Build anything and deploy with one click! Fully customizable with themes, plugins, and language packs."
description = "The website builder for Hugo. Build *anything* with widgets and deploy with one click! Fully personalize your site with themes, plugins, and language packs."
homepage = "https://sourcethemes.com/academic/"
min_version = "0.53"
tags = ["academic",
min_version = "0.55"
tags = ["widgets",
"resume",
"portfolio",
"responsive",
"student",
"clean",
"personal",
"university",
"company",
"blog",
"minimal"
"minimal",
"light",
"dark",
"multilingual",
"documentation",
"landing page",
"projects",
"single page",
"contact form",
"mobile",
"gallery",
"search",
"presentation",
"simple",
"minimalist",
"starter",
"modern",
"one page",
"customizable",
"technical",
"product",
"slide"
]
features = ["academic profile",
"research publication system",
"projects",
"blog",
"teaching",
"contact"
]
features = ["page builder", "widgets", "themes", "search", "research publication system", "filterable portfolio",
"blog", "create courses", "talks", "events", "slides", "gallery", "contact form"]
[author]
name = "George Cushen"