diff --git a/archetypes/post.md b/archetypes/post.md index 1e328931..eae0b6d0 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -1,6 +1,11 @@ +++ -image = "" math = false highlight = true tags = [] + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/archetypes/project.md b/archetypes/project.md index 3334d65c..b109d941 100644 --- a/archetypes/project.md +++ b/archetypes/project.md @@ -9,9 +9,6 @@ summary = "" # Optional image to display on homepage. image_preview = "" -# Optional image to display on project detail page. -image = "" - # Optional external URL for project (replaces project detail page). external_link = "" @@ -20,4 +17,10 @@ math = false # Does the project detail page use source code highlighting? highlight = true + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/archetypes/publication.md b/archetypes/publication.md index 09213538..5ae8ceeb 100644 --- a/archetypes/publication.md +++ b/archetypes/publication.md @@ -28,9 +28,6 @@ math = false # Does this page require source code highlighting? (true/false) highlight = true -# Featured image (optional) -image = "" - # Featured image thumbnail (optional) image_preview = "" @@ -45,4 +42,9 @@ url_project = "" url_slides = "" url_video = "" +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/archetypes/talk.md b/archetypes/talk.md index 74d9c81a..1bf6eff9 100644 --- a/archetypes/talk.md +++ b/archetypes/talk.md @@ -1,14 +1,22 @@ +++ -math = false -highlight = true title = "" abstract = "" abstract_short = "" event = "" event_url = "" location = "" + selected = false +math = false +highlight = true + url_pdf = "" url_slides = "" url_video = "" + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/exampleSite/content/post/_index.md b/exampleSite/content/post/_index.md index f69dac4b..7dc8f3d6 100644 --- a/exampleSite/content/post/_index.md +++ b/exampleSite/content/post/_index.md @@ -3,4 +3,10 @@ title = "Posts" date = "2017-01-01T00:00:00Z" math = false highlight = false + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/exampleSite/content/post/getting-started.md b/exampleSite/content/post/getting-started.md index 37b6ff6f..9af88672 100644 --- a/exampleSite/content/post/getting-started.md +++ b/exampleSite/content/post/getting-started.md @@ -1,13 +1,17 @@ +++ date = "2016-04-20T12:00:00" draft = false -image = "banners/getting-started.png" tags = ["academic", "hugo"] title = "Getting started with the Academic framework for Hugo" math = true summary = """ Create a beautifully simple personal or academic website in under 10 minutes. """ + +[header] +image = "headers/getting-started.png" +caption = "Image credit: [**Academic**](https://github.com/gcushen/hugo-academic/)" + +++ The Academic framework enables you to easily create a beautifully simple personal or academic website using the [Hugo](https://gohugo.io) static site generator. diff --git a/exampleSite/content/post/managing-content.md b/exampleSite/content/post/managing-content.md index 430c4384..2a1bdcbb 100644 --- a/exampleSite/content/post/managing-content.md +++ b/exampleSite/content/post/managing-content.md @@ -12,7 +12,18 @@ To enable LaTeX math rendering for a page, you should include `math = true` in t To disable source code highlighting by default for all pages, set `highlight = false` in `config.toml`. You can then enable source code highlighting only on pages that need it by setting `highlight = true` in that page's preamble. See the [code-highlighting docs]({{< ref "post/writing-markdown-latex.md#code-highlighting" >}}) for more details. -To display an image in publication, post, or project page headers, you can include the `image = "my-image.jpg"` option in the page `+++` preamble. It is automatically assumed that the image is located in your `static/img/` folder. In the context of posts and projects, the image is intended to behave as a full width banner across the top of the article. +To display a featured image in content page headers, the parameters below can be inserted towards the end of a page's `+++` preamble. It is assumed that the image is located in your `static/img/` folder, so the full path in the example below will be `static/img/headers/getting-started.png`. The `caption` parameter can be used to write an image caption or credit. + +```toml +[header] +image = "headers/getting-started.png" +caption = "Image credit: [**Academic**](https://github.com/gcushen/hugo-academic/)" + +``` + +{{% alert note %}} +If you wish to prevent a featured image automatically being used for a post's thumbnail on the homepage, the `preview = false` parameter can be added to `[header]`. +{{% /alert %}} ## Create a publication diff --git a/exampleSite/content/project/deep-learning.md b/exampleSite/content/project/deep-learning.md index d3019d07..c0a0d6c3 100644 --- a/exampleSite/content/project/deep-learning.md +++ b/exampleSite/content/project/deep-learning.md @@ -11,9 +11,6 @@ summary = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." # Optional image to display on homepage (relative to `static/img/` folder). image_preview = "bubbles.jpg" -# Optional image to display on project detail page (relative to `static/img/` folder). -image = "" - # Tags: can be used for filtering projects. # Example: `tags = ["machine-learning", "deep-learning"]` tags = ["deep-learning"] @@ -24,6 +21,11 @@ external_link = "" # Does the project detail page use math formatting? math = false +# Optional featured image (relative to `static/img/` folder). +[header] +image = "headers/bubbles-wide.jpg" +caption = "My caption :smile:" + +++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis posuere tellus ac convallis placerat. Proin tincidunt magna sed ex sollicitudin condimentum. Sed ac faucibus dolor, scelerisque sollicitudin nisi. Cras purus urna, suscipit quis sapien eu, pulvinar tempor diam. Quisque risus orci, mollis id ante sit amet, gravida egestas nisl. Sed ac tempus magna. Proin in dui enim. Donec condimentum, sem id dapibus fringilla, tellus enim condimentum arcu, nec volutpat est felis vel metus. Vestibulum sit amet erat at nulla eleifend gravida. diff --git a/exampleSite/content/project/example-external-project.md b/exampleSite/content/project/example-external-project.md index 003ba0ba..21fc325b 100644 --- a/exampleSite/content/project/example-external-project.md +++ b/exampleSite/content/project/example-external-project.md @@ -11,9 +11,6 @@ summary = "An example of linking directly to an external project website using ` # Optional image to display on homepage (relative to `static/img/` folder). image_preview = "boards.jpg" -# Optional image to display on project detail page (relative to `static/img/` folder). -image = "" - # Tags: can be used for filtering projects. # Example: `tags = ["machine-learning", "deep-learning"]` tags = ["demo"] diff --git a/exampleSite/content/publication/_index.md b/exampleSite/content/publication/_index.md index 2ff6dccd..f2230057 100644 --- a/exampleSite/content/publication/_index.md +++ b/exampleSite/content/publication/_index.md @@ -3,4 +3,10 @@ title = "Publications" date = "2017-01-01T00:00:00Z" math = false highlight = false + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/exampleSite/content/publication/clothing-search.md b/exampleSite/content/publication/clothing-search.md index d2806b7f..df3dba32 100644 --- a/exampleSite/content/publication/clothing-search.md +++ b/exampleSite/content/publication/clothing-search.md @@ -3,7 +3,6 @@ abstract = "We present a mobile visual clothing search system whereby a smart ph abstract_short = "A mobile visual clothing search system is presented whereby a smart phone user can either choose a social networking image or capture a new photo of a person wearing clothing of interest and search for similar clothing in a large cloud-based ecommerce database. The phone's GPS location is used to re-rank results by retail store location, to inform the user of local stores where similar clothing items can be tried on." authors = ["GA Cushen", "MS Nixon"] date = "2013-07-01" -image = "" image_preview = "" math = true publication_types = ["1"] @@ -22,6 +21,11 @@ url_video = "#" name = "Custom Link" url = "http://www.example.org" +# Optional featured image (relative to `static/img/` folder). +[header] +image = "headers/bubbles-wide.jpg" +caption = "My caption :smile:" + +++ More detail can easily be written here using *Markdown* and $\rm \LaTeX$ math code. diff --git a/exampleSite/content/publication/person-re-identification.md b/exampleSite/content/publication/person-re-identification.md index d0d4be79..41ea9761 100644 --- a/exampleSite/content/publication/person-re-identification.md +++ b/exampleSite/content/publication/person-re-identification.md @@ -3,7 +3,6 @@ abstract = "Person re-identification is a critical security task for recognizing abstract_short = "" authors = ["GA Cushen"] date = "2015-09-01" -image = "" image_preview = "" math = true publication_types = ["2"] diff --git a/exampleSite/content/tags/academic/_index.md b/exampleSite/content/tags/academic/_index.md new file mode 100644 index 00000000..6550627b --- /dev/null +++ b/exampleSite/content/tags/academic/_index.md @@ -0,0 +1,14 @@ ++++ +title = "Content tagged as 'Academic'" +date = "2017-01-01T00:00:00" +math = false +highlight = false + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "headers/bubbles-wide.jpg" +caption = "" + ++++ + +Here is a list of all the content that has been tagged as *academic*. diff --git a/exampleSite/content/talk/_index.md b/exampleSite/content/talk/_index.md index 8923664c..3be9f550 100644 --- a/exampleSite/content/talk/_index.md +++ b/exampleSite/content/talk/_index.md @@ -3,4 +3,10 @@ title = "Recent & Upcoming Talks" date = "2017-01-01T00:00:00Z" math = false highlight = false + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "" +caption = "" + +++ diff --git a/exampleSite/content/talk/example-talk.md b/exampleSite/content/talk/example-talk.md index aa396dd9..4b70c7b8 100644 --- a/exampleSite/content/talk/example-talk.md +++ b/exampleSite/content/talk/example-talk.md @@ -1,16 +1,24 @@ +++ date = "2017-01-01T00:00:00" -math = true title = "Example Talk" abstract = "" abstract_short = "" event = "Hugo Academic Theme Conference" event_url = "https://example.org" location = "London, United Kingdom" + selected = false +math = true + url_pdf = "" url_slides = "" url_video = "" + +# Optional featured image (relative to `static/img/` folder). +[header] +image = "headers/bubbles-wide.jpg" +caption = "My caption :smile:" + +++ Embed your slides or video here using [shortcodes](https://gcushen.github.io/hugo-academic-demo/post/writing-markdown-latex/). Further details can easily be added using *Markdown* and $\rm \LaTeX$ math code. diff --git a/exampleSite/static/img/bubbles.jpg b/exampleSite/static/img/bubbles.jpg index 0952f719..d0d0b5cb 100644 Binary files a/exampleSite/static/img/bubbles.jpg and b/exampleSite/static/img/bubbles.jpg differ diff --git a/exampleSite/static/img/headers/bubbles-wide.jpg b/exampleSite/static/img/headers/bubbles-wide.jpg new file mode 100644 index 00000000..abacf840 Binary files /dev/null and b/exampleSite/static/img/headers/bubbles-wide.jpg differ diff --git a/exampleSite/static/img/banners/getting-started.png b/exampleSite/static/img/headers/getting-started.png similarity index 100% rename from exampleSite/static/img/banners/getting-started.png rename to exampleSite/static/img/headers/getting-started.png diff --git a/i18n/en.yaml b/i18n/en.yaml index 80e206c0..57fa300d 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -87,3 +87,14 @@ - id: open_project_site translation: Go to Project Site + +# Default node titles + +- id: posts + translation: Posts + +- id: publications + translation: Publications + +- id: talks + translation: Talks diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 67fcf3b9..9aa3bd06 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,21 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} + +{{ if .Params.header.image }} +