mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-01-06 19:25:14 +01:00
Compare commits
5 commits
508cbef99d
...
a6d0923a1e
Author | SHA1 | Date | |
---|---|---|---|
|
a6d0923a1e | ||
|
728baf9dc0 | ||
|
3fb9b2e11a | ||
|
0d7b68fcb5 | ||
|
70fd49a584 |
10 changed files with 33 additions and 32 deletions
2
.github/workflows/build-test-site.yaml
vendored
2
.github/workflows/build-test-site.yaml
vendored
|
@ -44,7 +44,7 @@ jobs:
|
|||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: '0.120.4'
|
||||
hugo-version: '0.122.0'
|
||||
extended: true
|
||||
|
||||
- name: Build
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ $ga := site.Params.marketing.analytics.google_analytics | default site.GoogleAnalytics | default "" }}
|
||||
{{ $ga := site.Params.marketing.analytics.google_analytics | default "" }}
|
||||
|
||||
{{ if hugo.IsProduction | and $ga }}
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@ module github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind
|
|||
|
||||
go 1.19
|
||||
|
||||
require github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics v0.1.1
|
||||
require github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics v0.1.2
|
||||
|
|
|
@ -7,6 +7,20 @@ markup:
|
|||
attribute:
|
||||
block: true
|
||||
title: true
|
||||
extensions:
|
||||
passthrough:
|
||||
enable: true
|
||||
delimiters:
|
||||
block:
|
||||
- - \[
|
||||
- \]
|
||||
- - $$
|
||||
- $$
|
||||
inline:
|
||||
- - \(
|
||||
- \)
|
||||
- - $
|
||||
- $
|
||||
highlight:
|
||||
codeFences: true
|
||||
noHl: false
|
||||
|
@ -24,7 +38,7 @@ sitemap:
|
|||
changefreq: weekly
|
||||
module:
|
||||
hugoVersion:
|
||||
min: '0.119.0'
|
||||
min: '0.122.0'
|
||||
extended: true
|
||||
imports:
|
||||
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
|
||||
|
|
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
|
||||
|
||||
env:
|
||||
WC_HUGO_VERSION: '0.119.0'
|
||||
WC_HUGO_VERSION: '0.122.0'
|
||||
|
||||
on:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Hugo Documentation: https://gohugo.io/getting-started/configuration/#all-configuration-settings
|
||||
# This file is formatted using YAML syntax - learn more at https://learnxinyminutes.com/docs/yaml/
|
||||
|
||||
title: Creator's Blog (Hugo Theme) # Website name
|
||||
title: "Creator's Blog (Hugo Theme)" # Website name
|
||||
baseURL: 'https://example.com/' # Website URL
|
||||
|
||||
############################
|
||||
|
@ -70,11 +70,6 @@ taxonomies:
|
|||
author: authors
|
||||
markup:
|
||||
_merge: deep
|
||||
highlight:
|
||||
codeFences: true
|
||||
noHl: false
|
||||
noClasses: false
|
||||
lineNos: false
|
||||
related:
|
||||
threshold: 80
|
||||
includeNewer: true
|
||||
|
@ -88,3 +83,5 @@ security:
|
|||
_merge: deep
|
||||
sitemap:
|
||||
_merge: deep
|
||||
minify:
|
||||
_merge: deep
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# Navigation Links
|
||||
# To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
|
||||
# desired widget in your `content/home/` folder.
|
||||
# The weight parameter defines the order that the links will appear in.
|
||||
# The weight parameter defines the order that the links will appear in.
|
||||
|
||||
main:
|
||||
- name: Home
|
||||
|
|
|
@ -67,52 +67,44 @@ renders as
|
|||
|
||||
## Math
|
||||
|
||||
Hugo Blox Builder supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the `math` option in your `config/_default/params.yaml` file.
|
||||
Hugo Blox Builder supports a Markdown extension for $\LaTeX$ math. Enable math by setting the `math: true` option in your page's front matter, or enable math for your entire site by toggling math in your `config/_default/params.yaml` file:
|
||||
|
||||
To render _inline_ or _block_ math, wrap your LaTeX math with `{{</* math */>}}$...${{</* /math */>}}` or `{{</* math */>}}$$...$${{</* /math */>}}`, respectively.
|
||||
```yaml
|
||||
features:
|
||||
math:
|
||||
enable: true
|
||||
```
|
||||
|
||||
{{% callout note %}}
|
||||
We wrap the LaTeX math in the Hugo Blox _math_ shortcode to prevent Hugo rendering our math as Markdown.
|
||||
{{% /callout %}}
|
||||
To render _inline_ or _block_ math, wrap your LaTeX math with `$...$` or `$$...$$`, respectively.
|
||||
|
||||
Example **math block**:
|
||||
|
||||
```latex
|
||||
{{</* math */>}}
|
||||
$$
|
||||
\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}
|
||||
$$
|
||||
{{</* /math */>}}
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
{{< math >}}
|
||||
$$\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$
|
||||
{{< /math >}}
|
||||
|
||||
Example **inline math** `{{</* math */>}}$\nabla F(\mathbf{x}_{n})${{</* /math */>}}` renders as {{< math >}}$\nabla F(\mathbf{x}_{n})${{< /math >}}.
|
||||
Example **inline math** `$\nabla F(\mathbf{x}_{n})$` renders as $\nabla F(\mathbf{x}_{n})$.
|
||||
|
||||
Example **multi-line math** using the math linebreak (`\\`):
|
||||
|
||||
```latex
|
||||
{{</* math */>}}
|
||||
$$f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} & \text{if }k=1, \\
|
||||
1-p_{0}^{*} & \text{if }k=0.\end{cases}$$
|
||||
{{</* /math */>}}
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
{{< math >}}
|
||||
|
||||
$$
|
||||
f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} & \text{if }k=1, \\
|
||||
1-p_{0}^{*} & \text{if }k=0.\end{cases}
|
||||
$$
|
||||
|
||||
{{< /math >}}
|
||||
|
||||
## Code
|
||||
|
||||
Hugo Blox Builder utilises Hugo's Markdown extension for highlighting code syntax. The code theme can be selected in the `config/_default/params.yaml` file.
|
||||
|
|
|
@ -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.1.2-0.20231229233433-b290b27077b8
|
||||
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240128183758-3fb9b2e11ab0
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
publish = "public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.121.1"
|
||||
HUGO_VERSION = "0.122.0"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "21.1.0"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
Loading…
Reference in a new issue