Compare commits
4 commits
cee6e1e3e1
...
76c545771e
Author | SHA1 | Date | |
---|---|---|---|
|
76c545771e | ||
|
4e81f629de | ||
|
469a458ab9 | ||
|
07fe0da177 |
|
@ -1,5 +1,5 @@
|
|||
{{/* Table Shortcode for Hugo Blox Builder. */}}
|
||||
{{/* Load a CSV table from page dir falling back back to remote URL */}}
|
||||
{{/* Load a CSV table from page dir falling back to remote URL */}}
|
||||
{{/* Defaults to expecting a comma-separated CSV with a header row. */}}
|
||||
|
||||
{{/*
|
||||
|
@ -23,17 +23,17 @@
|
|||
{{ $caption := .Get "caption" }}
|
||||
|
||||
{{ $is_remote := strings.HasPrefix $src "http" }}
|
||||
{{ if not $is_remote }}
|
||||
{{ $src = path.Join "content" $.Page.File.Dir $src }}
|
||||
{{ end }}
|
||||
{{ $rows := getCSV $delimiter $src }}
|
||||
{{ $rows := transform.Unmarshal (dict "delimiter" $delimiter) (.Page.Resources.Get $src).Content }}
|
||||
|
||||
<table class="table">
|
||||
{{ if $useHeaderRow }}
|
||||
{{ $headerRow := index $rows 0 }}
|
||||
{{ $rows = after 1 $rows }}
|
||||
<tr> {{ range $headerRow }} <th>{{ . | markdownify | emojify }}</th> {{ end }} </tr>
|
||||
<thead>
|
||||
<tr> {{ range $headerRow }} <th>{{ . | markdownify | emojify }}</th> {{ end }} </tr>
|
||||
</thead>
|
||||
{{ end }}
|
||||
<tbody>
|
||||
{{ range $rows }}
|
||||
<tr>
|
||||
{{ range . }}
|
||||
|
@ -45,6 +45,7 @@
|
|||
{{ end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
{{ if $caption }}
|
||||
<caption>{{ $caption | markdownify | emojify }}</caption>
|
||||
{{ end }}
|
||||
|
|
|
@ -86,9 +86,9 @@ collections:
|
|||
required: false
|
||||
widget: "list"
|
||||
- name: posts
|
||||
label: Posts
|
||||
label_singular: Post
|
||||
folder: 'content/post'
|
||||
label: Blog Posts
|
||||
label_singular: Blog Post
|
||||
folder: 'content/blog'
|
||||
path: '{{slug}}/index'
|
||||
filter: {field: "cms_exclude"}
|
||||
create: true # Allow users to create new documents in this collection
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
{{/* Localisation */}}
|
||||
{{ $items_type := $archive_page.Type }}
|
||||
{{ $i18n := "" }}
|
||||
{{ if eq $items_type "post" }}
|
||||
{{ if eq $items_type "blog" }}
|
||||
{{ $i18n = "more_posts" }}
|
||||
{{ else if eq $items_type "event" }}
|
||||
{{ $i18n = "more_talks" }}
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
{{/*
|
||||
Featured image is searched in this order:
|
||||
1. Search for a file `*featured*` in the post directory
|
||||
2. Search for a file `.Params.image.filename` in the post directory
|
||||
1. Search for a file `*featured*` in the page directory
|
||||
2. Search for a file `.Params.image.filename` in the page directory
|
||||
3. Search for a file `.Params.image.filename` in the `assets/media/` directory
|
||||
*/}}
|
||||
|
||||
{{/* Search for an image "*featured*" in post folder */}}
|
||||
{{/* Search for an image "*featured*" in page folder */}}
|
||||
{{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }}
|
||||
{{ if eq $resource nil }}
|
||||
{{/* Otherwise fall back the image file specified in front matter */}}
|
||||
{{ $filename := .Params.image.filename }}
|
||||
{{/* Search in post folder */}}
|
||||
{{/* Search in page folder */}}
|
||||
{{ $resource = (.Resources.ByType "image").GetMatch $filename }}
|
||||
{{/* Otherwise in `assets/media/` folder */}}
|
||||
{{ if eq $resource nil }} {{ $resource = resources.GetMatch (path.Join "media" $filename) }} {{ end }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{{/* Get schema type. */}}
|
||||
{{ $schema := "Article" }}
|
||||
{{ if eq $page.Type "post" }}
|
||||
{{ if eq $page.Type "blog" }}
|
||||
{{ $schema = "BlogPosting" }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
{{- else if $page.IsPage -}}
|
||||
|
||||
{{ if (eq $page.Type "post") | or (eq $page.Type "publication") | or (eq $page.Type "project") }}
|
||||
{{ if (eq $page.Type "blog") | or (eq $page.Type "publication") | or (eq $page.Type "project") }}
|
||||
{{ partial "jsonld/article.html" (dict "page" $page "summary" $summary) }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -1,17 +1,29 @@
|
|||
{{/* Table Shortcode for Hugo Blox Builder. */}}
|
||||
{{/* Load a CSV table from page dir falling back back to remote URL */}}
|
||||
{{/* Load a CSV table from page dir falling back to remote URL */}}
|
||||
{{/* Defaults to expecting a comma-separated CSV with a header row. */}}
|
||||
|
||||
{{/*
|
||||
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#csv-table
|
||||
|
||||
Parameters
|
||||
----------
|
||||
src :
|
||||
Path or url to the csv table. Path is relative to the folder where the shortcode is called.
|
||||
delimiter : default ","
|
||||
Field delimiter.
|
||||
header : default "true"
|
||||
If "true", the first row is rendered as the header.
|
||||
caption : optional
|
||||
Caption for the table.
|
||||
*/}}
|
||||
|
||||
{{ $src := .Get "path" }}
|
||||
{{ $delimiter := .Get "delimiter" | default "," }}
|
||||
{{ $useHeaderRow := (eq (lower (.Get "header")) "true") | default true }}
|
||||
{{ $caption := .Get "caption" }}
|
||||
|
||||
{{ $is_remote := strings.HasPrefix $src "http" }}
|
||||
{{ if not $is_remote }}
|
||||
{{ $src = path.Join "content" $.Page.File.Dir $src }}
|
||||
{{ end }}
|
||||
{{ $rows := getCSV $delimiter $src }}
|
||||
{{ $rows := transform.Unmarshal (dict "delimiter" $delimiter) (.Page.Resources.Get $src).Content }}
|
||||
|
||||
<table class="table-auto">
|
||||
{{ if $useHeaderRow }}
|
||||
|
|
2
starters/blog/.github/workflows/publish.yaml
vendored
|
@ -1,7 +1,7 @@
|
|||
name: Deploy website to GitHub Pages
|
||||
|
||||
env:
|
||||
WC_HUGO_VERSION: '0.123.6'
|
||||
WC_HUGO_VERSION: '0.123.7'
|
||||
|
||||
on:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
|
|
|
@ -13,7 +13,7 @@ baseURL: 'https://example.com/' # Website URL
|
|||
cascade:
|
||||
# Blog post options
|
||||
- _target:
|
||||
path: /post/**
|
||||
path: /blog/**
|
||||
kind: page
|
||||
pager: true
|
||||
editable: true
|
||||
|
|
|
@ -16,7 +16,7 @@ sections:
|
|||
content:
|
||||
filters:
|
||||
folders:
|
||||
- post
|
||||
- blog
|
||||
design:
|
||||
spacing:
|
||||
padding: ['3rem', 0, '6rem', 0]
|
||||
|
|
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 333 KiB After Width: | Height: | Size: 333 KiB |
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 170 KiB |
|
@ -4,5 +4,5 @@ go 1.19
|
|||
|
||||
require (
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231125204555-f431a4a2c705
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240228195300-ae83c68788d6
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240303165809-469a458ab94f
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
build:
|
||||
hugo_version: '0.123.6'
|
||||
hugo_version: '0.123.7'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
publish = "public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.123.6"
|
||||
HUGO_VERSION = "0.123.7"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "21.1.0"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Deploy website to GitHub Pages
|
||||
|
||||
env:
|
||||
WC_HUGO_VERSION: '0.123.6'
|
||||
WC_HUGO_VERSION: '0.123.7'
|
||||
|
||||
on:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
|
|
|
@ -22,7 +22,7 @@ cascade:
|
|||
show_date_updated: true
|
||||
# Blog post options
|
||||
- _target:
|
||||
path: /post/**
|
||||
path: /blog/**
|
||||
kind: page
|
||||
pager: true
|
||||
editable: true
|
||||
|
@ -62,7 +62,6 @@ footnotereturnlinkcontents: <sup>^</sup>
|
|||
ignoreFiles: [\.ipynb$, .ipynb_checkpoints$, \.Rmd$, \.Rmarkdown$, _cache$]
|
||||
enableInlineShortcodes: true
|
||||
permalinks:
|
||||
post: '/blog/:slug/'
|
||||
authors: '/author/:slug/'
|
||||
tags: '/tag/:slug/'
|
||||
categories: '/category/:slug/'
|
||||
|
|
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
|
@ -4,5 +4,5 @@ go 1.15
|
|||
|
||||
require (
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240217212918-ae7f0c597978
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240228195300-ae83c68788d6
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240303165809-469a458ab94f
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
build:
|
||||
hugo_version: '0.123.6'
|
||||
hugo_version: '0.123.7'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
publish = "public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.123.6"
|
||||
HUGO_VERSION = "0.123.7"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
[context.production.environment]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Deploy website to GitHub Pages
|
||||
|
||||
env:
|
||||
WC_HUGO_VERSION: '0.123.6'
|
||||
WC_HUGO_VERSION: '0.123.7'
|
||||
|
||||
on:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
|
|
|
@ -13,7 +13,7 @@ baseURL: 'https://example.com/' # Website URL
|
|||
cascade:
|
||||
# Blog post options
|
||||
- _target:
|
||||
path: /post/**
|
||||
path: /blog/**
|
||||
kind: page
|
||||
pager: true
|
||||
editable: true
|
||||
|
@ -30,10 +30,8 @@ cascade:
|
|||
enable: true
|
||||
# Blog section options
|
||||
- _target:
|
||||
path: /post/*
|
||||
path: /blog/*
|
||||
kind: section
|
||||
# Change url to /blog/
|
||||
url: /blog/
|
||||
# Set the listing view
|
||||
view: date-title-summary
|
||||
|
||||
|
@ -60,7 +58,6 @@ enableRobotsTXT: true
|
|||
footnotereturnlinkcontents: <sup>^</sup>
|
||||
ignoreFiles: [\.ipynb$, .ipynb_checkpoints$, \.Rmd$, \.Rmarkdown$, _cache$]
|
||||
permalinks:
|
||||
post: '/blog/:slug/'
|
||||
authors: '/author/:slug/'
|
||||
tags: '/tag/:slug/'
|
||||
categories: '/category/:slug/'
|
||||
|
|
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 333 KiB After Width: | Height: | Size: 333 KiB |
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 170 KiB |
|
@ -4,5 +4,5 @@ go 1.19
|
|||
|
||||
require (
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240228195300-ae83c68788d6
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240303165809-469a458ab94f
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
build:
|
||||
hugo_version: '0.123.6'
|
||||
hugo_version: '0.123.7'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
publish = "public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.123.6"
|
||||
HUGO_VERSION = "0.123.7"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
[context.production.environment]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Deploy website to GitHub Pages
|
||||
|
||||
env:
|
||||
WC_HUGO_VERSION: '0.123.6'
|
||||
WC_HUGO_VERSION: '0.123.7'
|
||||
|
||||
on:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
|
|
|
@ -4,5 +4,5 @@ go 1.19
|
|||
|
||||
require (
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240228195300-ae83c68788d6
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240303165809-469a458ab94f
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
build:
|
||||
hugo_version: '0.123.6'
|
||||
hugo_version: '0.123.7'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
publish = "public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.123.6"
|
||||
HUGO_VERSION = "0.123.7"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
[context.production.environment]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Deploy website to GitHub Pages
|
||||
|
||||
env:
|
||||
WC_HUGO_VERSION: '0.123.6'
|
||||
WC_HUGO_VERSION: '0.123.7'
|
||||
|
||||
on:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
|
|
|
@ -8,7 +8,7 @@ main:
|
|||
url: /
|
||||
weight: 10
|
||||
- name: Blog
|
||||
url: post/
|
||||
url: blog/
|
||||
weight: 20
|
||||
- name: Uses
|
||||
url: uses/
|
||||
|
|
|
@ -4,5 +4,5 @@ go 1.19
|
|||
|
||||
require (
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231125200520-804c70f7efb8
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240228195300-ae83c68788d6
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240303165809-469a458ab94f
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
build:
|
||||
hugo_version: '0.123.6'
|
||||
hugo_version: '0.123.7'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
publish = "public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.123.6"
|
||||
HUGO_VERSION = "0.123.7"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
[context.production.environment]
|
||||
|
|