Skip to content

Commit 235d366

Browse files
committed
Hugo theme, with a blog
1 parent 5742ccd commit 235d366

File tree

22 files changed

+368
-20
lines changed

22 files changed

+368
-20
lines changed

.github/workflows/hugo.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Hugo site to Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Hugo
24+
uses: peaceiris/actions-hugo@v2
25+
with:
26+
hugo-version: "latest"
27+
28+
- name: Build
29+
run: hugo --minify
30+
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./public
35+
36+
deploy:
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
needs: build
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public
2+
.hugo_build.lock

README.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

config.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
baseURL = ""
2+
title = "Easy Diffusion"
3+
theme = "ed-theme"
4+
5+
[pagination]
6+
pagerSize = 15
7+
8+
[permalinks]
9+
[permalinks.page]
10+
posts = "/notes/:year/:month/:slug/"
11+
12+
[taxonomies]
13+
tag = "tags"
14+
15+
[mediaTypes]
16+
[mediaTypes."application/atom+xml"]
17+
suffixes = ["xml"]
18+
19+
[outputFormats]
20+
[outputFormats.atom]
21+
mediaType = "application/atom+xml"
22+
noUgly = true
23+
baseName = "atom"
24+
25+
[outputs]
26+
home = ["HTML", "atom"]
27+
taxonomy = ["HTML"]
28+
term = ["HTML"]
29+
30+
[minify]
31+
disableHTML = true
32+
33+
relativeURLs = true
34+
canonifyURLs = false
35+
36+
disableKinds = ["RSS"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{ $result := transform.HighlightCodeBlock . }}
2+
{{ $result.Wrapped }}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
7+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
8+
<link rel="shortcut icon" href="/favicon.ico?1">
9+
10+
<title>Easy Diffusion v3 | A simple 1-click way to create beautiful images on your computer, by installing Stable Diffusion. No dependencies or technical knowledge required</title>
11+
12+
<meta property="og:title" content="Easy Diffusion v3" />
13+
<meta property="og:locale" content="en_US" />
14+
<meta name="description" content="A simple 1-click way to create beautiful images on your computer, by installing Stable Diffusion. No dependencies or technical knowledge required" />
15+
<meta property="og:description" content="A simple 1-click way to create beautiful images on your computer, by installing Stable Diffusion. No dependencies or technical knowledge required" />
16+
<link rel="canonical" href="https://easydiffusion.github.io/" />
17+
<meta property="og:url" content="https://easydiffusion.github.io/" />
18+
<meta property="og:site_name" content="Easy Diffusion v3" />
19+
<meta property="og:type" content="website" />
20+
<meta name="twitter:card" content="summary" />
21+
<meta property="twitter:title" content="Easy Diffusion v3" />
22+
<script type="application/ld+json">
23+
{"@context":"https://schema.org","@type":"WebSite","description":"A simple 1-click way to create beautiful images on your computer, by installing Stable Diffusion. No dependencies or technical knowledge required","headline":"Easy Diffusion v3","name":"Easy Diffusion v3","url":"https://easydiffusion.github.io/"}
24+
</script>
25+
26+
<link rel="alternate" type="application/atom+xml" href="{{ "atom.xml" | relURL }}" title="{{ .Site.Title }}">
27+
<link rel="preconnect" href="https://fonts.googleapis.com">
28+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
29+
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600;700;800&display=swap" rel="stylesheet">
30+
<style>
31+
* {
32+
font-family: Work Sans, Verdana, Geneva, sans-serif;
33+
}
34+
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
35+
font-family: Work Sans, Verdana, Geneva, sans-serif;
36+
}
37+
body {
38+
background-color: #0d0e0f;
39+
}
40+
.panel {
41+
background-color: #2c2d30;
42+
}
43+
.panel .panel-heading {
44+
background-color: #2c2d30;
45+
}
46+
.panel .list-group-item {
47+
background-color: #2c2d30 !important;
48+
}
49+
article {
50+
word-wrap: break-word;
51+
}
52+
.navbar {
53+
background: #202122;
54+
}
55+
</style>
56+
</head>
57+
<body>
58+
<div class="page-content">
59+
{{ partial "header.html" . }}
60+
<div class="page-content">
61+
{{ block "main" . }}{{ end }}
62+
</div>
63+
</div>
64+
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
65+
<script src="{{ "js/bootstrap.min.js" | relURL }}"></script>
66+
</body>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- $pctx := . -}}
2+
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
3+
{{- $pages := slice -}}
4+
{{- if or $.IsHome $.IsSection -}}
5+
{{- $pages = $pctx.RegularPages -}}
6+
{{- else -}}
7+
{{- $pages = $pctx.Pages -}}
8+
{{- end -}}
9+
{{- $limit := .Site.Config.Services.RSS.Limit -}}
10+
{{- if ge $limit 1 -}}
11+
{{- $pages = $pages | first $limit -}}
12+
{{- end -}}
13+
{{- $pages = (where $pages ".Params.unlisted" "!=" "true") -}}
14+
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
15+
<feed version="2.0" xmlns="http://www.w3.org/2005/Atom">
16+
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}: {{ .Site.Params.Description }}</title>
17+
<link rel="alternate" type="text/html" language="{{.Site.Language }}" href="{{ .Permalink }}"/>
18+
<link rel="self" type="{{ .MediaType }}" href="/index.xml" />
19+
<subtitle>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</subtitle>
20+
<author>{{ with .Site.Author.name }}
21+
<name>{{.}}</name>{{end}}{{ with .Site.Author.email }}
22+
<email>{{.}}</email>{{end}}
23+
<uri>{{ .Permalink }}</uri>
24+
</author>
25+
<id>{{ .Permalink }}</id>
26+
<generator>Hugo -- gohugo.io</generator>{{ with .Site.Copyright }}
27+
<rights>{{.}}</rights>{{end}}{{ if not .Date.IsZero }}
28+
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>{{ end }}
29+
{{ with .OutputFormats.Get "RSS" }}{{ end }}{{ range $pages }}<entry>
30+
<title>{{ .Title }}</title>
31+
<link rel="alternate" type="text/html" href="{{ .Permalink }}"/>
32+
<published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</published>
33+
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
34+
<summary>{{ .Summary | html }}</summary>
35+
<id>{{ .Permalink }}</id>{{ with .Site.Author.name }}
36+
<author>
37+
<name>{{.}}</name>
38+
</author>{{end}}
39+
</entry>
40+
{{ end }}
41+
</feed>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ define "main" }}
2+
<div class="container">
3+
{{ if eq .Data.Term "worklog" }}
4+
<div id="postFilter">
5+
<span class="filterBy"># filter by: [<a href="{{ "/blog" | relURL }}">posts</a> | <b>worklogs</b>]</span>
6+
</div>
7+
{{ end }}
8+
{{ $pages := .Pages }}
9+
{{ partial "post_list.html" (dict "Pages" $pages "Context" .) }}
10+
</div>
11+
{{ end }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{ define "main" }}
2+
<article class="post">
3+
<time class="date">{{ .Date.Format "Mon Jan 02 15:04 2006" }}</time>
4+
{{ with .Params.tags }}
5+
<ul class="tags">
6+
{{ range . }}
7+
<li class="tag">
8+
<a href="{{ "/tags/" | relURL }}{{ . | urlize }}">#{{ . }}</a>
9+
</li>
10+
{{ end }}
11+
</ul>
12+
{{ end }}
13+
<div class="content">
14+
{{ .Content }}
15+
</div>
16+
</article>
17+
{{ end }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{ define "main" }}
2+
<div class="container">
3+
<div id="postFilter">
4+
<span class="filterBy"># filter by: [<b>posts</b> | <a href="{{ "/tags/worklog" | relURL }}">worklogs</a>]</span>
5+
</div>
6+
{{ partial "post_list.html" (dict "Pages" .Pages "Context" .) }}
7+
</div>
8+
{{ end }}

0 commit comments

Comments
 (0)