Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
9004c27ceb |
57 changed files with 1667 additions and 3 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
public/
|
||||||
|
*.lock
|
||||||
|
/.direnv
|
||||||
|
node_modules
|
20
LICENSE
Normal file
20
LICENSE
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 Kaito Sugimoto
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
98
README.md
98
README.md
|
@ -1,3 +1,97 @@
|
||||||
# functor.systems
|
# HugoTeX
|
||||||
|
|
||||||
the website. see [functor.systems](https://functor.systems).
|
A hugo theme which looks like a LaTeX document.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Live Demo: https://hugotex.vercel.app/**
|
||||||
|
|
||||||
|
This theme is heavily inspired by [latex-css](https://latex.now.sh/).
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/kaisugi/HugoTeX
|
||||||
|
cd HugoTeX/exampleSite
|
||||||
|
hugo server -t ../..
|
||||||
|
# open http://localhost:1313/
|
||||||
|
```
|
||||||
|
|
||||||
|
Hugo (>= **0.128.0**) is required.
|
||||||
|
|
||||||
|
## Config settings
|
||||||
|
|
||||||
|
example
|
||||||
|
|
||||||
|
```toml
|
||||||
|
baseURL = "https://hugotex.vercel.app/"
|
||||||
|
title = "HugoTeX"
|
||||||
|
languageCode = "en"
|
||||||
|
DefaultContentLanguage = "en"
|
||||||
|
enableInlineShortcodes = true
|
||||||
|
footnoteReturnLinkContents = "^"
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 3
|
||||||
|
|
||||||
|
[Params.Author]
|
||||||
|
name = "Kaito Sugimoto"
|
||||||
|
abstract = """
|
||||||
|
I'm a software engineer and a coffee enthusiast in Japan.
|
||||||
|
My primary interest lies in the area of natural language processing.
|
||||||
|
"""
|
||||||
|
|
||||||
|
[taxonomies]
|
||||||
|
category = "categories"
|
||||||
|
tag = "tags"
|
||||||
|
series = "series"
|
||||||
|
|
||||||
|
[markup]
|
||||||
|
[markup.goldmark]
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe = true
|
||||||
|
[markup.highlight]
|
||||||
|
style = "paraiso-dark" # syntax highlighting style
|
||||||
|
|
||||||
|
[Params]
|
||||||
|
darkmode = true # set true if you want to enforce dark mode
|
||||||
|
# lightmode = true # set true if you want to enforce light mode
|
||||||
|
```
|
||||||
|
|
||||||
|
**By default, dark mode is automatically enabled based on `prefers-color-scheme` media query. If you want to enforce or deactivate this setting, set `darkmode=true` or `lightmode=true` in [Params]**
|
||||||
|
|
||||||
|
### Social media
|
||||||
|
|
||||||
|
If you want to enable the generation of Twitter Card or Opengraph `meta` tags so you get nice embeds on Twitter, Facebook and other social media sites, add the following:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[Params]
|
||||||
|
twittercard = true
|
||||||
|
opengraph = true
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [Internal Templates](https://gohugo.io/templates/internal/) in Hugo for how to configure this behaviour further.
|
||||||
|
|
||||||
|
## Shortcodes
|
||||||
|
|
||||||
|
### Sidenotes
|
||||||
|
|
||||||
|
[LaTeX.css](https://latex.vercel.app/), which HugoTeX is using, defines syntax for sidenotes. However, as it is a little verbose to write, we provide a Hugo shortcode for that:
|
||||||
|
|
||||||
|
```
|
||||||
|
A sentence deserving a sidenote.{{% sidenote %}}The note itself.{{% /sidenote %}}.
|
||||||
|
```
|
||||||
|
|
||||||
|
The note will be displayed on the right margin on larger screens. On smaller screns the note will be hidden by default and will open when clicking on the superscript number marking the existence of the note.
|
||||||
|
|
||||||
|
## For contributors
|
||||||
|
|
||||||
|
Any issues or pull requests are welcome.
|
||||||
|
|
||||||
|
## LICENSE
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|
||||||
|
## Similar Projects
|
||||||
|
|
||||||
|
- [queensferryme / hugo-theme-texify](https://github.com/queensferryme/hugo-theme-texify/)
|
||||||
|
|
2
archetypes/default.md
Normal file
2
archetypes/default.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
+++
|
||||||
|
+++
|
43
flake.nix
Normal file
43
flake.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
description = "Hugo Simple Example Site";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
treefmt-nix,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
formatter = treefmtEval.config.build.wrapper;
|
||||||
|
checks = {
|
||||||
|
formatting = treefmtEval.config.build.check self;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
bun
|
||||||
|
hugo
|
||||||
|
just
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
[ -d "$PWD/node_modules" ] || bun install
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
BIN
images/screenshot.png
Normal file
BIN
images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
BIN
images/tn.png
Normal file
BIN
images/tn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
17
layouts/_default/baseof.html
Normal file
17
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Site.LanguageCode }}">
|
||||||
|
{{- partial "head.html" . -}}
|
||||||
|
{{- if site.Params.darkmode -}}
|
||||||
|
<body class="latex-dark">
|
||||||
|
{{- else if site.Params.lightmode -}}
|
||||||
|
<body>
|
||||||
|
{{- else -}}
|
||||||
|
<body class="latex-dark-auto">
|
||||||
|
{{- end -}}
|
||||||
|
{{- partial "header.html" . -}}
|
||||||
|
<div id="content">
|
||||||
|
{{- block "main" . }}{{- end }}
|
||||||
|
</div>
|
||||||
|
{{- partial "footer.html" . -}}
|
||||||
|
</body>
|
||||||
|
</html>
|
29
layouts/_default/list.html
Normal file
29
layouts/_default/list.html
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<div class="container" role="main">
|
||||||
|
<div class="posts-list">
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $pag := .Paginator.Pages }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ range .Paginator.Pages }}
|
||||||
|
{{ partial "preview.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
<ul class="pager">
|
||||||
|
{{ if .Paginator.HasPrev }}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">← Newer</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Paginator.HasNext }}
|
||||||
|
<li class="next">
|
||||||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">Older →</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
25
layouts/_default/single.html
Normal file
25
layouts/_default/single.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<div class="container" role="main">
|
||||||
|
<article class="article" class="blog-post">
|
||||||
|
<div class="postmeta">
|
||||||
|
{{ partial "postmeta.html" . }}
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
{{ partial "toc.html" . }}
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<div class="blog-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
{{ if and (gt .WordCount 400) (.Param "backtotop") }}
|
||||||
|
{{ partial "backtotop.html" . }}
|
||||||
|
<button onclick="topFunction()" id="backtotopButton">
|
||||||
|
<i class="fa fa-angle-up"></i>
|
||||||
|
</button>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
16
layouts/_default/terms.html
Normal file
16
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<div class="container" role="main">
|
||||||
|
<article class="post-preview">
|
||||||
|
{{ range .Data.Terms.Alphabetical }}
|
||||||
|
<div class="terms">
|
||||||
|
<h4 class="term-name" >
|
||||||
|
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
|
||||||
|
<span class="badge">{{ .Count }}</span>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ end }}
|
21
layouts/partials/footer.html
Normal file
21
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<footer>
|
||||||
|
<div class="container">
|
||||||
|
<p class="credits copyright">
|
||||||
|
<p class="credits theme-by">
|
||||||
|
{{ if .Site.Params.Legal }}
|
||||||
|
<a href="{{ .Site.BaseURL }}legal/">{{ .Site.Params.Legal }}</a>
|
||||||
|
<br>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.PoweredBy }}
|
||||||
|
Powered By <a href="https://gohugo.io">Hugo</a> / Theme <a href="https://github.com/kaisugi/HugoTeX">HugoTeX</a>
|
||||||
|
<br>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Title }}
|
||||||
|
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>,
|
||||||
|
{{ end }}
|
||||||
|
©
|
||||||
|
{{ .Site.Lastmod.Format "2006" }}
|
||||||
|
<a href="{{ .Site.BaseURL }}about/">{{ .Site.Params.Author.name }}</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
28
layouts/partials/head.html
Normal file
28
layouts/partials/head.html
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
{{ if .Title }}
|
||||||
|
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||||
|
{{ else }}
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.description }}
|
||||||
|
<meta name="description" content="{{ . }}" />
|
||||||
|
{{ end }}
|
||||||
|
{{- with .Site.Params.Author.Name }}
|
||||||
|
<meta name="author" content="{{ . }}"/>
|
||||||
|
{{- end }}
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
{{ if site.Params.twittercard }}
|
||||||
|
{{ template "_internal/twitter_cards.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{ if site.Params.opengraph }}
|
||||||
|
{{ template "_internal/opengraph.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{ range .AlternativeOutputFormats -}}
|
||||||
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/latex.css" />
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" />
|
||||||
|
<script id="MathJax-script" async src="{{ .Site.BaseURL }}js/tex-mml-chtml.js"></script>
|
||||||
|
</head>
|
42
layouts/partials/header.html
Normal file
42
layouts/partials/header.html
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ if .Site.Params.homeTitle }}
|
||||||
|
{{ $.Scratch.Set "title" .Site.Params.homeTitle }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .Site.Title }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
|
{{ if $title }}
|
||||||
|
<header>
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
<div class="intro-header">
|
||||||
|
<div class="container">
|
||||||
|
<div class="{{ .Type }}-heading">
|
||||||
|
{{ if eq .Type "list" }}
|
||||||
|
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||||
|
{{ else }}
|
||||||
|
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||||
|
{{ if .IsHome }}
|
||||||
|
<p class="author">{{ with .Site.Params.Author.name }}{{.}}{{ else }}<br/>{{ end }}</p>
|
||||||
|
|
||||||
|
{{ if .Site.Params.Author.abstract }}
|
||||||
|
<div class="abstract">
|
||||||
|
<h5>Abstract</h5>
|
||||||
|
<p>
|
||||||
|
{{ .Site.Params.Author.abstract }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
{{ else }}
|
||||||
|
<div class="intro-header"></div>
|
||||||
|
{{ end }}
|
22
layouts/partials/nav.html
Normal file
22
layouts/partials/nav.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<nav class="navbar">
|
||||||
|
<div class="nav">
|
||||||
|
{{ if .Site.Params.logo }}
|
||||||
|
<a href="{{ .Site.BaseURL }}" class="nav-logo">
|
||||||
|
<img src="{{ .Site.BaseURL }}images/{{ .Site.Params.logo.url }}"
|
||||||
|
width="{{ .Site.Params.logo.width }}"
|
||||||
|
height="{{ .Site.Params.logo.height }}"
|
||||||
|
alt="{{ .Site.Params.logo.alt }}">
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<ul class="nav-links">
|
||||||
|
{{ range .Site.Params.nav }}
|
||||||
|
{{ if .icon }}
|
||||||
|
<li><a href="{{ .url | relLangURL }}" name="{{ .name }}"><i class="{{ .icon }}"></i></a></li>
|
||||||
|
{{ else }}
|
||||||
|
<li><a href="{{ .url | relLangURL }}" name="{{ .name }}">{{ .name }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
15
layouts/partials/postmeta.html
Normal file
15
layouts/partials/postmeta.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<span class="meta-post">
|
||||||
|
{{- $lastmod := .Lastmod.Format ( .Site.Params.dateformat | default "Jan 2, 2006") }}
|
||||||
|
{{- $pubdate := .PublishDate.Format ( .Site.Params.dateformat | default "Jan 2, 2006") }}
|
||||||
|
<i class="fa fa-calendar-alt"></i>
|
||||||
|
{{ $pubdate }}
|
||||||
|
{{- if ne $lastmod $pubdate }}
|
||||||
|
({{ $lastmod }})
|
||||||
|
{{- end }}
|
||||||
|
{{ if .Params.categories }}
|
||||||
|
<br><i class="fa fa-folder-open"></i>
|
||||||
|
{{ range .Params.categories }}
|
||||||
|
<a href="{{ $.Site.BaseURL }}/categories/{{ . | urlize }}/">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
14
layouts/partials/preview.html
Normal file
14
layouts/partials/preview.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<article class="post-preview">
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
<h2 class="post-title">{{ .Title }}</h2>
|
||||||
|
</a>
|
||||||
|
<div class="postmeta">
|
||||||
|
{{ partial "postmeta.html" . }}
|
||||||
|
</div>
|
||||||
|
<div class="post-entry">
|
||||||
|
{{ if .Truncated }}
|
||||||
|
<p>{{ .Summary }}</p>
|
||||||
|
<a href="{{ .Permalink }}" class="post-read-more">Read More</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</article>
|
18
layouts/partials/toc.html
Normal file
18
layouts/partials/toc.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{{ if and (gt .WordCount 400) (.Param "toc") }}
|
||||||
|
{{- /* 正規表現でh[1-6]を探す */ -}}
|
||||||
|
{{- $header := (findRE "<h2.*?>(?:.|\n)*?</h2>" .Content) -}}
|
||||||
|
{{- /* 最初に出現するh[1-6]を取得 */ -}}
|
||||||
|
{{- $firstH := index $header 0 -}}
|
||||||
|
|
||||||
|
{{- if ne $firstH nil -}}
|
||||||
|
{{- /* ヘッダーの前にToCを結合した「新しいヘッダー」を作成 */ -}}
|
||||||
|
{{- $newH := printf `%s%s` .TableOfContents $firstH -}}
|
||||||
|
{{- /* 古いヘッダーを新しいヘッダーに置換して出力 */ -}}
|
||||||
|
{{- replace .Content $firstH $newH | safeHTML -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- /* そもそもヘッダーがない時は普通に出力 */ -}}
|
||||||
|
{{- .Content -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
4
layouts/shortcodes/sidenote.html
Normal file
4
layouts/shortcodes/sidenote.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{{ $id := md5 .Inner }}
|
||||||
|
<label for="{{ $id }}" class="sidenote-toggle sidenote-number"></label>
|
||||||
|
<input type="checkbox" id="{{ $id }}" class="sidenote-toggle" />
|
||||||
|
<span class="sidenote">{{ .Inner }}</span>
|
9
layouts/shortcodes/table.html
Normal file
9
layouts/shortcodes/table.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{{ $htmlTable := .Inner | markdownify }}
|
||||||
|
{{ $old := "<table>" }}
|
||||||
|
{{ $new := "" }}
|
||||||
|
{{ $title := .Get "title" }}
|
||||||
|
{{ if $title }}
|
||||||
|
{{ $new = printf "<table><caption>%s</caption>" ($title | markdownify) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $htmlTable := replace $htmlTable $old $new }}
|
||||||
|
{{ $htmlTable | safeHTML }}
|
10
package.json
Normal file
10
package.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"fmt": "prettier layouts/**/*.html assets/style.css --write",
|
||||||
|
"check": "prettier layouts/**/*.html assets/style.css --check"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "^3.5.1",
|
||||||
|
"prettier-plugin-go-template": "^0.0.15"
|
||||||
|
}
|
||||||
|
}
|
|
@ -120,7 +120,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Ananth</td>
|
<td>Ananth</td>
|
||||||
<td><a target="_blank" href="https://monadi.cc">mit.edu/~ananthv/www</a></td>
|
<td><a target="_blank" href="https://mit.edu/~ananthv/www">mit.edu/~ananthv/www</a></td>
|
||||||
<td>Intrepid Haskellian, undergrad category theorist, founding member</td>
|
<td>Intrepid Haskellian, undergrad category theorist, founding member</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
3
site/content/_index.md
Normal file
3
site/content/_index.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
+++
|
||||||
|
author = "Hugo Authors"
|
||||||
|
+++
|
25
site/content/about.md
Normal file
25
site/content/about.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
+++
|
||||||
|
title = "About"
|
||||||
|
description = "Hugo, the world's fastest framework for building websites"
|
||||||
|
date = "2019-02-28"
|
||||||
|
aliases = ["about-us", "about-hugo", "contact"]
|
||||||
|
author = "Hugo Authors"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||||
|
|
||||||
|
Hugo makes use of a variety of open source projects including:
|
||||||
|
|
||||||
|
* https://github.com/yuin/goldmark
|
||||||
|
* https://github.com/alecthomas/chroma
|
||||||
|
* https://github.com/muesli/smartcrop
|
||||||
|
* https://github.com/spf13/cobra
|
||||||
|
* https://github.com/spf13/viper
|
||||||
|
|
||||||
|
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
|
||||||
|
|
||||||
|
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
|
||||||
|
|
||||||
|
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
|
||||||
|
|
||||||
|
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
6
site/content/post/_index.md
Normal file
6
site/content/post/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||||
|
title = "Posts"
|
||||||
|
author = "Hugo Authors"
|
||||||
|
tags = ["index"]
|
||||||
|
+++
|
46
site/content/post/emoji-support.md
Normal file
46
site/content/post/emoji-support.md
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
+++
|
||||||
|
author = "Hugo Authors"
|
||||||
|
title = "Emoji Support"
|
||||||
|
date = "2019-03-05"
|
||||||
|
description = "Guide to emoji usage in Hugo"
|
||||||
|
tags = [
|
||||||
|
"emoji",
|
||||||
|
]
|
||||||
|
+++
|
||||||
|
|
||||||
|
Emoji can be enabled in a Hugo project in a number of ways.
|
||||||
|
<!--more-->
|
||||||
|
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||||
|
|
||||||
|
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
|
||||||
|
|
||||||
|
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
|
||||||
|
|
||||||
|
{{< highlight html >}}
|
||||||
|
.emoji {
|
||||||
|
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||||
|
}
|
||||||
|
{{< /highlight >}}
|
||||||
|
|
||||||
|
{{< css.inline >}}
|
||||||
|
<style>
|
||||||
|
.emojify {
|
||||||
|
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||||
|
font-size: 2rem;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
@media screen and (max-width:650px) {
|
||||||
|
.nowrap {
|
||||||
|
display: block;
|
||||||
|
margin: 25px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{{< /css.inline >}}
|
148
site/content/post/markdown-syntax.md
Normal file
148
site/content/post/markdown-syntax.md
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
+++
|
||||||
|
author = "Hugo Authors"
|
||||||
|
title = "Markdown Syntax Guide"
|
||||||
|
date = "2019-03-11"
|
||||||
|
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||||
|
tags = [
|
||||||
|
"markdown",
|
||||||
|
"css",
|
||||||
|
"html",
|
||||||
|
]
|
||||||
|
categories = [
|
||||||
|
"themes",
|
||||||
|
"syntax",
|
||||||
|
]
|
||||||
|
series = ["Themes Guide"]
|
||||||
|
aliases = ["migrate-from-jekyl"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
## Headings
|
||||||
|
|
||||||
|
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||||
|
|
||||||
|
# H1
|
||||||
|
## H2
|
||||||
|
### H3
|
||||||
|
#### H4
|
||||||
|
##### H5
|
||||||
|
###### H6
|
||||||
|
|
||||||
|
## Paragraph
|
||||||
|
|
||||||
|
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||||
|
|
||||||
|
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||||
|
|
||||||
|
## Blockquotes
|
||||||
|
|
||||||
|
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||||
|
|
||||||
|
#### Blockquote without attribution
|
||||||
|
|
||||||
|
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||||
|
> **Note** that you can use *Markdown syntax* within a blockquote.
|
||||||
|
|
||||||
|
#### Blockquote with attribution
|
||||||
|
|
||||||
|
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||||
|
> — <cite>Rob Pike[^1]</cite>
|
||||||
|
|
||||||
|
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||||
|
|
||||||
|
## Tables
|
||||||
|
|
||||||
|
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||||
|
|
||||||
|
Name | Age
|
||||||
|
--------|------
|
||||||
|
Bob | 27
|
||||||
|
Alice | 23
|
||||||
|
|
||||||
|
#### Inline Markdown within tables
|
||||||
|
|
||||||
|
| Italics | Bold | Code |
|
||||||
|
| -------- | -------- | ------ |
|
||||||
|
| *italics* | **bold** | `code` |
|
||||||
|
|
||||||
|
## Code Blocks
|
||||||
|
|
||||||
|
#### Code block with backticks
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Example HTML5 Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Test</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Code block indented with four spaces
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Example HTML5 Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Test</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
#### Code block with Hugo's internal highlight shortcode
|
||||||
|
{{< highlight html >}}
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Example HTML5 Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Test</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{< /highlight >}}
|
||||||
|
|
||||||
|
## List Types
|
||||||
|
|
||||||
|
#### Ordered List
|
||||||
|
|
||||||
|
1. First item
|
||||||
|
2. Second item
|
||||||
|
3. Third item
|
||||||
|
|
||||||
|
#### Unordered List
|
||||||
|
|
||||||
|
* List item
|
||||||
|
* Another item
|
||||||
|
* And another item
|
||||||
|
|
||||||
|
#### Nested list
|
||||||
|
|
||||||
|
* Fruit
|
||||||
|
* Apple
|
||||||
|
* Orange
|
||||||
|
* Banana
|
||||||
|
* Dairy
|
||||||
|
* Milk
|
||||||
|
* Cheese
|
||||||
|
|
||||||
|
## Other Elements — abbr, sub, sup, kbd, mark
|
||||||
|
|
||||||
|
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||||
|
|
||||||
|
H<sub>2</sub>O
|
||||||
|
|
||||||
|
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||||
|
|
||||||
|
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||||
|
|
||||||
|
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
49
site/content/post/math-typesetting.md
Normal file
49
site/content/post/math-typesetting.md
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
---
|
||||||
|
author: Hugo Authors
|
||||||
|
title: Math Typesetting
|
||||||
|
date: 2019-03-08
|
||||||
|
description: A brief guide to setup KaTeX
|
||||||
|
math: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
In this example we will be using [KaTeX](https://katex.org/)
|
||||||
|
|
||||||
|
- Create a partial under `/layouts/partials/math.html`
|
||||||
|
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
|
||||||
|
- Include the partial in your templates like so:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
{{ if or .Params.math .Site.Params.math }}
|
||||||
|
{{ partial "math.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
```
|
||||||
|
|
||||||
|
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
|
||||||
|
- To enable KaTex on a per page basis include the parameter `math: true` in content files
|
||||||
|
|
||||||
|
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
|
||||||
|
|
||||||
|
{{< math.inline >}}
|
||||||
|
{{ if or .Page.Params.math .Site.Params.math }}
|
||||||
|
<!-- KaTeX -->
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||||
|
{{ end }}
|
||||||
|
{{</ math.inline >}}
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
{{< math.inline >}}
|
||||||
|
<p>
|
||||||
|
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
|
||||||
|
</p>
|
||||||
|
{{</ math.inline >}}
|
||||||
|
|
||||||
|
Block math:
|
||||||
|
$$
|
||||||
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
|
$$
|
45
site/content/post/placeholder-text.md
Normal file
45
site/content/post/placeholder-text.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
+++
|
||||||
|
author = "Hugo Authors"
|
||||||
|
title = "Placeholder Text"
|
||||||
|
date = "2019-03-09"
|
||||||
|
description = "Lorem Ipsum Dolor Si Amet"
|
||||||
|
tags = [
|
||||||
|
"markdown",
|
||||||
|
"text",
|
||||||
|
]
|
||||||
|
+++
|
||||||
|
|
||||||
|
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||||
|
|
||||||
|
1. Exierant elisi ambit vivere dedere
|
||||||
|
2. Duce pollice
|
||||||
|
3. Eris modo
|
||||||
|
4. Spargitque ferrea quos palude
|
||||||
|
|
||||||
|
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||||
|
|
||||||
|
1. Comas hunc haec pietate fetum procerum dixit
|
||||||
|
2. Post torum vates letum Tiresia
|
||||||
|
3. Flumen querellas
|
||||||
|
4. Arcanaque montibus omnes
|
||||||
|
5. Quidem et
|
||||||
|
|
||||||
|
# Vagus elidunt
|
||||||
|
|
||||||
|
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||||
|
|
||||||
|
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||||
|
|
||||||
|
## Mane refeci capiebant unda mulcebat
|
||||||
|
|
||||||
|
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||||
|
|
||||||
|
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
|
||||||
|
|
||||||
|
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
|
||||||
|
|
||||||
|
{{< css.inline >}}
|
||||||
|
<style>
|
||||||
|
.canon { background: white; width: 100%; height: auto; }
|
||||||
|
</style>
|
||||||
|
{{< /css.inline >}}
|
34
site/content/post/rich-content.md
Normal file
34
site/content/post/rich-content.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
+++
|
||||||
|
author = "Hugo Authors"
|
||||||
|
title = "Rich Content"
|
||||||
|
date = "2019-03-10"
|
||||||
|
description = "A brief description of Hugo Shortcodes"
|
||||||
|
tags = [
|
||||||
|
"shortcodes",
|
||||||
|
"privacy",
|
||||||
|
]
|
||||||
|
+++
|
||||||
|
|
||||||
|
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
||||||
|
<!--more-->
|
||||||
|
---
|
||||||
|
|
||||||
|
## YouTube Privacy Enhanced Shortcode
|
||||||
|
|
||||||
|
{{< youtube ZJthWmvUzzc >}}
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Twitter Simple Shortcode
|
||||||
|
|
||||||
|
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Vimeo Simple Shortcode
|
||||||
|
|
||||||
|
{{< vimeo_simple 48912912 >}}
|
57
site/content/post/shortcodes.md
Normal file
57
site/content/post/shortcodes.md
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
+++
|
||||||
|
title = "Shortcodes"
|
||||||
|
description = "A description of theme-specific shortcodes"
|
||||||
|
date = "2021-06-21"
|
||||||
|
author = "Hugo Authors"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Tips for sidenotes.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
## Sidenotes
|
||||||
|
|
||||||
|
[LaTeX.css](https://latex.vercel.app/), which HugoTeX is using, defines syntax for sidenotes. However, as it is a little verbose to write, we provide a Hugo shortcode for that:
|
||||||
|
|
||||||
|
```md
|
||||||
|
A sentence deserving a sidenote.{{%/* sidenote */%}}The note itself.{{%/* /sidenote */%}}.
|
||||||
|
```
|
||||||
|
|
||||||
|
Will render into
|
||||||
|
|
||||||
|
---
|
||||||
|
A sentence deserving a sidenote.{{% sidenote %}}The note itself.{{% /sidenote %}}.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Tables
|
||||||
|
|
||||||
|
Another shortcode allows to insert tables with captions:
|
||||||
|
|
||||||
|
```md
|
||||||
|
{{< table title="A sample table with a descriptive caption via [LaTeX.css](https://latex.vercel.app/)." >}}
|
||||||
|
| Header 1 | Header 2 | Header 3 |
|
||||||
|
|---------------|---------------|---------------|
|
||||||
|
| Description 1 | Description 2 | Description 3 |
|
||||||
|
| Description 1 | Description 2 | Description 3 |
|
||||||
|
| Description 1 | Description 2 | Description 3 |
|
||||||
|
|---------------|---------------|---------------|
|
||||||
|
| Footer 1 | Footer 2 | Footer 3 |
|
||||||
|
{{< /table >}}
|
||||||
|
```
|
||||||
|
|
||||||
|
Will render into
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
{{< table title="A sample table with a descriptive caption via [LaTeX.css](https://latex.vercel.app/)." >}}
|
||||||
|
| Header 1 | Header 2 | Header 3 |
|
||||||
|
|---------------|---------------|---------------|
|
||||||
|
| Description 1 | Description 2 | Description 3 |
|
||||||
|
| Description 1 | Description 2 | Description 3 |
|
||||||
|
| Description 1 | Description 2 | Description 3 |
|
||||||
|
|---------------|---------------|---------------|
|
||||||
|
| Footer 1 | Footer 2 | Footer 3 |
|
||||||
|
{{< /table >}}
|
||||||
|
|
||||||
|
---
|
25
site/hugo.toml
Normal file
25
site/hugo.toml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
baseURL = "https://functor.systems"
|
||||||
|
title = "functor.systems"
|
||||||
|
languageCode = "en"
|
||||||
|
DefaultContentLanguage = "en"
|
||||||
|
enableInlineShortcodes = true
|
||||||
|
footnoteReturnLinkContents = "^"
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 3
|
||||||
|
|
||||||
|
[taxonomies]
|
||||||
|
category = "categories"
|
||||||
|
tag = "tags"
|
||||||
|
series = "series"
|
||||||
|
|
||||||
|
[markup]
|
||||||
|
[markup.goldmark]
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe = true
|
||||||
|
[markup.highlight]
|
||||||
|
style = "paraiso-dark"
|
||||||
|
|
||||||
|
[Params]
|
||||||
|
twittercard = true
|
||||||
|
opengraph = true
|
BIN
static/css/fonts/LM-bold-italic.ttf
Normal file
BIN
static/css/fonts/LM-bold-italic.ttf
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-bold-italic.woff
Normal file
BIN
static/css/fonts/LM-bold-italic.woff
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-bold-italic.woff2
Normal file
BIN
static/css/fonts/LM-bold-italic.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-bold.ttf
Normal file
BIN
static/css/fonts/LM-bold.ttf
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-bold.woff
Normal file
BIN
static/css/fonts/LM-bold.woff
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-bold.woff2
Normal file
BIN
static/css/fonts/LM-bold.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-italic.ttf
Normal file
BIN
static/css/fonts/LM-italic.ttf
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-italic.woff
Normal file
BIN
static/css/fonts/LM-italic.woff
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-italic.woff2
Normal file
BIN
static/css/fonts/LM-italic.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-regular.ttf
Normal file
BIN
static/css/fonts/LM-regular.ttf
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-regular.woff
Normal file
BIN
static/css/fonts/LM-regular.woff
Normal file
Binary file not shown.
BIN
static/css/fonts/LM-regular.woff2
Normal file
BIN
static/css/fonts/LM-regular.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/Libertinus-bold-italic.woff2
Normal file
BIN
static/css/fonts/Libertinus-bold-italic.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/Libertinus-bold.woff2
Normal file
BIN
static/css/fonts/Libertinus-bold.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/Libertinus-italic.woff2
Normal file
BIN
static/css/fonts/Libertinus-italic.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/Libertinus-regular.woff2
Normal file
BIN
static/css/fonts/Libertinus-regular.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/Libertinus-semibold-italic.woff2
Normal file
BIN
static/css/fonts/Libertinus-semibold-italic.woff2
Normal file
Binary file not shown.
BIN
static/css/fonts/Libertinus-semibold.woff2
Normal file
BIN
static/css/fonts/Libertinus-semibold.woff2
Normal file
Binary file not shown.
732
static/css/latex.css
Normal file
732
static/css/latex.css
Normal file
|
@ -0,0 +1,732 @@
|
||||||
|
/*!
|
||||||
|
* Taken from LaTeX.css (https://latex.now.sh/)
|
||||||
|
*
|
||||||
|
* Source: https://github.com/vincentdoerig/latex-css
|
||||||
|
* Licensed under MIT (https://github.com/vincentdoerig/latex-css/blob/master/LICENSE)
|
||||||
|
*
|
||||||
|
* Modified for this usecase.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Latin Modern';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/LM-regular.woff2') format('woff2'),
|
||||||
|
url('./fonts/LM-regular.woff') format('woff'),
|
||||||
|
url('./fonts/LM-regular.ttf') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Latin Modern';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: normal;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/LM-italic.woff2') format('woff2'),
|
||||||
|
url('./fonts/LM-italic.woff') format('woff'),
|
||||||
|
url('./fonts/LM-italic.ttf') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Latin Modern';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: bold;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/LM-bold.woff2') format('woff2'),
|
||||||
|
url('./fonts/LM-bold.woff') format('woff'),
|
||||||
|
url('./fonts/LM-bold.ttf') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Latin Modern';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/LM-bold-italic.woff2') format('woff2'),
|
||||||
|
url('./fonts/LM-bold-italic.woff') format('woff'),
|
||||||
|
url('./fonts/LM-bold-italic.ttf') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Libertinus';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/Libertinus-regular.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Libertinus';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: normal;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/Libertinus-italic.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Libertinus';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: bold;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/Libertinus-bold.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Libertinus';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/Libertinus-bold-italic.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Libertinus';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/Libertinus-semibold.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Libertinus';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 600;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('./fonts/Libertinus-semibold-italic.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Box sizing rules */
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--body-color: hsl(0, 5%, 10%);
|
||||||
|
--body-bg-color: hsl(210, 20%, 98%);
|
||||||
|
--link-visited: hsl(0, 100%, 33%);
|
||||||
|
--link-focus-outline: hsl(220, 90%, 52%);
|
||||||
|
--pre-bg-color: hsl(210, 28%, 93%);
|
||||||
|
--kbd-bg-color: hsl(210, 5%, 100%);
|
||||||
|
--kbd-border-color: hsl(210, 5%, 70%);
|
||||||
|
--table-border-color: black;
|
||||||
|
--border-width-thin: 1.36px;
|
||||||
|
--border-width-thick: 2.27px;
|
||||||
|
--sidenote-target-border-color: hsl(55, 55%, 70%);
|
||||||
|
--footnotes-border-color: hsl(0, 0%, 39%);
|
||||||
|
--text-indent-size: 1.463rem; /* In 12pt [Latin Modern font] LaTeX article
|
||||||
|
\parindent =~ 17.625pt; taking also into account the ratio
|
||||||
|
1pt[LaTeX] = (72 / 72.27) * 1pt[HTML], with default 12pt/1rem LaTeX.css font
|
||||||
|
size, the indentation value in rem CSS units is:
|
||||||
|
\parindent =~ 17.625 * (72 / 72.27) / 12 = 1.463rem. */
|
||||||
|
}
|
||||||
|
|
||||||
|
.latex-dark {
|
||||||
|
--body-color: hsl(0, 0%, 86%);
|
||||||
|
--body-bg-color: hsl(0, 0%, 16%);
|
||||||
|
--link-visited: hsl(196 80% 77%);
|
||||||
|
--link-focus-outline: hsl(215, 63%, 73%);
|
||||||
|
--pre-bg-color: hsl(0, 1%, 25%);
|
||||||
|
--kbd-bg-color: hsl(0, 0%, 16%);
|
||||||
|
--kbd-border-color: hsl(210, 5%, 70%);
|
||||||
|
--table-border-color: white;
|
||||||
|
--sidenote-target-border-color: hsl(0, 0%, 59%);
|
||||||
|
--footnotes-border-color: hsl(0, 0%, 59%);
|
||||||
|
--proof-symbol-filter: invert(80%);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.latex-dark-auto {
|
||||||
|
--body-color: hsl(0, 0%, 86%);
|
||||||
|
--body-bg-color: hsl(0, 0%, 16%);
|
||||||
|
--link-visited: hsl(196 80% 77%);
|
||||||
|
--link-focus-outline: hsl(215, 63%, 73%);
|
||||||
|
--pre-bg-color: hsl(0, 1%, 25%);
|
||||||
|
--kbd-bg-color: hsl(0, 0%, 16%);
|
||||||
|
--kbd-border-color: hsl(210, 5%, 70%);
|
||||||
|
--table-border-color: white;
|
||||||
|
--sidenote-target-border-color: hsl(0, 0%, 59%);
|
||||||
|
--footnotes-border-color: hsl(0, 0%, 59%);
|
||||||
|
--proof-symbol-filter: invert(80%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove default margin */
|
||||||
|
body,
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
p,
|
||||||
|
ul[class],
|
||||||
|
ol[class],
|
||||||
|
li,
|
||||||
|
figure,
|
||||||
|
figcaption,
|
||||||
|
dl,
|
||||||
|
dd {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make default font-size 1rem and add smooth scrolling to anchors */
|
||||||
|
html {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
html {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body.libertinus {
|
||||||
|
font-family: 'Libertinus', Georgia, Cambria, 'Times New Roman', Times, serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Latin Modern', Georgia, Cambria, 'Times New Roman', Times, serif;
|
||||||
|
line-height: 1.8;
|
||||||
|
|
||||||
|
max-width: 90ch;
|
||||||
|
min-height: 100vh;
|
||||||
|
overflow-x: hidden;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 2rem 1.25rem;
|
||||||
|
|
||||||
|
counter-reset: theorem definition sidenote-counter;
|
||||||
|
|
||||||
|
color: var(--body-color);
|
||||||
|
background-color: var(--body-bg-color);
|
||||||
|
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Justify and hyphenate all paragraphs */
|
||||||
|
p {
|
||||||
|
text-align: justify;
|
||||||
|
hyphens: auto;
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
-moz-hyphens: auto;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Indents paragraphs like in LaTeX documents*/
|
||||||
|
.indent-pars p {
|
||||||
|
text-indent: var(--text-indent-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.indent-pars p.no-indent,
|
||||||
|
p.no-indent {
|
||||||
|
text-indent: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.indent-pars ol p,
|
||||||
|
.indent-pars ul p {
|
||||||
|
text-indent: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.indent-pars h2 + p,
|
||||||
|
.indent-pars h3 + p,
|
||||||
|
.indent-pars h4 + p {
|
||||||
|
text-indent: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A elements that don't have a class get default styles */
|
||||||
|
a:not([class]) {
|
||||||
|
text-decoration-skip-ink: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make links red */
|
||||||
|
a,
|
||||||
|
a:visited {
|
||||||
|
color: var(--link-visited);
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus {
|
||||||
|
outline-offset: 2px;
|
||||||
|
outline: 2px solid var(--link-focus-outline);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make images easier to work with */
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inherit fonts for inputs and buttons */
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
textarea,
|
||||||
|
select {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Prevent textarea from overflowing */
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Natural flow and rhythm in articles by default */
|
||||||
|
article > * + * {
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Styles for inline code or code snippets */
|
||||||
|
code,
|
||||||
|
pre,
|
||||||
|
kbd {
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||||
|
monospace;
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
padding: 1rem 1.4rem;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--pre-bg-color);
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
font-size: 95%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
kbd {
|
||||||
|
background: var(--kbd-bg-color);
|
||||||
|
border: 1px solid var(--kbd-border-color);
|
||||||
|
border-radius: 2px;
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Better tables */
|
||||||
|
table:not(.borders-custom) {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
width: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
border-top: var(--border-width-thick) solid var(--table-border-color);
|
||||||
|
border-bottom: var(--border-width-thick) solid var(--table-border-color);
|
||||||
|
/* display: block; */
|
||||||
|
overflow-x: auto; /* does not work because element is not block */
|
||||||
|
/* white-space: nowrap; */
|
||||||
|
counter-increment: caption;
|
||||||
|
}
|
||||||
|
/* add bottom border on column table headings */
|
||||||
|
table:not(.borders-custom) tr > th[scope='col'] {
|
||||||
|
border-bottom: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
/* add right border on row table headings */
|
||||||
|
table:not(.borders-custom) tr > th[scope='row'] {
|
||||||
|
border-right: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
table:not(.borders-custom) > tbody > tr:first-child > td,
|
||||||
|
table:not(.borders-custom) > tbody > tr:first-child > th {
|
||||||
|
border-top: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
table:not(.borders-custom) > tbody > tr:last-child > td,
|
||||||
|
table:not(.borders-custom) > tbody > tr:last-child > th {
|
||||||
|
border-bottom: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.5rem;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
/* Table caption */
|
||||||
|
caption {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.923em;
|
||||||
|
/* border-bottom: 2pt solid #000; */
|
||||||
|
padding: 0 0.25em 0.25em;
|
||||||
|
width: 100%;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption::before {
|
||||||
|
content: 'Table ' counter(caption) '. ';
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* allow scroll on the x-axis */
|
||||||
|
.scroll-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if a table is wrapped in a scroll wrapper,
|
||||||
|
the table cells shouldn't wrap */
|
||||||
|
.scroll-wrapper > table td {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table custom borders */
|
||||||
|
table.borders-custom {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
width: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
counter-increment: caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
.border-top-thick {
|
||||||
|
border-top: var(--border-width-thick) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
.border-right-thick {
|
||||||
|
border-right: var(--border-width-thick) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
.border-bottom-thick {
|
||||||
|
border-bottom: var(--border-width-thick) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
.border-left-thick {
|
||||||
|
border-left: var(--border-width-thick) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.border-top-thin {
|
||||||
|
border-top: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
.border-right-thin {
|
||||||
|
border-right: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
.border-bottom-thin {
|
||||||
|
border-bottom: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
.border-left-thin {
|
||||||
|
border-left: var(--border-width-thin) solid var(--table-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table column alignment */
|
||||||
|
.col-1-l tr > :nth-child(1),
|
||||||
|
.col-2-l tr > :nth-child(2),
|
||||||
|
.col-3-l tr > :nth-child(3),
|
||||||
|
.col-4-l tr > :nth-child(4),
|
||||||
|
.col-5-l tr > :nth-child(5),
|
||||||
|
.col-6-l tr > :nth-child(6),
|
||||||
|
.col-7-l tr > :nth-child(7),
|
||||||
|
.col-8-l tr > :nth-child(8),
|
||||||
|
.col-9-l tr > :nth-child(9),
|
||||||
|
.col-10-l tr > :nth-child(10),
|
||||||
|
.col-11-l tr > :nth-child(11),
|
||||||
|
.col-12-l tr > :nth-child(12) {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.col-1-c tr > :nth-child(1),
|
||||||
|
.col-2-c tr > :nth-child(2),
|
||||||
|
.col-3-c tr > :nth-child(3),
|
||||||
|
.col-4-c tr > :nth-child(4),
|
||||||
|
.col-5-c tr > :nth-child(5),
|
||||||
|
.col-6-c tr > :nth-child(6),
|
||||||
|
.col-7-c tr > :nth-child(7),
|
||||||
|
.col-8-c tr > :nth-child(8),
|
||||||
|
.col-9-c tr > :nth-child(9),
|
||||||
|
.col-10-c tr > :nth-child(10),
|
||||||
|
.col-11-c tr > :nth-child(11),
|
||||||
|
.col-12-c tr > :nth-child(12) {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.col-1-r tr > :nth-child(1),
|
||||||
|
.col-2-r tr > :nth-child(2),
|
||||||
|
.col-3-r tr > :nth-child(3),
|
||||||
|
.col-4-r tr > :nth-child(4),
|
||||||
|
.col-5-r tr > :nth-child(5),
|
||||||
|
.col-6-r tr > :nth-child(6),
|
||||||
|
.col-7-r tr > :nth-child(7),
|
||||||
|
.col-8-r tr > :nth-child(8),
|
||||||
|
.col-9-r tr > :nth-child(9),
|
||||||
|
.col-10-r tr > :nth-child(10),
|
||||||
|
.col-11-r tr > :nth-child(11),
|
||||||
|
.col-12-r tr > :nth-child(12) {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Center align the title */
|
||||||
|
h1:first-child {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nested ordered list for ToC */
|
||||||
|
nav ol {
|
||||||
|
counter-reset: item;
|
||||||
|
padding-left: 2rem;
|
||||||
|
}
|
||||||
|
nav li {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
nav li:before {
|
||||||
|
content: counters(item, '.') ' ';
|
||||||
|
counter-increment: item;
|
||||||
|
padding-right: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Center definitions (most useful for display equations) */
|
||||||
|
dl dd {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Theorem */
|
||||||
|
.theorem {
|
||||||
|
counter-increment: theorem;
|
||||||
|
display: block;
|
||||||
|
margin: 12px 0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.theorem::before {
|
||||||
|
content: 'Theorem ' counter(theorem) '. ';
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Lemma */
|
||||||
|
.lemma {
|
||||||
|
counter-increment: theorem;
|
||||||
|
display: block;
|
||||||
|
margin: 12px 0;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.lemma::before {
|
||||||
|
content: 'Lemma ' counter(theorem) '. ';
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Proof */
|
||||||
|
.proof {
|
||||||
|
display: block;
|
||||||
|
margin: 12px 0;
|
||||||
|
font-style: normal;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.proof::before {
|
||||||
|
content: 'Proof. ' attr(title);
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.proof:after {
|
||||||
|
content: '◾️';
|
||||||
|
filter: var(--proof-symbol-filter);
|
||||||
|
position: absolute;
|
||||||
|
right: -12px;
|
||||||
|
bottom: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Definition */
|
||||||
|
.definition {
|
||||||
|
counter-increment: definition;
|
||||||
|
display: block;
|
||||||
|
margin: 12px 0;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.definition::before {
|
||||||
|
content: 'Definition ' counter(definition) '. ';
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Center align author name, use small caps and add vertical spacing */
|
||||||
|
.author {
|
||||||
|
margin: 0.85rem 0;
|
||||||
|
font-variant-caps: small-caps;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sidenotes */
|
||||||
|
|
||||||
|
.sidenote {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
width: 18vw;
|
||||||
|
margin-right: -20vw;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
text-indent: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidenote.left {
|
||||||
|
float: left;
|
||||||
|
margin-left: -20vw;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
text-indent: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (WIP) add border when a sidenote is clicked on */
|
||||||
|
.sidenote:target {
|
||||||
|
border: var(--sidenote-target-border-color) 1.5px solid;
|
||||||
|
padding: 0 .5rem;
|
||||||
|
scroll-margin-block-start: 10rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sidenote counter */
|
||||||
|
.sidenote-number {
|
||||||
|
counter-increment: sidenote-counter;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidenote-number::after,
|
||||||
|
.sidenote::before {
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add number in main content */
|
||||||
|
.sidenote-number::after {
|
||||||
|
content: counter(sidenote-counter);
|
||||||
|
font-size: 0.7rem;
|
||||||
|
top: -0.5rem;
|
||||||
|
left: 0.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add number in front of the sidenote */
|
||||||
|
.sidenote-number ~ .sidenote::before {
|
||||||
|
content: counter(sidenote-counter) ' ';
|
||||||
|
font-size: 0.7rem;
|
||||||
|
top: -0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.sidenote-toggle:not(.sidenote-number) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sidenotes inside blockquotes are indented more */
|
||||||
|
blockquote .sidenote {
|
||||||
|
margin-right: -24vw;
|
||||||
|
width: 18vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
label.sidenote-toggle {
|
||||||
|
display: inline;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.sidenote-toggle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1050px) {
|
||||||
|
label.sidenote-toggle:not(.sidenote-number) {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.sidenote {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.sidenote-toggle:checked + .sidenote {
|
||||||
|
display: block;
|
||||||
|
margin: 0.5rem 1.25rem 1rem 0.5rem;
|
||||||
|
float: left;
|
||||||
|
left: 1rem;
|
||||||
|
clear: both;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
/* tweak indentation of sidenote inside a blockquote */
|
||||||
|
blockquote .sidenote {
|
||||||
|
margin-right: -25vw;
|
||||||
|
width: 16vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make footnote text smaller and left align it (looks bad with long URLs) */
|
||||||
|
.footnotes p {
|
||||||
|
text-align: left;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-size: 85%;
|
||||||
|
margin-bottom: 0.4rem;
|
||||||
|
}
|
||||||
|
.footnotes {
|
||||||
|
border-top: 1px solid var(--footnotes-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Center title and paragraph */
|
||||||
|
.abstract,
|
||||||
|
.abstract p {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.abstract {
|
||||||
|
margin: 2.25rem 0;
|
||||||
|
}
|
||||||
|
.abstract > h2 {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-bottom: -0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Format the LaTeX symbol correctly (a higher up, e lower) */
|
||||||
|
.latex span:nth-child(1) {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 0.75em;
|
||||||
|
vertical-align: 0.28em;
|
||||||
|
margin-left: -0.48em;
|
||||||
|
margin-right: -0.15em;
|
||||||
|
line-height: 1ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.latex span:nth-child(2) {
|
||||||
|
text-transform: uppercase;
|
||||||
|
vertical-align: -0.5ex;
|
||||||
|
margin-left: -0.1667em;
|
||||||
|
margin-right: -0.125em;
|
||||||
|
line-height: 1ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Heading typography */
|
||||||
|
h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
line-height: 3.25rem;
|
||||||
|
margin-bottom: 1.625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.7rem;
|
||||||
|
line-height: 2rem;
|
||||||
|
margin-top: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-top: 1.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
line-height: 1.625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 + h2 {
|
||||||
|
margin-top: 1.625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 + h3,
|
||||||
|
h3 + h4,
|
||||||
|
h4 + h5 {
|
||||||
|
margin-top: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 + h6 {
|
||||||
|
margin-top: -0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
margin-bottom: 0.8rem;
|
||||||
|
}
|
33
static/css/main.css
Normal file
33
static/css/main.css
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
footer .theme-by {
|
||||||
|
text-align: center;
|
||||||
|
margin: 100px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pager {
|
||||||
|
list-style: none;
|
||||||
|
text-align: center;
|
||||||
|
margin: 20px 0 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pager ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pager .previous > a {
|
||||||
|
margin: 20px 0 0;
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pager .next > a {
|
||||||
|
margin: 20px 0 0;
|
||||||
|
float: right;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 800px) {
|
||||||
|
html {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
};
|
||||||
|
}
|
1
static/js/tex-mml-chtml.js
Normal file
1
static/js/tex-mml-chtml.js
Normal file
File diff suppressed because one or more lines are too long
13
theme.toml
Normal file
13
theme.toml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
name = "HugoTeX"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://github.com/kaisugi/HugoTeX/blob/master/LICENSE"
|
||||||
|
description = "LaTeX style hugo theme"
|
||||||
|
homepage = "https://github.com/kaisugi/HugoTeX"
|
||||||
|
demosite = "https://hugotex.vercel.app/"
|
||||||
|
tags = ["dark", "light", "blog", "minimal", "simple", "LaTeX"]
|
||||||
|
features = ["minimal", "simple", "responsive", "syntax highlight", "LaTeX"]
|
||||||
|
min_version = "0.128.0"
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "kaisugi"
|
||||||
|
homepage = "https://github.com/kaisugi"
|
6
treefmt.nix
Normal file
6
treefmt.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
projectRootFile = "flake.nix";
|
||||||
|
programs.nixfmt.enable = true;
|
||||||
|
programs.taplo.enable = true;
|
||||||
|
}
|
7
vercel.json
Normal file
7
vercel.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"env": {
|
||||||
|
"HUGO_VERSION": "0.134.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue