5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gif filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ico filter=lfs diff=lfs merge=lfs -text
|
5
archetypes/default.md
Normal file
5
archetypes/default.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
+++
|
||||||
|
date = '{{ .Date }}'
|
||||||
|
draft = true
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
+++
|
4
hugo.toml
Normal file
4
hugo.toml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
baseURL = 'https://www.karaolidis.com/'
|
||||||
|
languageCode = 'en-us'
|
||||||
|
title = 'Jupiter Lab'
|
||||||
|
theme = 'caldwell-59'
|
5
themes/caldwell-59/archetypes/default.md
Normal file
5
themes/caldwell-59/archetypes/default.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
+++
|
||||||
|
date = '{{ .Date }}'
|
||||||
|
draft = true
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
+++
|
22
themes/caldwell-59/assets/css/main.css
Normal file
22
themes/caldwell-59/assets/css/main.css
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
body {
|
||||||
|
color: #222;
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 1rem;
|
||||||
|
max-width: 768px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid #222;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
border-top: 1px solid #222;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #00e;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
1
themes/caldwell-59/assets/js/main.js
Normal file
1
themes/caldwell-59/assets/js/main.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
console.log("This site was generated by Hugo.");
|
20
themes/caldwell-59/hugo.toml
Normal file
20
themes/caldwell-59/hugo.toml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[menus]
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Home'
|
||||||
|
pageRef = '/'
|
||||||
|
weight = 10
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Posts'
|
||||||
|
pageRef = '/posts'
|
||||||
|
weight = 20
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Tags'
|
||||||
|
pageRef = '/tags'
|
||||||
|
weight = 30
|
||||||
|
|
||||||
|
[module]
|
||||||
|
[module.hugoVersion]
|
||||||
|
extended = false
|
||||||
|
min = '0.146.0'
|
1
themes/caldwell-59/layouts/_partials/footer.html
Normal file
1
themes/caldwell-59/layouts/_partials/footer.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<p>Copyright {{ now.Year }}. All rights reserved.</p>
|
11
themes/caldwell-59/layouts/_partials/head.html
Normal file
11
themes/caldwell-59/layouts/_partials/head.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ site.Title }}
|
||||||
|
{{ else }}
|
||||||
|
{{ printf "%s | %s" .Title site.Title }}
|
||||||
|
{{ end }}
|
||||||
|
</title>
|
||||||
|
{{ partialCached "head/css.html" . }}
|
||||||
|
{{ partialCached "head/js.html" . }}
|
14
themes/caldwell-59/layouts/_partials/head/css.html
Normal file
14
themes/caldwell-59/layouts/_partials/head/css.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{{- with resources.Get "css/main.css" }}
|
||||||
|
{{- if hugo.IsDevelopment }}
|
||||||
|
<link rel="stylesheet" href="{{ .RelPermalink }}" />
|
||||||
|
{{- else }}
|
||||||
|
{{- with . | minify | fingerprint }}
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="{{ .RelPermalink }}"
|
||||||
|
integrity="{{ .Data.Integrity }}"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
20
themes/caldwell-59/layouts/_partials/head/js.html
Normal file
20
themes/caldwell-59/layouts/_partials/head/js.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{{- with resources.Get "js/main.js" }}
|
||||||
|
{{- $opts := dict
|
||||||
|
"minify" (not hugo.IsDevelopment)
|
||||||
|
"sourceMap" (cond hugo.IsDevelopment "external" "")
|
||||||
|
"targetPath" "js/main.js"
|
||||||
|
}}
|
||||||
|
{{- with . | js.Build $opts }}
|
||||||
|
{{- if hugo.IsDevelopment }}
|
||||||
|
<script src="{{ .RelPermalink }}"></script>
|
||||||
|
{{- else }}
|
||||||
|
{{- with . | fingerprint }}
|
||||||
|
<script
|
||||||
|
src="{{ .RelPermalink }}"
|
||||||
|
integrity="{{ .Data.Integrity }}"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
2
themes/caldwell-59/layouts/_partials/header.html
Normal file
2
themes/caldwell-59/layouts/_partials/header.html
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<h1>{{ site.Title }}</h1>
|
||||||
|
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
52
themes/caldwell-59/layouts/_partials/menu.html
Normal file
52
themes/caldwell-59/layouts/_partials/menu.html
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{{- /*
|
||||||
|
Renders a menu for the given menu ID.
|
||||||
|
|
||||||
|
@context {page} page The current page.
|
||||||
|
@context {string} menuID The menu ID.
|
||||||
|
|
||||||
|
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .)
|
||||||
|
}}
|
||||||
|
*/}}
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- $menuID := .menuID }}
|
||||||
|
|
||||||
|
{{- with index site.Menus $menuID }}
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "_partials/inline/menu/walk.html" }}
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- range .menuEntries }}
|
||||||
|
{{- $attrs := dict "href" .URL }}
|
||||||
|
{{- if $page.IsMenuCurrent .Menu . }}
|
||||||
|
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
|
||||||
|
{{- else if $page.HasMenuCurrent .Menu . }}
|
||||||
|
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $name := .Name }}
|
||||||
|
{{- with .Identifier }}
|
||||||
|
{{- with T . }}
|
||||||
|
{{- $name = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
{{- range $k, $v := $attrs }}
|
||||||
|
{{- with $v }}
|
||||||
|
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
>{{ $name }}</a
|
||||||
|
>
|
||||||
|
{{- with .Children }}
|
||||||
|
<ul>
|
||||||
|
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
</li>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
23
themes/caldwell-59/layouts/_partials/terms.html
Normal file
23
themes/caldwell-59/layouts/_partials/terms.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{{- /*
|
||||||
|
For a given taxonomy, renders a list of terms assigned to the page.
|
||||||
|
|
||||||
|
@context {page} page The current page.
|
||||||
|
@context {string} taxonomy The taxonomy.
|
||||||
|
|
||||||
|
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .)
|
||||||
|
}}
|
||||||
|
*/}}
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- $taxonomy := .taxonomy }}
|
||||||
|
|
||||||
|
{{- with $page.GetTerms $taxonomy }}
|
||||||
|
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||||
|
<div>
|
||||||
|
<div>{{ $label }}:</div>
|
||||||
|
<ul>
|
||||||
|
{{- range . }}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
20
themes/caldwell-59/layouts/baseof.html
Normal file
20
themes/caldwell-59/layouts/baseof.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html
|
||||||
|
lang="{{ site.Language.LanguageCode }}"
|
||||||
|
dir="{{ or site.Language.LanguageDirection `ltr` }}"
|
||||||
|
>
|
||||||
|
<head>
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
{{ block "main" . }}{{ end }}
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
7
themes/caldwell-59/layouts/home.html
Normal file
7
themes/caldwell-59/layouts/home.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ range site.RegularPages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
{{ .Summary }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
10
themes/caldwell-59/layouts/page.html
Normal file
10
themes/caldwell-59/layouts/page.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||||
|
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||||
|
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||||
|
{{ end }}
|
8
themes/caldwell-59/layouts/section.html
Normal file
8
themes/caldwell-59/layouts/section.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
{{ .Summary }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
7
themes/caldwell-59/layouts/taxonomy.html
Normal file
7
themes/caldwell-59/layouts/taxonomy.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
7
themes/caldwell-59/layouts/term.html
Normal file
7
themes/caldwell-59/layouts/term.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
31
treefmt.nix
31
treefmt.nix
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
|
|
||||||
@@ -8,12 +8,29 @@
|
|||||||
strict = true;
|
strict = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
prettier.enable = true;
|
taplo.enable = true;
|
||||||
};
|
|
||||||
|
prettier = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
plugins = [
|
||||||
excludes = [ ".envrc" ];
|
"${pkgs.prettier-plugin-go-template}/lib/node_modules/prettier-plugin-go-template/lib/index.js"
|
||||||
};
|
];
|
||||||
};
|
|
||||||
|
overrides = [
|
||||||
|
{
|
||||||
|
files = [ "*.html" ];
|
||||||
|
options.parser = "go-template";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
settings.global.excludes = [
|
||||||
|
".envrc"
|
||||||
|
"public/**"
|
||||||
|
"static/**"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user