mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-01-08 20:05:14 +01:00
Compare commits
2 commits
c2e9a799f7
...
934246c45b
Author | SHA1 | Date | |
---|---|---|---|
|
934246c45b | ||
|
971f297e46 |
31 changed files with 113 additions and 25 deletions
|
@ -80,3 +80,7 @@
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.backlink {
|
||||||
|
@apply text-xs font-medium text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 contrast-more:text-gray-800 contrast-more:dark:text-gray-50;
|
||||||
|
}
|
||||||
|
|
4
modules/blox-tailwind/assets/dist/wc.min.css
vendored
4
modules/blox-tailwind/assets/dist/wc.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,20 @@
|
||||||
markup:
|
markup:
|
||||||
defaultMarkdownHandler: goldmark
|
defaultMarkdownHandler: goldmark
|
||||||
goldmark:
|
goldmark:
|
||||||
|
renderHooks:
|
||||||
|
link:
|
||||||
|
# Process backlinks hook
|
||||||
|
enableDefault: true
|
||||||
renderer:
|
renderer:
|
||||||
|
# Render HTML in Markdown
|
||||||
unsafe: true
|
unsafe: true
|
||||||
parser:
|
parser:
|
||||||
|
# Support Latex math(?)
|
||||||
attribute:
|
attribute:
|
||||||
block: true
|
block: true
|
||||||
title: true
|
title: true
|
||||||
extensions:
|
extensions:
|
||||||
|
# Support Latex math
|
||||||
passthrough:
|
passthrough:
|
||||||
enable: true
|
enable: true
|
||||||
delimiters:
|
delimiters:
|
||||||
|
@ -21,7 +28,18 @@ markup:
|
||||||
- \)
|
- \)
|
||||||
- - $
|
- - $
|
||||||
- $
|
- $
|
||||||
|
extras:
|
||||||
|
# Enable subscript, superscript, and highlighting with ~,^, and == wrappers
|
||||||
|
insert:
|
||||||
|
enable: false
|
||||||
|
mark:
|
||||||
|
enable: true
|
||||||
|
subscript:
|
||||||
|
enable: true
|
||||||
|
superscript:
|
||||||
|
enable: true
|
||||||
highlight:
|
highlight:
|
||||||
|
# Enable code highlighting
|
||||||
codeFences: true
|
codeFences: true
|
||||||
noHl: false
|
noHl: false
|
||||||
lineNumbersInTable: false
|
lineNumbersInTable: false
|
||||||
|
@ -31,14 +49,16 @@ markup:
|
||||||
startLevel: 2
|
startLevel: 2
|
||||||
endLevel: 3
|
endLevel: 3
|
||||||
minify:
|
minify:
|
||||||
|
minifyOutput: true
|
||||||
tdewolff:
|
tdewolff:
|
||||||
html:
|
html:
|
||||||
keepComments: true
|
keepComments: true
|
||||||
|
keepSpecialComments: true
|
||||||
sitemap:
|
sitemap:
|
||||||
changefreq: weekly
|
changefreq: weekly
|
||||||
module:
|
module:
|
||||||
hugoVersion:
|
hugoVersion:
|
||||||
min: '0.122.0'
|
min: '0.126.0'
|
||||||
extended: true
|
extended: true
|
||||||
imports:
|
imports:
|
||||||
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
|
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
|
||||||
|
@ -62,6 +82,14 @@ security:
|
||||||
getenv:
|
getenv:
|
||||||
- ^HUGO_
|
- ^HUGO_
|
||||||
- ^WC_
|
- ^WC_
|
||||||
|
- ^HB_
|
||||||
|
outputFormats:
|
||||||
|
backlinks:
|
||||||
|
mediaType: application/json
|
||||||
|
baseName: backlinks
|
||||||
|
isPlainText: true
|
||||||
|
notAlternative: true
|
||||||
|
weight: 1
|
||||||
params:
|
params:
|
||||||
locale:
|
locale:
|
||||||
date_format: 'Jan 2, 2006'
|
date_format: 'Jan 2, 2006'
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
- id: related
|
- id: related
|
||||||
translation: Related
|
translation: Related
|
||||||
|
|
||||||
|
- id: backlinks
|
||||||
|
translation: Backlinks
|
||||||
|
|
||||||
- id: minute_read
|
- id: minute_read
|
||||||
translation: min read
|
translation: min read
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
{{- $u := urls.Parse .Destination -}}
|
||||||
|
{{- if or $u.IsAbs (strings.HasPrefix $u.String "#") }}
|
||||||
|
{{- /* do nothing */}}
|
||||||
|
{{- else }}
|
||||||
|
{{- with .PageInner.GetPage (strings.TrimPrefix "./" $u.Path) }}
|
||||||
|
{{- $source := dict
|
||||||
|
"date" ($.Page.Date.UTC.Format "2006-01-02T15:04:05-07:00")
|
||||||
|
"linkTitle" $.Page.LinkTitle
|
||||||
|
"permalink" $.Page.Permalink
|
||||||
|
"relPermalink" $.Page.RelPermalink
|
||||||
|
"section" $.Page.Section
|
||||||
|
"title" $.Page.Title
|
||||||
|
"type" $.Page.Type
|
||||||
|
}}
|
||||||
|
{{- $el := dict "source" $source "target" .RelPermalink }}
|
||||||
|
{{- site.Home.Store.Add "backlinks" (slice $el) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{{- $debug := false }}
|
||||||
|
{{- range site.Pages }}
|
||||||
|
{{- $noop := .WordCount }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $debug }}
|
||||||
|
{{- jsonify (dict "indent" " ") (.Store.Get "backlinks") }}
|
||||||
|
{{- else }}
|
||||||
|
{{- jsonify (dict "indent" " ") (dict "comment" "This file is intentionally empty.") }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{ $show_backlinks := .Params.backlinks | default true }}
|
||||||
|
{{ if $show_backlinks }}
|
||||||
|
{{- $debug := false }}
|
||||||
|
{{- $backlinks := site.Home.Store.Get "backlinks" | uniq }}
|
||||||
|
{{- with (where $backlinks "target" .RelPermalink) }}
|
||||||
|
<div class="backlinks">
|
||||||
|
<div class="mb-1 font-semibold tracking-tight">
|
||||||
|
{{ or (T "backlinks") "Backlinks" }}
|
||||||
|
</div>
|
||||||
|
<ul>
|
||||||
|
{{- range (sort . "source.linkTitle" "asc") }}
|
||||||
|
<li><a href="{{ .source.relPermalink }}" class="backlink">{{ .source.linkTitle }}</a></li>
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
{{- if $debug }}
|
||||||
|
<pre>{{ jsonify (dict "indent" " ") $backlinks }}</pre>
|
||||||
|
{{- end }}
|
||||||
|
{{ end }}
|
|
@ -38,6 +38,8 @@
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ partial "components/backlinks" . }}
|
||||||
|
|
||||||
{{ partial "functions/get_hook" (dict "hook" "toc-end" "context" .) }}
|
{{ partial "functions/get_hook" (dict "hook" "toc-end" "context" .) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
2
starters/blog/.github/workflows/publish.yaml
vendored
2
starters/blog/.github/workflows/publish.yaml
vendored
|
@ -1,7 +1,7 @@
|
||||||
name: Deploy website to GitHub Pages
|
name: Deploy website to GitHub Pages
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WC_HUGO_VERSION: '0.125.2'
|
WC_HUGO_VERSION: '0.126.1'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow every time you push to the `main` branch
|
# Trigger the workflow every time you push to the `main` branch
|
||||||
|
|
|
@ -57,7 +57,7 @@ permalinks:
|
||||||
categories: '/category/:slug/'
|
categories: '/category/:slug/'
|
||||||
disableAliases: true
|
disableAliases: true
|
||||||
outputs:
|
outputs:
|
||||||
home: [HTML, RSS, headers, redirects]
|
home: [HTML, RSS, headers, redirects, backlinks]
|
||||||
section: [HTML, RSS]
|
section: [HTML, RSS]
|
||||||
imaging:
|
imaging:
|
||||||
resampleFilter: lanczos
|
resampleFilter: lanczos
|
||||||
|
|
|
@ -11,6 +11,10 @@ Make sure to check out [uses.tech](https://uses.tech/) for a list of everyone's
|
||||||
|
|
||||||
I often get asked about what software or hardware I use, so this page will serve as a living document and a place to point curious readers to when I get asked.
|
I often get asked about what software or hardware I use, so this page will serve as a living document and a place to point curious readers to when I get asked.
|
||||||
|
|
||||||
|
## Website
|
||||||
|
|
||||||
|
- [Hugo Blox](https://hugoblox.com) (see the tutorial on [Getting Started](/blog/get-started/))
|
||||||
|
|
||||||
## Editor + Terminal
|
## Editor + Terminal
|
||||||
|
|
||||||
- [Visual Studio Code](https://code.visualstudio.com/) is my current editor
|
- [Visual Studio Code](https://code.visualstudio.com/) is my current editor
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.19
|
||||||
|
|
||||||
require (
|
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-plugin-netlify v1.1.2-0.20231125204555-f431a4a2c705
|
||||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240420214532-11a51f8e9f01
|
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240518201414-971f297e4612
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
build:
|
build:
|
||||||
hugo_version: '0.125.2'
|
hugo_version: '0.126.1'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
publish = "public"
|
publish = "public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.125.2"
|
HUGO_VERSION = "0.126.1"
|
||||||
GO_VERSION = "1.21.5"
|
GO_VERSION = "1.21.5"
|
||||||
NODE_VERSION = "21.1.0"
|
NODE_VERSION = "21.1.0"
|
||||||
HUGO_ENABLEGITINFO = "true"
|
HUGO_ENABLEGITINFO = "true"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: Deploy website to GitHub Pages
|
name: Deploy website to GitHub Pages
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WC_HUGO_VERSION: '0.125.2'
|
WC_HUGO_VERSION: '0.126.1'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow every time you push to the `main` branch
|
# Trigger the workflow every time you push to the `main` branch
|
||||||
|
|
|
@ -67,7 +67,7 @@ permalinks:
|
||||||
categories: '/category/:slug/'
|
categories: '/category/:slug/'
|
||||||
disableAliases: true
|
disableAliases: true
|
||||||
outputs:
|
outputs:
|
||||||
home: [HTML, RSS, WebAppManifest, headers, redirects]
|
home: [HTML, RSS, WebAppManifest, headers, redirects, backlinks]
|
||||||
page: [HTML]
|
page: [HTML]
|
||||||
section: [HTML, RSS]
|
section: [HTML, RSS]
|
||||||
imaging:
|
imaging:
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.15
|
||||||
|
|
||||||
require (
|
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-plugin-netlify v1.1.2-0.20240217212918-ae7f0c597978
|
||||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240420214532-11a51f8e9f01
|
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240518201414-971f297e4612
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
build:
|
build:
|
||||||
hugo_version: '0.125.2'
|
hugo_version: '0.126.1'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
publish = "public"
|
publish = "public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.125.2"
|
HUGO_VERSION = "0.126.1"
|
||||||
HUGO_ENABLEGITINFO = "true"
|
HUGO_ENABLEGITINFO = "true"
|
||||||
|
|
||||||
[context.production.environment]
|
[context.production.environment]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: Deploy website to GitHub Pages
|
name: Deploy website to GitHub Pages
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WC_HUGO_VERSION: '0.125.2'
|
WC_HUGO_VERSION: '0.126.1'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow every time you push to the `main` branch
|
# Trigger the workflow every time you push to the `main` branch
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.19
|
||||||
|
|
||||||
require (
|
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-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
|
||||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240420214532-11a51f8e9f01
|
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240518201414-971f297e4612
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
build:
|
build:
|
||||||
hugo_version: '0.125.2'
|
hugo_version: '0.126.1'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
publish = "public"
|
publish = "public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.125.2"
|
HUGO_VERSION = "0.126.1"
|
||||||
HUGO_ENABLEGITINFO = "true"
|
HUGO_ENABLEGITINFO = "true"
|
||||||
|
|
||||||
[context.production.environment]
|
[context.production.environment]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: Deploy website to GitHub Pages
|
name: Deploy website to GitHub Pages
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WC_HUGO_VERSION: '0.125.2'
|
WC_HUGO_VERSION: '0.126.1'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow every time you push to the `main` branch
|
# Trigger the workflow every time you push to the `main` branch
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.19
|
||||||
|
|
||||||
require (
|
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-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
|
||||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240420214532-11a51f8e9f01
|
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240518201414-971f297e4612
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
build:
|
build:
|
||||||
hugo_version: '0.125.2'
|
hugo_version: '0.126.1'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
publish = "public"
|
publish = "public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.125.2"
|
HUGO_VERSION = "0.126.1"
|
||||||
HUGO_ENABLEGITINFO = "true"
|
HUGO_ENABLEGITINFO = "true"
|
||||||
|
|
||||||
[context.production.environment]
|
[context.production.environment]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: Deploy website to GitHub Pages
|
name: Deploy website to GitHub Pages
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WC_HUGO_VERSION: '0.125.2'
|
WC_HUGO_VERSION: '0.126.1'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow every time you push to the `main` branch
|
# Trigger the workflow every time you push to the `main` branch
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.19
|
||||||
|
|
||||||
require (
|
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-plugin-netlify v1.1.2-0.20231125200520-804c70f7efb8
|
||||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240420214532-11a51f8e9f01
|
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240518201414-971f297e4612
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
build:
|
build:
|
||||||
hugo_version: '0.125.2'
|
hugo_version: '0.126.1'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
publish = "public"
|
publish = "public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.125.2"
|
HUGO_VERSION = "0.126.1"
|
||||||
HUGO_ENABLEGITINFO = "true"
|
HUGO_ENABLEGITINFO = "true"
|
||||||
|
|
||||||
[context.production.environment]
|
[context.production.environment]
|
||||||
|
|
Loading…
Reference in a new issue