From c454c6f4ca015472f8b11a73fb6cdfbd3f3e9bcf Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 21 Jul 2021 20:23:55 +0200 Subject: [PATCH 01/75] Started refactoring --- README.md | 47 +++++------ archetypes/post.md | 2 +- exampleSite/config.toml | 16 ++-- .../content/_index.md | 0 exampleSite/content/post/tufte-features.md | 17 ++-- layouts/_default/baseof.html | 13 ++++ layouts/_default/home.html | 23 ++++++ layouts/_default/list.html | 3 +- layouts/_default/single.html | 8 ++ layouts/index.html | 38 +++++---- layouts/partials/content.header.html | 77 ++++++++++--------- layouts/partials/doctype.html | 2 - layouts/partials/header.html | 9 ++- layouts/partials/header.includes.html | 5 +- layouts/partials/math.html | 20 +---- layouts/partials/meta.html | 7 -- layouts/partials/subheader.html | 0 layouts/shortcodes/marginnote.html | 9 ++- static/js/main.js | 14 ++++ 19 files changed, 186 insertions(+), 124 deletions(-) rename layouts/partials/opengraph.html => exampleSite/content/_index.md (100%) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/home.html delete mode 100644 layouts/partials/doctype.html delete mode 100644 layouts/partials/meta.html delete mode 100644 layouts/partials/subheader.html create mode 100644 static/js/main.js diff --git a/README.md b/README.md index 1a26da7..0ebda94 100644 --- a/README.md +++ b/README.md @@ -5,25 +5,20 @@ Hugo-Tufte is a minimalist blog-like theme for the [static site generator Hugo](https://gohugo.io) that attempts to be a faithful implementation of the [Tufte-css](https://github.com/edwardtufte/tufte-css) project. -It supports mathematical typesetting via [MathJax](https://www.mathjax.org). +It supports mathematical typesetting via [katex](https://katex.org/). By utilizing copious partial templates the theme is largely customizable. ## State of Project -This theme is largely unmaintained. If there is a particular fork -that should be considered the primary project please submit a PR -updating the README, thanks! +This is a fork of the original [hugo-tufte](https://github.com/shawnohare/hugo-tufte); ## Math -Mathjax renders LaTeX written inside of markdown files. LaTeX can be -written more or less as normal, but inline and display environments that -start with `\` must be escaped. Some examples: +[katex](https://katex.org/) renders LaTeX written inside of markdown files. LaTeX can be +written more or less as normal. Some examples: -- `This $\LaTeX$ will be rendered inline.` -- `This \\(\LaTeX\\) will be rendered inline.` -- `A simple displayed equation: $$f(x, y) := e^{x^2 - y^2}.$$` -- `A simple displayed equation: \\[f(x, y) := e^{x^2 - y^2}.\\]` +- This `\\( \frac{1}{2} \\)` will be rendered inline. +- A simple displayed equation: `$$f(x, y) := e^{x^2 - y^2}.$$` There currently seems to be some weirdness with other environments, such as the `align` environment. These environments will render provided @@ -78,9 +73,9 @@ support all the features present in the - **Usage**: Accepts the named parameters `cite` and `footer`. - **Example**: ```html - {{% blockquote cite="www.shawnohare.com" footer="Shawn" %}} + {{< blockquote cite="www.shawnohare.com" footer="Shawn" >}} There is nothing more beautiful than an elegant mathematical proof. - {{% /blockquote %}}` + {{< /blockquote >}} ``` - `div` @@ -103,17 +98,20 @@ support all the features present in the styled epigraph will be used if the `type` parameter is set to `compact`. - **Example**: ``` - {{% epigraph pre="Author Writer, " cite="Math is Fun" %}} + {{< epigraph pre="Author Writer, " cite="Math is Fun" >}} This is an example of an epigraph with some math \\( \mathbb N \subseteq \mathbb R \\) to start the beginning of a section. - {{% /epigraph %}} + {{< /epigraph >}} ``` - `marginnote` - **Description**: Wrap text to produce a numberless margin note. - - Usage: `{{% marginnote %}}...{{% /marginnote %}}` - - **Example**: `{{% marginnote %}}Some marginnote{{% /marginnote%}}` + - Usage: `{{< marginnote >}}...{{< /marginnote >}}` + - **Example**: + ```html + {{< marginnote >}}Some marginnote{{< /marginnote>}} + ``` - `section` - **Description**: This shortcode is provided as a work-around for wrapping @@ -130,11 +128,14 @@ support all the features present in the - `sidenote` - **Description**: Wrap text to produce an automatically numbered sidenote. - **Usage**: identical to `marginnote` - `{{% sidenote %}}...{{% /sidenote %}}` - - **Example**: `{{% sidenote %}}Some sidenote{{% /sidenote %}}` + `{{< sidenote >}}...{{< /sidenote >}}` + - **Example**: + ```html + {{< sidenote >}}Some sidenote{{< /sidenote >}} + ``` -## Templates -TODO -- [ ] Describe the role of each template file, as commenting within the files - themselves seems to break the templates. + +#### TODO +- [ ] Describe the role of each template file. Commenting in template files works. +- [ ] Fix the F**ing css diff --git a/archetypes/post.md b/archetypes/post.md index 2454f9f..6ffe550 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -3,7 +3,7 @@ math = false meta = true toc = true author = "AUTHOR NAME" - +type = "post" +++ diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a1be4a1..d166384 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,9 +1,7 @@ -contentdir = "content" -layoutdir = "layouts" -publishdir = "public" -builddrafts = true +themesDir = "../../" + canonifyurls = true -baseurl = "https://github.com/shawnohare/hugo-tufte" +# baseurl = "https://github.com/shawnohare/hugo-tufte" theme = "hugo-tufte" title = "Hugo-tufte Theme Example Site" @@ -14,9 +12,11 @@ title = "Hugo-tufte Theme Example Site" tag = "tags" [params] + math = true subtitle = "Subtitle goes here." copyrightHolder = "Copyright Holder" showPoweredBy = true + hidedate = false # ----------------------------------------------------------------------- # Navigation menu @@ -55,3 +55,9 @@ title = "Hugo-tufte Theme Example Site" weight = -90 identifier = "twitter" url = "https://twitter.com" + + + +[markup] + [markup.goldmark] + unsafe = false \ No newline at end of file diff --git a/layouts/partials/opengraph.html b/exampleSite/content/_index.md similarity index 100% rename from layouts/partials/opengraph.html rename to exampleSite/content/_index.md diff --git a/exampleSite/content/post/tufte-features.md b/exampleSite/content/post/tufte-features.md index c467e2d..672bc6d 100644 --- a/exampleSite/content/post/tufte-features.md +++ b/exampleSite/content/post/tufte-features.md @@ -6,7 +6,7 @@ math = true title = "Hugo-Tufte Features" subtitle = "Fancy Subtitle" toc = true -categories = ["mathjax", "latex", "tufte-css"] +categories = ["katex", "latex", "tufte-css"] +++ @@ -16,23 +16,24 @@ of this theme. One of them is \\( \LaTeX \\) via MathJax. {{< section "begin" >}} ## A Bit About Mathematics -{{% epigraph pre="Shawn O'Hare, " cite="Math is Fun" %}} +{{< epigraph pre="Shawn O'Hare, " cite="Math is Fun" >}} This is an example of an epigraph with some math \\(\mathbb N \subseteq \mathbb R \\) to start the beginning of a section. -{{% /epigraph %}} +{{< /epigraph >}} ### Inline Some inline math: -{{% marginnote "mn-example" %}}This is a margin note.{{% /marginnote %}} -$e^{i \pi} = -1$ and \\(\sqrt{-1} = i \\) +{{< marginnote "mn-example" >}}This is a margin note.{{< /marginnote >}} +\\(e^{i \pi} = -1\\) + and \\(\sqrt{-1} = i \\) and \\( a_2 = 3 \\). ### Display And display math using escaped brackets `\\[`: -{{% sidenote "sn-example" %}}This is a sidenote!{{% /sidenote %}} +{{< sidenote "sn-example" >}}This is a sidenote!{{< /sidenote >}} \\[ -- \cdot_H -- \colon B(G,H) \times B(H, K) \to B(G, K), \quad ([X], [Y]) \mapsto [X \times_H Y]. \\] @@ -73,7 +74,7 @@ is produced from Some blockquotes. But first, we try to manually cite via This is between cite tags and has math: \\(e^x \\) -{{% blockquote cite="www.shawnohare.com" footer="Shawn O'Hare" %}} +{{< blockquote cite="www.shawnohare.com" footer="Shawn O'Hare" >}} This is a blockquote with two paragraphs, that employs the theme's `blockquote` shortcode. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. @@ -82,7 +83,7 @@ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. -{{% /blockquote %}} +{{< /blockquote >}} ### New thoughts diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..e5e69a3 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,13 @@ + + + {{- partial "header.html" . -}} + + + {{ block "main" . }}{{ end }} + + + + + \ No newline at end of file diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..a52757e --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,23 @@ + + +{{ define "main" }} + + + +
+
+ {{ partial "brand.html" . }} + {{ range first 5 .Site.Pages }} + {{ partial "content.header.html" . }} +

{{ .Summary }}

+ {{ if .Truncated }} +

Read On →

+ {{ end }} + {{ end }} + {{ partial "footer.html" . }} +
+
+ +{{ end }} \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e1625b7..a535b82 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,6 @@ -{{ partial "header.html" . }} + +{{ partial "header.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index faa1bd8..fda5daa 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,3 +1,11 @@ +{{/* + + This template render single pages + +*/}} + + + {{ partial "header.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 496e3c8..1bded08 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,17 +1,25 @@ -{{ partial "header.html" . }} - +{{ define "main" }}
-
-{{ partial "brand.html" . }} -{{ range first 5 .Site.Pages }} - {{ partial "content.header.html" . }} -

{{ .Summary }}

- {{ if .Truncated }} -

Read On →

- {{ end }} -{{ end }} -{{ partial "footer.html" . }} -
+
+ {{ partial "brand.html" . }} + {{ range where .Site.RegularPages "Type" "post"}} + +

+ {{ if .IsNode }} + {{ .Title}} + {{ else }} + {{ .Title }}{{ if .Draft }} :: Draft {{end}} + {{ end }} +

+ + +

{{ truncate 120 .Summary }}

+ {{/* {{ if .Truncated }} */}} +

Read On →

+ {{/* {{ end }} */}} + + {{ end }} + {{ partial "footer.html" . }} +
- - +{{ end }} \ No newline at end of file diff --git a/layouts/partials/content.header.html b/layouts/partials/content.header.html index 53fadb1..d47e048 100644 --- a/layouts/partials/content.header.html +++ b/layouts/partials/content.header.html @@ -1,39 +1,42 @@
-

- {{ if .IsNode }} - {{ .Title}} - {{ else }} - {{ .Title }}{{ if .Draft }} :: Draft {{end}} + +

+ {{ if .IsNode }} + {{ .Title}} + {{ else }} + {{ .Title }}{{ if .Draft }} :: Draft {{end}} + {{ end }} +

+ {{ if .IsPage }} + {{ if .Params.subtitle }} +

{{ .Params.subtitle }}

+ {{ end }} + {{ if or (eq .Type "post") (.Params.meta) }} + + {{ end }} {{ end }} - -{{ if .IsPage }} -{{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }} -{{ if or (eq .Type "post") (.Params.meta) }} - -{{ end }} -{{ end }} -
+ \ No newline at end of file diff --git a/layouts/partials/doctype.html b/layouts/partials/doctype.html deleted file mode 100644 index 6cab5bb..0000000 --- a/layouts/partials/doctype.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/layouts/partials/header.html b/layouts/partials/header.html index bc494d1..981da4b 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,7 +1,10 @@ -{{ partial "doctype.html" . }} {{ .Site.Title }} - {{ .Title }} - {{ partial "meta.html" . }} - {{ partial "opengraph.html" }} + + + + + {{ partial "header.includes.html" . }} diff --git a/layouts/partials/header.includes.html b/layouts/partials/header.includes.html index 0e6e8af..ab774f7 100644 --- a/layouts/partials/header.includes.html +++ b/layouts/partials/header.includes.html @@ -1,6 +1,6 @@ - + {{ if or .Params.math .IsHome }} - {{ partial "math.html" . }} + {{ partial "math.html" . }} {{ end }} @@ -23,6 +23,7 @@ + diff --git a/layouts/partials/math.html b/layouts/partials/math.html index 37f1595..caee35d 100644 --- a/layouts/partials/math.html +++ b/layouts/partials/math.html @@ -1,18 +1,4 @@ - + + + - diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html deleted file mode 100644 index 0c1120f..0000000 --- a/layouts/partials/meta.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -{{ hugo.Generator }} diff --git a/layouts/partials/subheader.html b/layouts/partials/subheader.html deleted file mode 100644 index e69de29..0000000 diff --git a/layouts/shortcodes/marginnote.html b/layouts/shortcodes/marginnote.html index 9de6d7b..57cc43e 100644 --- a/layouts/shortcodes/marginnote.html +++ b/layouts/shortcodes/marginnote.html @@ -1,3 +1,6 @@ -{{ $marginnoteDomIdSuffix := .Ordinal }} - -{{ .Inner }} +{{ $marginnoteDomIdSuffix := .Ordinal }} + + +{{ .Inner }} \ No newline at end of file diff --git a/static/js/main.js b/static/js/main.js new file mode 100644 index 0000000..4b7a7af --- /dev/null +++ b/static/js/main.js @@ -0,0 +1,14 @@ + \ No newline at end of file From 60ca637a08e8f9db6426a5eec870afc94d034e76 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 21 Jul 2021 23:03:28 +0200 Subject: [PATCH 02/75] Added contributing.md and code_of_conduct.md --- CONTRIBUTING.md | 66 ++++++++++++++++++++++ README.md | 2 +- code_of_conduct.md | 134 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md create mode 100644 code_of_conduct.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ef0b024 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,66 @@ +# Introduction + +> First off, thank you for considering contributing to Hugo-Tufte! + + +# Ground Rules + +- Respect the [Code of conduct]() +- ***If you just have a question use this [Discussion](https://github.com/slashformotion/hugo-tufte/discussions).*** + + +# How to report a bug + +### Tell your contributors how to file a bug report. +You can even include a template so people can just copy-paste (again, less work for you). + +When filing an issue, make sure to answer these five questions: + +1. What version of Go are you using (`$ go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + + +# How to suggest a feature or enhancement + +If you find yourself wishing for a feature that doesn't exist in hugo-tufte, you are probably not alone. There are bound to be others out there with similar needs. Open an issue on our issues list on GitHub which describes the feature you would like to see, why you need it, and how it should work. + +# Your First Contribution + +
+ +![](https://media.giphy.com/media/3oEduFYRfaeS6KViN2/giphy.gif) + +
+ +Learn how pull request works here: +- https://makeapullrequest.com +- http://www.firsttimersonly.com/ + +> Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). + + + +>At this point, you're ready to make your changes! Feel free to ask for help [here](https://github.com/slashformotion/hugo-tufte/discussions); everyone is a beginner at first :smile_cat: +> +>If a maintainer **(me)** asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge. + +# Getting started to contribute with code + +1. Create your own fork of the code +2. Do the changes in your fork +3. If you like the change and think the project could use it: + * Be sure that you didn't break anything. + +
+ +![](https://media.giphy.com/media/3o7btNa0RUYa5E7iiQ/giphy-downsized.gif) + +
+ + +# Community + +You can chat with me [here](https://github.com/slashformotion/hugo-tufte/discussions). diff --git a/README.md b/README.md index 0ebda94..4665a2b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Tufte Hugo Theme - +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md) Hugo-Tufte is a minimalist blog-like theme for the [static site generator Hugo](https://gohugo.io) that diff --git a/code_of_conduct.md b/code_of_conduct.md new file mode 100644 index 0000000..d8e2efa --- /dev/null +++ b/code_of_conduct.md @@ -0,0 +1,134 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[INSERT CONTACT METHOD]. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations + From 5bec649819fc5ba278b79213d5a910f7ccc3b76e Mon Sep 17 00:00:00 2001 From: slashformotion <45801817+slashformotion@users.noreply.github.com> Date: Sat, 24 Jul 2021 11:52:48 +0200 Subject: [PATCH 03/75] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 53f59069e8361d03ee0e06a58a847d85bb176575 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sat, 24 Jul 2021 12:02:20 +0200 Subject: [PATCH 04/75] Update template --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++--------------- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..d4a4537 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,13 +2,22 @@ name: Bug report about: Create a report to help us improve title: '' -labels: '' +labels: triage assignees: '' --- -**Describe the bug** -A clear and concise description of what the bug is. +## What version of Go are you using (`$ hugo version`)? + +## What operating system and processor architecture are you using? + +## What did you do? + +## What did you expect to see? + +## What did you see instead? + +## Optional (best if completed) **To Reproduce** Steps to reproduce the behavior: @@ -17,22 +26,3 @@ Steps to reproduce the behavior: 3. Scroll down to '....' 4. See error -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..11fc491 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: '' +labels: enhancement assignees: '' --- From b682f1d8c3ba00110d27ea90123bb3c87ca4ed9a Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:03:10 +0200 Subject: [PATCH 05/75] Fix bloquotes --- layouts/shortcodes/blockquote.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/blockquote.html b/layouts/shortcodes/blockquote.html index e00389c..b396406 100644 --- a/layouts/shortcodes/blockquote.html +++ b/layouts/shortcodes/blockquote.html @@ -1,4 +1,6 @@
- {{ .Inner }} +

+ {{ .Inner }} +

{{ .Get "footer" }}
-
+ \ No newline at end of file From c396f150c967d03db6d6f7e2ae012d49369df6e3 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:04:01 +0200 Subject: [PATCH 06/75] added hr to brand --- layouts/partials/brand.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html index 61262f4..a0c84e3 100644 --- a/layouts/partials/brand.html +++ b/layouts/partials/brand.html @@ -2,4 +2,5 @@

{{ .Site.Title}}

{{ .Site.Params.subtitle }}

{{ partial "nav.html" . }} +
From c2651830a6b29f64501882fa32fb3d16d0dab495 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:04:41 +0200 Subject: [PATCH 07/75] syntax hilighting --- exampleSite/config.toml | 11 +++++++++-- layouts/partials/header.includes.html | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index d166384..168f641 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,7 +4,7 @@ canonifyurls = true # baseurl = "https://github.com/shawnohare/hugo-tufte" theme = "hugo-tufte" title = "Hugo-tufte Theme Example Site" - +pygmentsUseClasses=true [taxonomies] category = "categories" group = "groups" @@ -39,6 +39,12 @@ title = "Hugo-tufte Theme Example Site" weight = -90 identifier = "categories" url = "/categories" +[[menu.nav]] + name = "About" + pre = " " + weight = -80 + identifier = "about" + url = "/about" # ----------------------------------------------------------------------- # Footer menu @@ -60,4 +66,5 @@ title = "Hugo-tufte Theme Example Site" [markup] [markup.goldmark] - unsafe = false \ No newline at end of file + [markup.goldmark.renderer] + unsafe = true diff --git a/layouts/partials/header.includes.html b/layouts/partials/header.includes.html index ab774f7..ef6c33d 100644 --- a/layouts/partials/header.includes.html +++ b/layouts/partials/header.includes.html @@ -28,3 +28,5 @@ + + From 1bb3a4def462e08f215004873f3a6d0c4120062a Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:04:57 +0200 Subject: [PATCH 08/75] fixed list view --- layouts/_default/list.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a535b82..ae3c150 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,5 @@ +{{ define "main" }} - -{{ partial "header.html" . }} -
{{ partial "brand.html" . }} @@ -33,5 +31,5 @@ {{ partial "footer.html" . }}
- - + +{{ end }} \ No newline at end of file From cb01b32951c8906712b4431ed77d61ef5024e378 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:05:22 +0200 Subject: [PATCH 09/75] chores --- .gitignore | 1 + CONTRIBUTING.md | 2 +- README.md | 23 +++++++++++------------ 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b8a2b37 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +exempleSite/public/* \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef0b024..03ec608 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ You can even include a template so people can just copy-paste (again, less work When filing an issue, make sure to answer these five questions: -1. What version of Go are you using (`$ go version`)? +1. What version of Go are you using (`$ hugo version`)? 2. What operating system and processor architecture are you using? 3. What did you do? 4. What did you expect to see? diff --git a/README.md b/README.md index 4665a2b..03c2783 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,13 @@ By utilizing copious partial templates the theme is largely customizable. ## State of Project -This is a fork of the original [hugo-tufte](https://github.com/shawnohare/hugo-tufte); +This is a fork of the original [hugo-tufte](https://github.com/shawnohare/hugo-tufte). -## Math + + +## Features + +### Math [katex](https://katex.org/) renders LaTeX written inside of markdown files. LaTeX can be written more or less as normal. Some examples: @@ -21,7 +25,7 @@ written more or less as normal. Some examples: - A simple displayed equation: `$$f(x, y) := e^{x^2 - y^2}.$$` There currently seems to be some weirdness with other environments, -such as the `align` environment. These environments will render provided +such as the `aligned` environment (`align*` is not supported by katex). These environments will render provided they are wrapped in `

` tags and blank lines. The snippet below should render correctly. ``` @@ -40,7 +44,7 @@ an involution, hence for any $x$, $y$ in $G$ we have: establishing that $G$ is abelian. ``` -## Site Parameters +### Site Parameters The site specific parameters that this theme recognizes are: @@ -49,7 +53,7 @@ The site specific parameters that this theme recognizes are: - `copyrightHolder` string: Inserts the value in the default copyright notice. - `copyright` string: Custom copyright notice. -## Page Parameters +### Page Parameters - `hideDate` boolean: if true, do not display a page date. When `meta` is set to true, `hideDate` takes greater precedence. @@ -61,7 +65,7 @@ The site specific parameters that this theme recognizes are: (i.e., pages of type "post") ignore this parameter. - `toc` boolean: if true, display the table of contents for the page. -## Shortcodes +### Shortcodes This theme provides the following shortcodes in an attempt to completely support all the features present in the @@ -97,7 +101,7 @@ support all the features present in the make no styling assumptions, so spacing is important. A more compactly styled epigraph will be used if the `type` parameter is set to `compact`. - **Example**: - ``` + ```html {{< epigraph pre="Author Writer, " cite="Math is Fun" >}} This is an example of an epigraph with some math \\( \mathbb N \subseteq \mathbb R \\) @@ -134,8 +138,3 @@ support all the features present in the {{< sidenote >}}Some sidenote{{< /sidenote >}} ``` - - -#### TODO -- [ ] Describe the role of each template file. Commenting in template files works. -- [ ] Fix the F**ing css From 7038e4ff89d53dcbf05cc151d7a8a91c4bf0f96e Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:05:32 +0200 Subject: [PATCH 10/75] css update --- static/css/hugo-tufte.css | 58 ++-- static/css/syntax.css | 82 ++++++ static/css/tufte.css | 555 +++++++++++++++++++++++++------------- 3 files changed, 481 insertions(+), 214 deletions(-) create mode 100644 static/css/syntax.css diff --git a/static/css/hugo-tufte.css b/static/css/hugo-tufte.css index 25ac266..6d61172 100644 --- a/static/css/hugo-tufte.css +++ b/static/css/hugo-tufte.css @@ -4,6 +4,8 @@ /* accomodate a blog-like site. */ /* ------------------------------------------------------------------------ */ +@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@351&display=swap'); + /* When setting the primary font stack, apply it to the Pure grid units along */ /* with `html`, `button`, `input`, `select`, and `textarea`. Pure Grids use */ /* specific font stacks to ensure the greatest OS/browser compatibility. */ @@ -18,16 +20,27 @@ html, button, input, select, textarea, p, nav, section, article, header, footer, }*/ code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-family: "Fira Code", Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 1.125rem; line-height: 1.6; } +div.highlight{ + /* width: 52.5%; */ +} +/* blockquote { + width: 52.5%; + +} */ +div.highlight::hover{ + width: 100%; +} + pre code { width: 52.5%; - font-size: 1.2rem; - padding-left: 2.5%; display: block; + font-size: 1rem; + padding-left: 2.5%; overflow-x: scroll; } @@ -187,7 +200,22 @@ h1.content-title a:focus { } table { + margin-top: 1em; font-size: 1.4rem; + width: auto; /* making booktabs style tables the unstyled default in case someone uses Markdown styling */ + /* margin: 0 auto; */ + /* border-spacing: 0px; */ + border-top: 2px solid #111; + border-bottom: 2px solid #111; +} + +th, td{ + font-size: 1.25rem; + line-height: 1.71428571; +} + +td { + padding-right: 0.75em; } /* Footer, but with a different name to avoid conflicts with tufte.css */ @@ -259,27 +287,3 @@ details summary.year { details[open] summary { } - - -/* ------------------------------------------------------------------------ */ -/* MathJax styling -/* ------------------------------------------------------------------------ */ -.MathJax { - font: inherit; - color: inherit; - font-size: 100%; - background: inherit; - border: inherit; -} - -.MathJax_Display { - font: inherit; - color: inherit; - font-size: 100%; - background: inherit; - border: inherit; - padding-bottom: 1rem; - /* max-width: 45rem; */ - overflow-x: auto; - overflow-y: auto; -} diff --git a/static/css/syntax.css b/static/css/syntax.css new file mode 100644 index 0000000..20458cb --- /dev/null +++ b/static/css/syntax.css @@ -0,0 +1,82 @@ +/* Background */ .chroma { background-color: #ffffff } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Keyword */ .chroma .k { font-weight: bold } +/* KeywordConstant */ .chroma .kc { font-weight: bold } +/* KeywordDeclaration */ .chroma .kd { font-weight: bold; font-style: italic } +/* KeywordNamespace */ .chroma .kn { font-weight: bold } +/* KeywordPseudo */ .chroma .kp { font-weight: bold } +/* KeywordReserved */ .chroma .kr { font-weight: bold } +/* KeywordType */ .chroma .kt { font-weight: bold } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { } +/* NameBuiltin */ .chroma .nb { font-weight: bold; font-style: italic } +/* NameBuiltinPseudo */ .chroma .bp { font-weight: bold; font-style: italic } +/* NameClass */ .chroma .nc { color: #666666; font-weight: bold; font-style: italic } +/* NameConstant */ .chroma .no { color: #666666; font-weight: bold; font-style: italic } +/* NameDecorator */ .chroma .nd { } +/* NameEntity */ .chroma .ni { } +/* NameException */ .chroma .ne { } +/* NameFunction */ .chroma .nf { color: #666666; font-weight: bold; font-style: italic } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { } +/* NameNamespace */ .chroma .nn { color: #666666; font-weight: bold; font-style: italic } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { } +/* NameVariable */ .chroma .nv { color: #666666; font-weight: bold; font-style: italic } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #666666; font-style: italic } +/* LiteralStringAffix */ .chroma .sa { color: #666666; font-style: italic } +/* LiteralStringBacktick */ .chroma .sb { color: #666666; font-style: italic } +/* LiteralStringChar */ .chroma .sc { color: #666666; font-style: italic } +/* LiteralStringDelimiter */ .chroma .dl { color: #666666; font-style: italic } +/* LiteralStringDoc */ .chroma .sd { color: #666666; font-style: italic } +/* LiteralStringDouble */ .chroma .s2 { color: #666666; font-style: italic } +/* LiteralStringEscape */ .chroma .se { color: #666666; font-style: italic } +/* LiteralStringHeredoc */ .chroma .sh { color: #666666; font-style: italic } +/* LiteralStringInterpol */ .chroma .si { color: #666666; font-style: italic } +/* LiteralStringOther */ .chroma .sx { color: #666666; font-style: italic } +/* LiteralStringRegex */ .chroma .sr { color: #666666; font-style: italic } +/* LiteralStringSingle */ .chroma .s1 { color: #666666; font-style: italic } +/* LiteralStringSymbol */ .chroma .ss { color: #666666; font-style: italic } +/* LiteralNumber */ .chroma .m { } +/* LiteralNumberBin */ .chroma .mb { } +/* LiteralNumberFloat */ .chroma .mf { } +/* LiteralNumberHex */ .chroma .mh { } +/* LiteralNumberInteger */ .chroma .mi { } +/* LiteralNumberIntegerLong */ .chroma .il { } +/* LiteralNumberOct */ .chroma .mo { } +/* Operator */ .chroma .o { } +/* OperatorWord */ .chroma .ow { font-weight: bold } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #888888; font-style: italic } +/* CommentHashbang */ .chroma .ch { color: #888888; font-style: italic } +/* CommentMultiline */ .chroma .cm { color: #888888; font-style: italic } +/* CommentSingle */ .chroma .c1 { color: #888888; font-style: italic } +/* CommentSpecial */ .chroma .cs { color: #888888; font-weight: bold } +/* CommentPreproc */ .chroma .cp { color: #888888; font-weight: bold } +/* CommentPreprocFile */ .chroma .cpf { color: #888888; font-weight: bold } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { } +/* GenericEmph */ .chroma .ge { } +/* GenericError */ .chroma .gr { } +/* GenericHeading */ .chroma .gh { } +/* GenericInserted */ .chroma .gi { } +/* GenericOutput */ .chroma .go { } +/* GenericPrompt */ .chroma .gp { } +/* GenericStrong */ .chroma .gs { } +/* GenericSubheading */ .chroma .gu { } +/* GenericTraceback */ .chroma .gt { } +/* GenericUnderline */ .chroma .gl { } +/* TextWhitespace */ .chroma .w { } diff --git a/static/css/tufte.css b/static/css/tufte.css index a3f2932..cc27a92 100644 --- a/static/css/tufte.css +++ b/static/css/tufte.css @@ -6,269 +6,450 @@ @font-face { font-family: "et-book"; src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot"); - src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg"); + src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), + url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), + url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), + url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg"); font-weight: normal; - font-style: normal + font-style: normal; } @font-face { font-family: "et-book"; src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot"); - src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") format("svg"); + src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") + format("embedded-opentype"), + url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"), + url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") + format("truetype"), + url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") + format("svg"); font-weight: normal; - font-style: italic + font-style: italic; } @font-face { font-family: "et-book"; src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot"); - src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg"); + src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), + url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), + url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), + url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg"); font-weight: bold; - font-style: normal + font-style: normal; } @font-face { font-family: "et-book-roman-old-style"; src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot"); - src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg"); + src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") + format("embedded-opentype"), + url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), + url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), + url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg"); font-weight: normal; font-style: normal; } /* Tufte CSS styles */ -html { font-size: 15px; } +html { + font-size: 15px; +} -body { width: 87.5%; - margin-left: auto; - margin-right: auto; - padding-left: 12.5%; - font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; - background-color: #fffff8; - color: #111; - max-width: 1400px; - counter-reset: sidenote-counter; } +body { + width: 87.5%; + margin-left: auto; + margin-right: auto; + padding-left: 12.5%; + font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; + background-color: #fffff8; + color: #111; + max-width: 1400px; + counter-reset: sidenote-counter; +} -h1 { font-weight: 400; - margin-top: 4rem; - margin-bottom: 1.5rem; - font-size: 3.2rem; - line-height: 1; } +h1 { + font-weight: 400; + margin-top: 4rem; + margin-bottom: 1.5rem; + font-size: 3.2rem; + line-height: 1; +} -h2 { font-style: italic; - font-weight: 400; - margin-top: 2.1rem; - margin-bottom: 0; - font-size: 2.2rem; - line-height: 1; } +h2 { + font-style: italic; + font-weight: 400; + margin-top: 2.1rem; + margin-bottom: 0; + font-size: 2.2rem; + line-height: 1; +} -h3 { font-style: italic; - font-weight: 400; - font-size: 1.7rem; - margin-top: 2rem; - margin-bottom: 0; - line-height: 1; } +h3 { + font-style: italic; + font-weight: 400; + font-size: 1.7rem; + margin-top: 2rem; + margin-bottom: 0; + line-height: 1; +} -p.subtitle { font-style: italic; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 1.8rem; - display: block; - line-height: 1; } +p.subtitle { + font-style: italic; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 1.8rem; + display: block; + line-height: 1; +} -.numeral { font-family: et-book-roman-old-style; } +.numeral { + font-family: et-book-roman-old-style; +} -.danger { color: red; } +.danger { + color: red; +} -article { position: relative; - padding: 5rem 0rem; } +article { + position: relative; + padding: 5rem 0rem; +} -section { padding-top: 1rem; - padding-bottom: 1rem; } +section { + padding-top: 1rem; + padding-bottom: 1rem; +} -p, ol, ul { font-size: 1.4rem; } +p, +ol, +ul { + font-size: 1.4rem; +} -p { line-height: 2rem; - margin-top: 1.4rem; - margin-bottom: 1.4rem; - padding-right: 0; - vertical-align: baseline; } +p { + line-height: 2rem; + margin-top: 1.4rem; + margin-bottom: 1.4rem; + padding-right: 0; + vertical-align: baseline; +} /* Chapter Epigraphs */ -div.epigraph { margin: 5em 0; } +div.epigraph { + margin: 5em 0; +} -div.epigraph > blockquote { margin-top: 3em; - margin-bottom: 3em; } +div.epigraph > blockquote { + margin-top: 3em; + margin-bottom: 3em; +} -div.epigraph > blockquote, div.epigraph > blockquote > p { font-style: italic; } +div.epigraph > blockquote, +div.epigraph > blockquote > p { + font-style: italic; +} -div.epigraph > blockquote > footer { font-style: normal; } +div.epigraph > blockquote > footer { + font-style: normal; +} -div.epigraph > blockquote > footer > cite { font-style: italic; } +div.epigraph > blockquote > footer > cite { + font-style: italic; +} /* end chapter epigraphs styles */ -blockquote { font-size: 1.4rem; } +blockquote { + font-size: 1.4rem; +} -blockquote p { width: 50%; } +blockquote p { + width: 50%; +} -blockquote footer { width: 50%; - font-size: 1.1rem; - text-align: right; } +blockquote footer { + width: 50%; + font-size: 1.1rem; + text-align: right; +} -ol, ul { width: 45%; - -webkit-padding-start: 5%; - -webkit-padding-end: 5%; } +ol, +ul { + width: 45%; + -webkit-padding-start: 5%; + -webkit-padding-end: 5%; +} -li { padding: 0.5rem 0; } +li { + padding: 0.5rem 0; +} -figure { padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; - max-width: 55%; - -webkit-margin-start: 0; - -webkit-margin-end: 0; - margin: 0 0 3em 0; } +figure { + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + max-width: 55%; + -webkit-margin-start: 0; + -webkit-margin-end: 0; + margin: 0 0 3em 0; +} -figcaption { float: right; - clear: right; - margin-right: -48%; - margin-top: 0; - margin-bottom: 0; - font-size: 1.1rem; - line-height: 1.6; - vertical-align: baseline; - position: relative; - max-width: 40%; } +figcaption { + float: right; + clear: right; + margin-right: -48%; + margin-top: 0; + margin-bottom: 0; + font-size: 1.1rem; + line-height: 1.6; + vertical-align: baseline; + position: relative; + max-width: 40%; +} -figure.fullwidth figcaption { margin-right: 24%; } +figure.fullwidth figcaption { + margin-right: 24%; +} /* Links: replicate underline that clears descenders */ -a:link, a:visited { color: inherit; } +a:link, +a:visited { + color: inherit; +} -a:link { text-decoration: none; - background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#333, #333); - background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(#333, #333); - -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; - -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; - background-size: 0.05em 1px, 0.05em 1px, 1px 1px; - background-repeat: no-repeat, no-repeat, repeat-x; - text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, -0.15em 0 #fffff8; - background-position: 0% 93%, 100% 93%, 0% 93%; } +a:link { + text-decoration: none; + background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), + -webkit-linear-gradient(#333, #333); + background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(#333, #333); + -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + background-repeat: no-repeat, no-repeat, repeat-x; + text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, + -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, + -0.15em 0 #fffff8; + background-position: 0% 93%, 100% 93%, 0% 93%; +} -@media screen and (-webkit-min-device-pixel-ratio: 0) { a:link { background-position-y: 87%, 87%, 87%; } } +@media screen and (-webkit-min-device-pixel-ratio: 0) { + a:link { + background-position-y: 87%, 87%, 87%; + } +} -a:link::selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe; - background: #b4d5fe; } +a:link::selection { + text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, + -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, + -0.15em 0 #b4d5fe; + background: #b4d5fe; +} -a:link::-moz-selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe; - background: #b4d5fe; } +a:link::-moz-selection { + text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, + -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, + -0.15em 0 #b4d5fe; + background: #b4d5fe; +} /* Sidenotes, margin notes, figures, captions */ -img { max-width: 100%; } +img { + max-width: 100%; +} -.sidenote, .marginnote { float: right; - clear: right; - margin-right: -60%; - width: 50%; - margin-top: 0; - margin-bottom: 0; - font-size: 1.1rem; - line-height: 1.3; - vertical-align: baseline; - position: relative; } +.sidenote, +.marginnote { + float: right; + clear: right; + margin-right: -60%; + width: 50%; + margin-top: 0; + margin-bottom: 0; + font-size: 1.1rem; + line-height: 1.3; + vertical-align: baseline; + position: relative; +} -.table-caption { float:right; - clear:right; - margin-right: -60%; - width: 50%; - margin-top: 0; - margin-bottom: 0; - font-size: 1.0rem; - line-height: 1.6; } +.table-caption { + float: right; + clear: right; + margin-right: -60%; + width: 50%; + margin-top: 0; + margin-bottom: 0; + font-size: 1rem; + line-height: 1.6; +} -.sidenote-number { counter-increment: sidenote-counter; } +.sidenote-number { + counter-increment: sidenote-counter; +} -.sidenote-number:after, .sidenote:before { content: counter(sidenote-counter) " "; - font-family: et-book-roman-old-style; - position: relative; - vertical-align: baseline; } +.sidenote-number:after, +.sidenote:before { + content: counter(sidenote-counter) " "; + font-family: et-book-roman-old-style; + position: relative; + vertical-align: baseline; +} -.sidenote-number:after { content: counter(sidenote-counter); - font-size: 1rem; - top: -0.5rem; - left: 0.1rem; } +.sidenote-number:after { + content: counter(sidenote-counter); + font-size: 1rem; + top: -0.5rem; + left: 0.1rem; +} -.sidenote:before { content: counter(sidenote-counter) " "; - top: -0.5rem; } +.sidenote:before { + content: counter(sidenote-counter) " "; + top: -0.5rem; +} -p, footer, table, div.table-wrapper-small, div.supertable-wrapper > p, div.booktabs-wrapper { width: 55%; } +p, +footer, +table, +div.table-wrapper-small, +div.supertable-wrapper > p, +div.booktabs-wrapper { + width: 55%; +} -div.fullwidth, table.fullwidth { width: 100%; } +div.fullwidth, +table.fullwidth { + width: 100%; +} -div.table-wrapper { overflow-x: scroll; - font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif; } +div.table-wrapper { + overflow-x: scroll; + font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif; +} -@media screen and (max-width: 760px) { p, footer { width: 90%; } - pre.code { width: 87.5%; } - ul { width: 85%; } - figure { max-width: 90%; } - figcaption, figure.fullwidth figcaption { margin-right: 0%; - max-width: none; } - blockquote p, blockquote footer { width: 90%; }} +@media screen and (max-width: 760px) { + p, + footer { + width: 90%; + } + pre.code { + width: 87.5%; + } + ul { + width: 85%; + } + figure { + max-width: 90%; + } + figcaption, + figure.fullwidth figcaption { + margin-right: 0%; + max-width: none; + } + blockquote p, + blockquote footer { + width: 90%; + } +} -.sans { font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; - letter-spacing: .03em; } +.sans { + font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; + letter-spacing: 0.03em; +} -.code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 1.125rem; - line-height: 1.6; } +.code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1.125rem; + line-height: 1.6; +} -h1 .code, h2 .code, h3 .code { font-size: 0.80em; } +h1 .code, +h2 .code, +h3 .code { + font-size: 0.8em; +} -.marginnote .code, .sidenote .code { font-size: 1rem; } +.marginnote .code, +.sidenote .code { + font-size: 1rem; +} -pre.code { width: 52.5%; - padding-left: 2.5%; - overflow-x: scroll; } +pre.code { + width: 52.5%; + padding-left: 2.5%; + overflow-x: scroll; +} -.fullwidth { max-width: 90%; - clear:both; } +.fullwidth { + max-width: 90%; + clear: both; +} -span.newthought { font-variant: small-caps; - font-size: 1.2em; } +span.newthought { + font-variant: small-caps; + font-size: 1.2em; +} -input.margin-toggle { display: none; } +input.margin-toggle { + display: none; +} -label.sidenote-number { display: inline; } +label.sidenote-number { + display: inline; +} -label.margin-toggle:not(.sidenote-number) { display: none; } +label.margin-toggle:not(.sidenote-number) { + display: none; +} -@media (max-width: 760px) { label.margin-toggle:not(.sidenote-number) { display: inline; } - .sidenote, .marginnote { display: none; } - .margin-toggle:checked + .sidenote, - .margin-toggle:checked + .marginnote { display: block; - float: left; - left: 1rem; - clear: both; - width: 95%; - margin: 1rem 2.5%; - vertical-align: baseline; - position: relative; } - label { cursor: pointer; } - pre.code { width: 90%; - padding: 0; } - .table-caption { display: block; - float: right; - clear: both; - width: 98%; - margin-top: 1rem; - margin-bottom: 0.5rem; - margin-left: 1%; - margin-right: 1%; - vertical-align: baseline; - position: relative; } - div.table-wrapper, table, table.booktabs { width: 85%; } - div.table-wrapper { border-right: 1px solid #efefef; } - img { width: 100%; } } +@media (max-width: 760px) { + label.margin-toggle:not(.sidenote-number) { + display: inline; + } + .sidenote, + .marginnote { + display: none; + } + .margin-toggle:checked + .sidenote, + .margin-toggle:checked + .marginnote { + display: block; + float: left; + left: 1rem; + clear: both; + width: 95%; + margin: 1rem 2.5%; + vertical-align: baseline; + position: relative; + } + label { + cursor: pointer; + } + pre.code { + width: 90%; + padding: 0; + } + .table-caption { + display: block; + float: right; + clear: both; + width: 98%; + margin-top: 1rem; + margin-bottom: 0.5rem; + margin-left: 1%; + margin-right: 1%; + vertical-align: baseline; + position: relative; + } + div.table-wrapper, + table, + table.booktabs { + width: 85%; + } + div.table-wrapper { + border-right: 1px solid #efefef; + } + img { + width: 100%; + } +} From 0d5b11675006137668533658f768d9ac2a13ac8c Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:06:30 +0200 Subject: [PATCH 11/75] exampleSite updated --- exampleSite/content/about.md | 6 ++ exampleSite/content/page/about.md | 6 -- exampleSite/content/post/more-maths.md | 64 ++++++++++++++++++++++ exampleSite/content/post/new.md | 6 ++ exampleSite/content/post/old.md | 26 --------- exampleSite/content/post/tufte-features.md | 27 +++++---- 6 files changed, 93 insertions(+), 42 deletions(-) create mode 100644 exampleSite/content/about.md delete mode 100644 exampleSite/content/page/about.md create mode 100644 exampleSite/content/post/more-maths.md delete mode 100644 exampleSite/content/post/old.md diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md new file mode 100644 index 0000000..48e7c50 --- /dev/null +++ b/exampleSite/content/about.md @@ -0,0 +1,6 @@ ++++ +title = "About This Site" +hasMath = false ++++ + +Hello, I'm an example site that uses the Hugo Tufte theme. diff --git a/exampleSite/content/page/about.md b/exampleSite/content/page/about.md deleted file mode 100644 index cd352c6..0000000 --- a/exampleSite/content/page/about.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "About This Site" -hasMath = false -+++ - -Hello, I'm an example site that uses the Hugo Morphism theme. diff --git a/exampleSite/content/post/more-maths.md b/exampleSite/content/post/more-maths.md new file mode 100644 index 0000000..0872600 --- /dev/null +++ b/exampleSite/content/post/more-maths.md @@ -0,0 +1,64 @@ ++++ +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... + + +## 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 diff --git a/exampleSite/content/post/new.md b/exampleSite/content/post/new.md index 033e12f..1f8f2c0 100644 --- a/exampleSite/content/post/new.md +++ b/exampleSite/content/post/new.md @@ -10,6 +10,12 @@ categories: ## 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 diff --git a/exampleSite/content/post/old.md b/exampleSite/content/post/old.md deleted file mode 100644 index 9da0b8a..0000000 --- a/exampleSite/content/post/old.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "First Post" -description: "Welcome to the first blog post." -date: "2014-03-28" -categories: - - "template" - - "boring" ---- - -## Sample Post 1 - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -### Sub-heading - -Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est, non, ratione, molestiae illo optio quia sequi id fuga natus nihil ad architecto dolor alias ex sunt iste aperiam eius itaque. - - -## foo - -Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quo, neque, eveniet voluptate eos debitis illum qui nostrum eius maxime ratione assumenda suscipit impedit deserunt voluptatibus odio ducimus non. Ex, ratione. diff --git a/exampleSite/content/post/tufte-features.md b/exampleSite/content/post/tufte-features.md index 672bc6d..0df7678 100644 --- a/exampleSite/content/post/tufte-features.md +++ b/exampleSite/content/post/tufte-features.md @@ -12,13 +12,13 @@ categories = ["katex", "latex", "tufte-css"] +++ This is a quick demonstration post. It serves as an example of the features -of this theme. One of them is \\( \LaTeX \\) via MathJax. +of this theme. One of them is \\( \LaTeX \\) via [Katex](https://katex.org/). {{< section "begin" >}} ## A Bit About Mathematics {{< epigraph pre="Shawn O'Hare, " cite="Math is Fun" >}} This is an example of an epigraph with some math -\\(\mathbb N \subseteq \mathbb R \\) +\\( \mathbb N \subseteq \mathbb R \\) to start the beginning of a section. {{< /epigraph >}} @@ -40,33 +40,38 @@ And display math using escaped brackets `\\[`: ### Environments -Currently, certain $\LaTeX$ environments need to be escaped so that -the markdown processor does not override MathJax. Currently, display +Currently, certain \\(\LaTeX\\) environments need to be escaped so that +the markdown processor does not override Katex. Currently, display environments should be enclosed in `

` tags and blank lines. For instance:

-\begin{align*} +$$ +\begin{aligned} \mu(A) &= \iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dx\right) dy = \int_I 0 \ dy= 0 \quad \text{and} \\ \mu(A) &=\iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dy \right) dx =\int_I dx = 1, -\end{align*} +\end{aligned} +$$

+ is produced from ```

-\begin{align*} +$$ +\begin{aligned} \mu(A) &= \iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dx\right) dy = \int_I 0 \ dy= 0 \quad \text{and} \\ \mu(A) &=\iint_{I^2} \chi_A (x,y) \ d(x,y) = \int_I \left( \int_I \chi_A (x,y) \ dy \right) dx =\int_I dx = 1, -\end{align*} +\end{aligned} +$$

``` @@ -125,7 +130,8 @@ Below we have an example of a regular width figure. >}} {{< section "end" >}} -And now we exhibit a margin figure. + + {{< figure src="https://edwardtufte.github.io/tufte-css/img/rhino.png" class="class param" @@ -135,10 +141,11 @@ And now we exhibit a margin figure. label="mn-export-import" caption="This is the image caption." attr="Image attribution" - attrlink="attribute link" + attrlink="https://edwardtufte.github.io/tufte-css" alt="alt" link="link" >}} + But tight integration of graphics with text is central to Tufte’s work even when those graphics are ancillary to the main body of a text. In many of those cases, a margin figure may be most appropriate. {{< section "end" >}} Below is a full-width figure. From b2036b42f01026686d5793886a7989032670179b Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:06:56 +0200 Subject: [PATCH 12/75] .gitignore updated --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b8a2b37..01ced96 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -exempleSite/public/* \ No newline at end of file +exampleSite/public/* \ No newline at end of file From b20cc634bbb0e515a0ec9f5a0b31149911f39196 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 25 Jul 2021 10:09:53 +0200 Subject: [PATCH 13/75] update code of conduct --- code_of_conduct.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_of_conduct.md b/code_of_conduct.md index d8e2efa..015d7cf 100644 --- a/code_of_conduct.md +++ b/code_of_conduct.md @@ -61,7 +61,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -[INSERT CONTACT METHOD]. +slashformotion[at]protonmail[dot].com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the From 6ecde00ecd24c1fa220ce845f68b408c4ef488e8 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Mon, 26 Jul 2021 21:01:12 +0200 Subject: [PATCH 14/75] bump hugo version --- theme.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme.toml b/theme.toml index 7a1680a..fea1c80 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ description = "A minimalist blog theme using Tufte-css." homepage = "http://github.com/shawnohare/hugo-tufte" tags = ["blog", "tufte", "minimal"] features = ["math", "tufte-css", "tufte"] -min_version = 0.15 +min_version = 0.85 [author] name = "Shawn O'Hare" From 6200797489abdfffb0a8b119063147b022e7522a Mon Sep 17 00:00:00 2001 From: slashformotion Date: Mon, 26 Jul 2021 21:07:42 +0200 Subject: [PATCH 15/75] added config.toml --- config.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 config.toml diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..96ef2fd --- /dev/null +++ b/config.toml @@ -0,0 +1,4 @@ +[module] + [module.hugoVersion] + extended = true + min = "0.85.0" \ No newline at end of file From 4ccd5c9bda20e89b5880c331d774deeda9a2223b Mon Sep 17 00:00:00 2001 From: slashformotion Date: Mon, 26 Jul 2021 21:21:14 +0200 Subject: [PATCH 16/75] added a second author (me) to theme.toml --- theme.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/theme.toml b/theme.toml index fea1c80..985502e 100644 --- a/theme.toml +++ b/theme.toml @@ -7,6 +7,11 @@ tags = ["blog", "tufte", "minimal"] features = ["math", "tufte-css", "tufte"] min_version = 0.85 +authors = [ + {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"}, + {name = "Slashformotion", homepage = "https://github.com/slashformotiongithub"} +] + [author] name = "Shawn O'Hare" homepage = "http://www.shawnohare.com" From b2abcdaebeac967754c1da73440c166d9d60ebbb Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 28 Jul 2021 10:33:10 +0200 Subject: [PATCH 17/75] Added build CI --- .github/workflows/build-site.yml | 31 +++++++++++++++++++++++++++++++ theme.toml | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-site.yml diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml new file mode 100644 index 0000000..33cc8c8 --- /dev/null +++ b/.github/workflows/build-site.yml @@ -0,0 +1,31 @@ +name: build github pages + +on: + push: + branches: + - master # Set a branch to deploy + +jobs: + deploy: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.83.1' + extended: true + + - name: Build + run: hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/master' + with: + github_token: ${{ secrets.GH_TOKEN }} + publish_dir: ./public \ No newline at end of file diff --git a/theme.toml b/theme.toml index 985502e..eeb14d1 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ description = "A minimalist blog theme using Tufte-css." homepage = "http://github.com/shawnohare/hugo-tufte" tags = ["blog", "tufte", "minimal"] features = ["math", "tufte-css", "tufte"] -min_version = 0.85 +min_version = 0.84 authors = [ {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"}, From 57bfc0886d7c93a6e4e2a1c0e2457f5fe87fb51d Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 28 Jul 2021 10:47:38 +0200 Subject: [PATCH 18/75] update gh workflow --- .github/workflows/build-site.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 33cc8c8..51079fa 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -7,7 +7,10 @@ on: jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./exampleSite steps: - uses: actions/checkout@v2 with: @@ -25,7 +28,6 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/master' with: github_token: ${{ secrets.GH_TOKEN }} - publish_dir: ./public \ No newline at end of file + publish_dir: ./exampleSite/public \ No newline at end of file From 63de5c87800f4e1924a365bd950dddb65ad2fd1c Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 28 Jul 2021 10:51:14 +0200 Subject: [PATCH 19/75] update pure css cdn link --- layouts/partials/header.includes.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/layouts/partials/header.includes.html b/layouts/partials/header.includes.html index ef6c33d..4760c21 100644 --- a/layouts/partials/header.includes.html +++ b/layouts/partials/header.includes.html @@ -7,13 +7,7 @@ - - - - - + From 0299aa32d307c5584e6a281f02bed54b0affefe5 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 28 Jul 2021 11:02:23 +0200 Subject: [PATCH 20/75] Fix #7: katex now work as expected --- README.md | 8 ++++---- exampleSite/content/post/more-maths.md | 4 ++-- exampleSite/content/post/tufte-features.md | 20 ++++++++++---------- layouts/partials/math.html | 2 +- static/js/main.js | 22 ++++++++++------------ 5 files changed, 27 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 03c2783..46046c7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This is a fork of the original [hugo-tufte](https://github.com/shawnohare/hugo-t [katex](https://katex.org/) renders LaTeX written inside of markdown files. LaTeX can be written more or less as normal. Some examples: -- This `\\( \frac{1}{2} \\)` will be rendered inline. +- This `$ \frac{1}{2} $` will be rendered inline. - A simple displayed equation: `$$f(x, y) := e^{x^2 - y^2}.$$` There currently seems to be some weirdness with other environments, @@ -33,12 +33,12 @@ Let $G$ be a finite group with exponent $2$. Then every element is an involution, hence for any $x$, $y$ in $G$ we have:

-\begin{align*} +\begin{aligned} e &= (xy)^2 \\ &=xyxy \implies \\ y^{-1} &= xyx \implies \\ y^{-1}x^{-1} &= xy, -\end{align*} +\end{aligned*}

establishing that $G$ is abelian. @@ -104,7 +104,7 @@ support all the features present in the ```html {{< epigraph pre="Author Writer, " cite="Math is Fun" >}} This is an example of an epigraph with some math - \\( \mathbb N \subseteq \mathbb R \\) + $ \mathbb N \subseteq \mathbb R $ to start the beginning of a section. {{< /epigraph >}} ``` diff --git a/exampleSite/content/post/more-maths.md b/exampleSite/content/post/more-maths.md index 0872600..a8b6c38 100644 --- a/exampleSite/content/post/more-maths.md +++ b/exampleSite/content/post/more-maths.md @@ -4,12 +4,12 @@ meta = false author = "AUTHOR NAME" date = "2021-07-20T13:56:01-08:00" type = "post" -title = "More math \\(\\xi_{(even-in-the-title-!)}\\)" +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... +A compilation of $\LaTeX$ formulas... ## Matrix diff --git a/exampleSite/content/post/tufte-features.md b/exampleSite/content/post/tufte-features.md index 0df7678..3eeb235 100644 --- a/exampleSite/content/post/tufte-features.md +++ b/exampleSite/content/post/tufte-features.md @@ -12,13 +12,13 @@ categories = ["katex", "latex", "tufte-css"] +++ This is a quick demonstration post. It serves as an example of the features -of this theme. One of them is \\( \LaTeX \\) via [Katex](https://katex.org/). +of this theme. One of them is $ \LaTeX $ via [Katex](https://katex.org/). {{< section "begin" >}} ## A Bit About Mathematics {{< epigraph pre="Shawn O'Hare, " cite="Math is Fun" >}} This is an example of an epigraph with some math -\\( \mathbb N \subseteq \mathbb R \\) +$ \mathbb N \subseteq \mathbb R $ to start the beginning of a section. {{< /epigraph >}} @@ -27,20 +27,20 @@ to start the beginning of a section. ### Inline Some inline math: {{< marginnote "mn-example" >}}This is a margin note.{{< /marginnote >}} -\\(e^{i \pi} = -1\\) - and \\(\sqrt{-1} = i \\) -and \\( a_2 = 3 \\). +$e^{i \pi} = -1$ + and $\sqrt{-1} = i $ +and $ a_2 = 3 $. ### Display -And display math using escaped brackets `\\[`: +And display math using this symbol `$$`: {{< sidenote "sn-example" >}}This is a sidenote!{{< /sidenote >}} -\\[ +$$ -- \cdot_H -- \colon B(G,H) \times B(H, K) \to B(G, K), \quad ([X], [Y]) \mapsto [X \times_H Y]. -\\] +$$ ### Environments -Currently, certain \\(\LaTeX\\) environments need to be escaped so that +Currently, certain $\LaTeX$ environments need to be escaped so that the markdown processor does not override Katex. Currently, display environments should be enclosed in `

` tags and blank lines. For instance: @@ -77,7 +77,7 @@ $$ ### Blockquotes Some blockquotes. But first, we try to manually cite via -This is between cite tags and has math: \\(e^x \\) +This is between cite tags and has math: $e^x $ {{< blockquote cite="www.shawnohare.com" footer="Shawn O'Hare" >}} This is a blockquote with two paragraphs, that employs the diff --git a/layouts/partials/math.html b/layouts/partials/math.html index caee35d..dff31cd 100644 --- a/layouts/partials/math.html +++ b/layouts/partials/math.html @@ -1,4 +1,4 @@ - + diff --git a/static/js/main.js b/static/js/main.js index 4b7a7af..6f19105 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,14 +1,12 @@ - \ No newline at end of file + { left: "$$", right: "$$", display: true }, + { left: "\\[", right: "\\]", display: true }, + { left: "$", right: "$", display: false }, + { left: "\\(", right: "\\)", display: false } + ], + displayMode: true + } +); \ No newline at end of file From 6acc891c01141eaac7e7a056b10505535dc8bcae Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 28 Jul 2021 11:12:12 +0200 Subject: [PATCH 21/75] fix relative url --- exampleSite/config.toml | 2 +- layouts/partials/header.includes.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 168f641..59ae543 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,7 +1,7 @@ themesDir = "../../" canonifyurls = true -# baseurl = "https://github.com/shawnohare/hugo-tufte" +baseurl = "https://slashformotion.github.io/hugo-tufte/" theme = "hugo-tufte" title = "Hugo-tufte Theme Example Site" pygmentsUseClasses=true diff --git a/layouts/partials/header.includes.html b/layouts/partials/header.includes.html index 4760c21..c0a2025 100644 --- a/layouts/partials/header.includes.html +++ b/layouts/partials/header.includes.html @@ -17,10 +17,10 @@ - + - - - - + + + + From b823330aff4fe9bae83e76d2e32dce87eeaa3c61 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Wed, 28 Jul 2021 17:25:01 +0200 Subject: [PATCH 22/75] remove single author line --- theme.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/theme.toml b/theme.toml index eeb14d1..9ce63e3 100644 --- a/theme.toml +++ b/theme.toml @@ -11,7 +11,3 @@ authors = [ {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"}, {name = "Slashformotion", homepage = "https://github.com/slashformotiongithub"} ] - -[author] - name = "Shawn O'Hare" - homepage = "http://www.shawnohare.com" From f0aa9f31a6d818eb9f151636791229fa871e58b4 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Thu, 29 Jul 2021 09:07:58 +0200 Subject: [PATCH 23/75] added demo url in theme.toml --- theme.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/theme.toml b/theme.toml index 9ce63e3..8a7df02 100644 --- a/theme.toml +++ b/theme.toml @@ -3,6 +3,7 @@ license = "MIT" licenselink = "https://github.com/shawnohare/hugo-tufte/blob/master/LICENSE.md" description = "A minimalist blog theme using Tufte-css." homepage = "http://github.com/shawnohare/hugo-tufte" +demo = "https://slashformotion.github.io/hugo-tufte/" tags = ["blog", "tufte", "minimal"] features = ["math", "tufte-css", "tufte"] min_version = 0.84 From 7df5a872a7124a9c8badca8c97677e3c471a5300 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Thu, 29 Jul 2021 09:29:27 +0200 Subject: [PATCH 24/75] fixed repo url in footter of demo site --- exampleSite/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 59ae543..47d69e0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -54,7 +54,7 @@ pygmentsUseClasses=true pre = " " weight = -100 identifier = "github" - url = "https://github.com/shawnohare/hugo-tufte" + url = "https://github.com/slashformotion/hugo-tufte" [[menu.footer]] name = "" pre = " " From 52004c23f5b7561ec9c37a3409bd5f6f36ac4719 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Fri, 30 Jul 2021 19:28:00 +0200 Subject: [PATCH 25/75] delete highlight.html partial --- layouts/partials/highlight.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 layouts/partials/highlight.html diff --git a/layouts/partials/highlight.html b/layouts/partials/highlight.html deleted file mode 100644 index e69de29..0000000 From ce4028226f2e44e9d344b6dff6cc843e9b8ff192 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Fri, 30 Jul 2021 19:28:26 +0200 Subject: [PATCH 26/75] fix theme.toml --- theme.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/theme.toml b/theme.toml index 8a7df02..bf244ef 100644 --- a/theme.toml +++ b/theme.toml @@ -1,8 +1,8 @@ name = "Tufte" license = "MIT" -licenselink = "https://github.com/shawnohare/hugo-tufte/blob/master/LICENSE.md" +licenselink = "https://github.com/slashformotion/hugo-tufte/blob/master/LICENSE.md" description = "A minimalist blog theme using Tufte-css." -homepage = "http://github.com/shawnohare/hugo-tufte" +homepage = "http://github.com/slashformotion/hugo-tufte" demo = "https://slashformotion.github.io/hugo-tufte/" tags = ["blog", "tufte", "minimal"] features = ["math", "tufte-css", "tufte"] @@ -10,5 +10,5 @@ min_version = 0.84 authors = [ {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"}, - {name = "Slashformotion", homepage = "https://github.com/slashformotiongithub"} + {name = "Slashformotion", homepage = "https://github.com/slashformotion"} ] From 37ecc69ecc8fb5b3b26a37ac45494ccc8f67c158 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Fri, 30 Jul 2021 21:07:51 +0200 Subject: [PATCH 27/75] enable either mathjax or katex Fixes slashformotion/hugo-tufte#9 --- exampleSite/config.toml | 34 +++++++++++++++++++++++----------- layouts/partials/math.html | 33 +++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 15 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 47d69e0..5680805 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,23 +1,32 @@ +# Remove this if your site folder is not inside the theme folder themesDir = "../../" -canonifyurls = true -baseurl = "https://slashformotion.github.io/hugo-tufte/" +# Set your theme here theme = "hugo-tufte" +# The url of your website +baseurl = "https://slashformotion.github.io/hugo-tufte/" +# The title of your website (shown on all the pages) title = "Hugo-tufte Theme Example Site" -pygmentsUseClasses=true -[taxonomies] - category = "categories" - group = "groups" - series = "series" - tag = "tags" +# Site wide kill switch for Latex support +math = true +# (If math is enabled) +## if "katex" is set to true katex will be used to render LaTex, if not MathJax will be used instead +katex = false [params] - math = true + # Subtitle of the website subtitle = "Subtitle goes here." + # Your name or the name of you company copyrightHolder = "Copyright Holder" + # Show the "Powered by Hugo-Tufte and Hugo." showPoweredBy = true + # Site wide kill switch hidedate = false +[taxonomies] + category = "categories" + series = "series" + tag = "tags" # ----------------------------------------------------------------------- # Navigation menu # ----------------------------------------------------------------------- @@ -63,8 +72,11 @@ pygmentsUseClasses=true url = "https://twitter.com" - +# Don't change the settings below [markup] [markup.goldmark] [markup.goldmark.renderer] - unsafe = true + unsafe = true # make the shortcodes work + +pygmentsUseClasses=true +canonifyurls = true \ No newline at end of file diff --git a/layouts/partials/math.html b/layouts/partials/math.html index dff31cd..31131c1 100644 --- a/layouts/partials/math.html +++ b/layouts/partials/math.html @@ -1,4 +1,29 @@ - - - - +{{ if .Params.katex }} + + + + +{{ else }} + + + +{{ end }} \ No newline at end of file From 07a755cafb94b7b16cb187234fbcff00e9832000 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Fri, 30 Jul 2021 21:08:12 +0200 Subject: [PATCH 28/75] chores --- layouts/_default/single.html | 28 +++++++++++---------------- layouts/partials/body.includes.html | 1 - layouts/partials/comments.html | 0 layouts/partials/disqus.html | 19 ------------------ layouts/partials/footer.html | 1 - layouts/partials/header.includes.html | 2 -- 6 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 layouts/partials/body.includes.html delete mode 100644 layouts/partials/comments.html delete mode 100644 layouts/partials/disqus.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fda5daa..75a6ccb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,22 +4,16 @@ */}} - - -{{ partial "header.html" . }} - - +{{ define "main" }}

-
-{{ partial "brand.html" . }} -{{ partial "content.header.html" . }} -{{ partial "toc.html" . }} -
{{ .Content }}
-
- {{ partial "disqus.html" . }} - {{ partial "footer.html" . }} -
-
+
+ {{ partial "brand.html" . }} + {{ partial "content.header.html" . }} + {{ partial "toc.html" . }} +
{{ .Content }}
+
+ {{ partial "footer.html" . }} +
+
- - +{{ end }} \ No newline at end of file diff --git a/layouts/partials/body.includes.html b/layouts/partials/body.includes.html deleted file mode 100644 index 026abba..0000000 --- a/layouts/partials/body.includes.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html deleted file mode 100644 index e69de29..0000000 diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html deleted file mode 100644 index 64a4a3b..0000000 --- a/layouts/partials/disqus.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ if .Params.comments }} -
- - - comments powered by Disqus -{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1c1b3ee..cedeb7f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -25,4 +25,3 @@

-{{ partial "body.includes.html" . }} diff --git a/layouts/partials/header.includes.html b/layouts/partials/header.includes.html index c0a2025..5059dde 100644 --- a/layouts/partials/header.includes.html +++ b/layouts/partials/header.includes.html @@ -3,8 +3,6 @@ {{ partial "math.html" . }} {{ end }} - - From 66a3d218df001d41d08b97280ea5ddb0d1ce362b Mon Sep 17 00:00:00 2001 From: slashformotion Date: Fri, 30 Jul 2021 21:19:04 +0200 Subject: [PATCH 29/75] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 46046c7..cb12427 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Hugo-Tufte is a minimalist blog-like theme for the [static site generator Hugo](https://gohugo.io) that attempts to be a faithful implementation of the [Tufte-css](https://github.com/edwardtufte/tufte-css) project. -It supports mathematical typesetting via [katex](https://katex.org/). +It supports mathematical typesetting via [katex](https://katex.org/) or [MathJax](https://www.mathjax.org). By utilizing copious partial templates the theme is largely customizable. ## State of Project @@ -18,10 +18,9 @@ This is a fork of the original [hugo-tufte](https://github.com/shawnohare/hugo-t ### Math -[katex](https://katex.org/) renders LaTeX written inside of markdown files. LaTeX can be -written more or less as normal. Some examples: +[Katex](https://katex.org/) or [MathJax](https://www.mathjax.org) renders LaTeX written inside of markdown files. LaTeX can be written more or less as normal. Some examples: -- This `$ \frac{1}{2} $` will be rendered inline. +- This `$\frac{1}{2}$` will be rendered inline. - A simple displayed equation: `$$f(x, y) := e^{x^2 - y^2}.$$` There currently seems to be some weirdness with other environments, @@ -38,7 +37,7 @@ an involution, hence for any $x$, $y$ in $G$ we have: &=xyxy \implies \\ y^{-1} &= xyx \implies \\ y^{-1}x^{-1} &= xy, -\end{aligned*} +\end{aligned}

establishing that $G$ is abelian. @@ -52,6 +51,8 @@ The site specific parameters that this theme recognizes are: - `showPoweredBy` boolean: if true, display a shoutout to Hugo and this theme. - `copyrightHolder` string: Inserts the value in the default copyright notice. - `copyright` string: Custom copyright notice. +- `math` boolean: Site wide kill switch for Latex support +- `katex` boolean: if "katex" is set to true katex will be used to render LaTex, if not MathJax will be used instead ### Page Parameters From 69ceb70a489b85563726cc0256ad84f688fd9c03 Mon Sep 17 00:00:00 2001 From: Dwarkesh Patel Date: Sat, 31 Jul 2021 09:18:32 -0500 Subject: [PATCH 30/75] Allows adding link to the citation in the epigraph --- layouts/shortcodes/epigraph.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/shortcodes/epigraph.html b/layouts/shortcodes/epigraph.html index 2d60ad7..af992c9 100644 --- a/layouts/shortcodes/epigraph.html +++ b/layouts/shortcodes/epigraph.html @@ -5,7 +5,9 @@ {{ if .IsNamedParams }} {{ end }} From c3edb6073ceb2952160e8181afae97792f7144de Mon Sep 17 00:00:00 2001 From: Dwarkesh Patel Date: Sat, 31 Jul 2021 09:38:26 -0500 Subject: [PATCH 31/75] title links back to home --- layouts/partials/brand.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html index a0c84e3..2ea26fc 100644 --- a/layouts/partials/brand.html +++ b/layouts/partials/brand.html @@ -1,6 +1,6 @@
-

{{ .Site.Title}}

+

{{ .Site.Title}}

{{ .Site.Params.subtitle }}

{{ partial "nav.html" . }} -
+
From fa0169737bcec3c3d9626b98842a2c5c015a466b Mon Sep 17 00:00:00 2001 From: Dwarkesh Patel Date: Sat, 31 Jul 2021 21:48:37 -0500 Subject: [PATCH 32/75] fixed title issue --- layouts/partials/brand.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html index 2ea26fc..de0e782 100644 --- a/layouts/partials/brand.html +++ b/layouts/partials/brand.html @@ -1,5 +1,5 @@
-

{{ .Site.Title}}

+

{{ .Site.Title}}

{{ .Site.Params.subtitle }}

{{ partial "nav.html" . }}
From b8dd6d05913d6d6266e4e2f52d669a6d73c90bae Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 1 Aug 2021 11:36:11 +0200 Subject: [PATCH 33/75] dump hugo minimal working version to 0.83 --- config.toml | 2 +- theme.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 96ef2fd..fbb88d9 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ [module] [module.hugoVersion] extended = true - min = "0.85.0" \ No newline at end of file + min = "0.83.0" \ No newline at end of file diff --git a/theme.toml b/theme.toml index bf244ef..70cfafc 100644 --- a/theme.toml +++ b/theme.toml @@ -6,7 +6,7 @@ homepage = "http://github.com/slashformotion/hugo-tufte" demo = "https://slashformotion.github.io/hugo-tufte/" tags = ["blog", "tufte", "minimal"] features = ["math", "tufte-css", "tufte"] -min_version = 0.84 +min_version = 0.83 authors = [ {name = "Shawn O'Hare", homepage = "http://www.shawnohare.com"}, From 92cf44c208af0a6c822e4e6a8923dd498c1e1a06 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 1 Aug 2021 11:52:39 +0200 Subject: [PATCH 34/75] fix 404.html is not reworked #8 --- layouts/404.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index e9be069..8901f6e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,7 +1,13 @@ -{{ partial "header.html" . }} -
-
-

{{ .Title }}

+{{ define "main" }} +truc +
+
+ {{ partial "brand.html" . }} + +

{{ .Title }}

+
+ {{ partial "footer.html" . }} +
+
-
-{{ partial "footer.html" . }} +{{ end }} \ No newline at end of file From da3bcea49669a9c10ad5743ef691e570254ed058 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Sun, 1 Aug 2021 11:54:30 +0200 Subject: [PATCH 35/75] upd .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 01ced96..f48eee9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -exampleSite/public/* \ No newline at end of file +exampleSite/public/* +*.patch \ No newline at end of file From 193c7f6497c6e426fd265d6ce6b0ec8d8e03eb4d Mon Sep 17 00:00:00 2001 From: Dwarkesh Patel Date: Sun, 1 Aug 2021 13:06:53 -0500 Subject: [PATCH 36/75] fixed title href --- layouts/partials/brand.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html index de0e782..9dd58d1 100644 --- a/layouts/partials/brand.html +++ b/layouts/partials/brand.html @@ -1,5 +1,5 @@
-

{{ .Site.Title}}

+

{{ .Site.Title}}

{{ .Site.Params.subtitle }}

{{ partial "nav.html" . }}
From 67fb77fc2baaf6924699ca02bc293753c6fe7e20 Mon Sep 17 00:00:00 2001 From: Dwarkesh Patel Date: Sun, 1 Aug 2021 13:15:43 -0500 Subject: [PATCH 37/75] fixed margin note bug --- layouts/shortcodes/marginnote.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/marginnote.html b/layouts/shortcodes/marginnote.html index 57cc43e..9616ead 100644 --- a/layouts/shortcodes/marginnote.html +++ b/layouts/shortcodes/marginnote.html @@ -1,6 +1,12 @@ {{ $marginnoteDomIdSuffix := .Ordinal }} -