diff --git a/README.md b/README.md index 64ab9db..0b13691 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Downside: LaTeX in post title is no longer supported. ### Site Parameters -The site specific parameters that this theme recognizes are: +`params` for this theme are: - `subtitle` string: If set, displayed under the main title. - `showPoweredBy` boolean: If `true`, display a shoutout to Hugo and this theme. @@ -111,7 +111,7 @@ Please see [`exampleSite/config.yaml`](https://github.com/loikein/hugo-tufte/blo - Layout parameters: (NEW) + For more information, see [Hugo's Lookup Order | Hugo](https://gohugo.io/templates/lookup-order/). + `type` string: If set to `book`, layout files in [./layouts/book/](https://github.com/loikein/hugo-tufte/tree/main/layouts/book) will be prioritised. - + `layout` string: If set, layout files with this same will be prioritised. + + `layout` string: If set, layout files with the name of this field's value will be prioritised. ### Shortcodes diff --git a/assets/scss/tufte.scss b/assets/scss/tufte.scss index 272232d..837c65a 100644 --- a/assets/scss/tufte.scss +++ b/assets/scss/tufte.scss @@ -60,7 +60,6 @@ html { } body { - width: 87.5%; margin-left: auto; margin-right: auto; padding-left: 12.5%; diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 1aa0e35..0ed9add 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -12,6 +12,8 @@ baseurl: "https://example.com/" # The title of your website (shown on all the pages) title: "Hugo-tufte Theme Example Site" canonifyurls: true +# Number of posts per page on the home page +paginate: 4 # Only modify the following if you know what you are doing markup: @@ -20,7 +22,6 @@ markup: unsafe: true highlight: noClasses: false - pygmentsUseClasses: true guessSyntax: true params: @@ -31,7 +32,7 @@ params: # Dark code highlighting codeblocksdark: false # Customize the indicator for margin notes - # Some suggestions: 💬, 💭, 📑, 🏷, ✍, 💡, 🧐, 📎, 📌 + # Some suggestions: ⊕, 💬, 💭, 📑, 🏷, ✍, 💡, 🧐, 📎, 📌 marginNoteInd: "⊕" # Your name or the name of you company # copyright: Copyright 2023 @@ -40,7 +41,7 @@ params: showPoweredBy: false # Site wide kill switch hidedate: false - # Site wide kill switch for Latex support + # Site wide kill switch for LaTeX support math: true KaTeXVersion: 0.16.4 KaTeXCDN: "//cdn.jsdelivr.net/npm" diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index e144d39..a97501c 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -1,3 +1,6 @@ --- title: Home --- +You can write more stuff here, for example: + +Welcome! diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md index a668e46..72b64aa 100644 --- a/exampleSite/content/about.md +++ b/exampleSite/content/about.md @@ -1,8 +1,8 @@ --- title: "About This Site" -hasMath: false +hasMath: false +_build: + list: never --- -Hello, I post random things here. - -This site is generated with [Hugo](https://gohugo.io/). This theme is a heavily modified version of [hugo-tufte](https://github.com/loikein/hugo-tufte), originally written by [Dave Liepmann, Edward Tufte, and various contributors](https://github.com/edwardtufte/tufte-css), then ported to Hugo by [shawnohare](https://github.com/shawnohare/hugo-tufte) and [slashformotion](https://github.com/slashformotion/hugo-tufte). +This is the example site for [hugo-tufte](https://github.com/loikein/hugo-tufte), a theme for the static site generator [Hugo](https://gohugo.io/). diff --git a/exampleSite/content/posts/blockquote.md b/exampleSite/content/posts/blockquote.md index eb1d65f..afcf999 100644 --- a/exampleSite/content/posts/blockquote.md +++ b/exampleSite/content/posts/blockquote.md @@ -1,10 +1,9 @@ -+++ -author = "Hiro Protagonist" -date = "2015-01-19T23:57:58-08:00" -hasMath = false -title = "Blockquotes" - -+++ +--- +author: Hiro Protagonist +date: '2015-01-19T23:57:58-08:00' +hasMath: false +title: Blockquotes +--- Below is a blockquote. @@ -34,4 +33,6 @@ And finally a blockquote with some markdown. > > Here's some example code: > -> return shell_exec("echo $input | $markdown_script"); +> ```sh +> return shell_exec("echo $input | $markdown_script"); +> ``` diff --git a/exampleSite/content/posts/more-maths.md b/exampleSite/content/posts/more-maths.md index a8b6c38..ff8911e 100644 --- a/exampleSite/content/posts/more-maths.md +++ b/exampleSite/content/posts/more-maths.md @@ -1,64 +1,65 @@ -+++ -math = true -meta = false -author = "AUTHOR NAME" -date = "2021-07-20T13:56:01-08:00" -type = "post" -title = "More math $\\xi_{(even-in-the-title-!)}$" -subtitle = "Wow this really works ! " -toc = true -categories = ["katex", "latex", "tufte-css"] -+++ -A compilation of $\LaTeX$ formulas... +--- +author: AUTHOR NAME +date: '2021-07-20T13:56:01-08:00' +type: post +title: More math +subtitle: 'Wow this really works !' +toc: true +math: true +categories: + - katex + - latex + - tufte-css +--- +A compilation of `$\LaTeX$` formulas... -## Matrix +## Matrix -
-$$ +`$$ \begin{matrix} \alpha& \beta^{*}\\ \gamma^{*}& \delta \end{matrix} -$$ -
+$$` -+ +` $$ \begin{bmatrix} \alpha& \beta^{*}\\ \gamma^{*}& \delta \end{bmatrix} $$ -
+` -+` $$ \begin{Vmatrix} \alpha& \beta^{*}\\ \gamma^{*}& \delta \end{Vmatrix} $$ -
+` ## Limits -$$ +`$$ \lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6} -$$ +$$` -$$ +`$$ \lim_{n \to \infty} \frac{1}{x^n} = 0 -$$ +$$` ## Various symbols - $$\lambda,\xi,\pi,\theta, - \mu,\Phi,\Omega,\Delta$$ \ No newline at end of file +`$$\lambda,\xi,\pi,\theta, +\mu,\Phi,\Omega,\Delta$$` diff --git a/exampleSite/content/posts/new.md b/exampleSite/content/posts/new.md index 1f8f2c0..2eb5eff 100644 --- a/exampleSite/content/posts/new.md +++ b/exampleSite/content/posts/new.md @@ -8,17 +8,17 @@ categories: - "test" --- -## First Heading +## First heading | Tables | Are | Cool | -|:----------|:-------------:|------:| +|:---------|:-------------:|------:| | col 1 is | left-aligned | $1600 | | col 2 is | centered | $12 | | col 3 is | right-aligned | $1 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus, consequatur aspernatur omnis iste. Voluptates, id inventore ea natus ab sed amet ipsa ratione sunt dignissimos. Soluta illum aliquid repellendus recusandae. -### Sub +### Sub heading Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio, perferendis saepe voluptatem a nesciunt architecto voluptas deleniti dolor tempora quasi quidem odit rem fugit magnam minima quam dolores vel id? diff --git a/exampleSite/content/posts/tufte-features.md b/exampleSite/content/posts/tufte-features.md index 5fccf7e..aac0f4b 100644 --- a/exampleSite/content/posts/tufte-features.md +++ b/exampleSite/content/posts/tufte-features.md @@ -1,6 +1,6 @@ --- author: Totally famous person -date: '2016-02-20T13:56:01-08:00' +date: '2023-04-16T16:03:45+0100' title: The big old test page subtitle: Fancy Subtitle meta: true @@ -9,6 +9,7 @@ toc: true # hideDate: true # hideReadTime: true categories: [katex, latex, tufte-css] +description: "If the description field is not empty, its contents will show in the home page instead of the first 140 characters of the post." --- ## New features