Update templates and README
This commit is contained in:
parent
996701fde0
commit
ea5c6aa798
3
.gitignore
vendored
3
.gitignore
vendored
@ -88,3 +88,6 @@ typings/
|
|||||||
.dynamodb/
|
.dynamodb/
|
||||||
|
|
||||||
# End of https://www.gitignore.io/api/node
|
# End of https://www.gitignore.io/api/node
|
||||||
|
|
||||||
|
public
|
||||||
|
.hugo_build.lock
|
||||||
|
38
README.md
38
README.md
@ -18,7 +18,6 @@
|
|||||||
- [Found a bug?](#bug)
|
- [Found a bug?](#bug)
|
||||||
- [New cool idea or feature](#feature)
|
- [New cool idea or feature](#feature)
|
||||||
- [Terminal theme user?](#terminal-theme-user)
|
- [Terminal theme user?](#terminal-theme-user)
|
||||||
- [Sponsoring](#sponsoring)
|
|
||||||
- [Licence](#licence)
|
- [Licence](#licence)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
@ -86,49 +85,52 @@ You can download the theme manually by going to [https://github.com/panr/hugo-th
|
|||||||
### Install theme as Hugo Module
|
### Install theme as Hugo Module
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hugo mod init github.com/panr/hugo-theme-terminal@module
|
hugo mod init github.com/panr/hugo-theme-terminal
|
||||||
hugo mod get -u
|
hugo mod get github.com/panr/hugo-theme-terminal
|
||||||
# or
|
|
||||||
hugo mod get github.com/panr/hugo-theme-terminal@module
|
|
||||||
```
|
```
|
||||||
|
|
||||||
then in config.toml add:
|
and in your config file add:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[module]
|
[module]
|
||||||
|
# this is needed when you fetch the theme as a submodule to your repo.
|
||||||
|
# replacements = "github.com/panr/hugo-theme-terminal -> themes/terminal"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = 'github.com/panr/hugo-theme-terminal'
|
path = 'github.com/panr/hugo-theme-terminal'
|
||||||
```
|
```
|
||||||
|
|
||||||
When you do that, you don't need to add `theme = "terminal"`. The theme should be "mounted" right away.
|
and also remove reference to the theme (since Hugo Module don't need it):
|
||||||
|
|
||||||
Please keep in mind that for the time of testing the theme is available as a module only from `module` branch. After testing period (fall, 2022), the module will be available on `master` branch by default.
|
```toml
|
||||||
|
# REMOVE OR COMMENT THIS LINE
|
||||||
|
theme = "terminal"
|
||||||
|
```
|
||||||
|
|
||||||
More about Hugo Modules in the [official documentation](https://gohugo.io/hugo-modules/).
|
Keep in mind that the theme by default won't show up in the `themes` directory. This means that you are using the theme as it was on the repository at the moment you fetched it. Your local `go.sum` file keeps all the references. Read more about Hugo Modules in the [official documentation](https://gohugo.io/hugo-modules/).
|
||||||
|
|
||||||
### Install theme locally
|
### Install theme locally
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git clone -b module https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
git clone https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||||
```
|
```
|
||||||
|
|
||||||
This will clone the repository directly to the `themes/terminal` directory.
|
This will clone the repository directly to the `themes/terminal` directory.
|
||||||
|
|
||||||
### Install theme as a submodule
|
### Install theme as a submodule
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git submodule add -b module -f https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
git submodule add -f https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||||
```
|
```
|
||||||
|
|
||||||
This will install the repository as a sumbodule in the `themes/terminal` directory.
|
This will install the repository as a sumbodule in the `themes/terminal` directory.
|
||||||
|
|
||||||
⚠️ **The theme needs at least Hugo version 0.100.x**.
|
⚠️ **The theme needs at least Hugo version 0.90.x**.
|
||||||
|
|
||||||
## How to run your site
|
## How to run your site
|
||||||
|
|
||||||
If you installed all needed `npm` dependencies, then you can run:
|
If you installed all needed `npm` dependencies, then you can run:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
hugo server -t terminal
|
hugo server -t terminal
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -254,11 +256,11 @@ See the default `post` file params supported by the theme — https://github.com
|
|||||||
- **Extended Head** — please take a look at `layouts/partials/extended_head.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_head.html
|
- **Extended Head** — please take a look at `layouts/partials/extended_head.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_head.html
|
||||||
- **Extended Footer** — please take a look at `layouts/partials/extended_footer.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_footer.html
|
- **Extended Footer** — please take a look at `layouts/partials/extended_footer.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_footer.html
|
||||||
|
|
||||||
## How to (safely) edit the theme <a id="how-to-edit" />
|
## How to edit the theme <a id="how-to-edit" />
|
||||||
|
|
||||||
If you have to override only some of the styles, you can do this easily by adding `static/style.css` in your root directory and point things you want to change.
|
If you are using as a remote Hugo Module (you don't have the theme files in the `theme/terminal`) and you have to override only some of the styles, you can do this easily by adding `static/style.css` in your root directory and point things you want to change.
|
||||||
|
|
||||||
To change something directly in the theme, you have to go to `themes/terminal` and modify the files.
|
If you have the theme files in the theme directory, then you can directly edit anything in the theme, you just have to go to `themes/terminal` and modify the files. No compilation step needed.
|
||||||
|
|
||||||
## Found a bug? <a id="bug" />
|
## Found a bug? <a id="bug" />
|
||||||
|
|
||||||
|
6
USERS.md
6
USERS.md
@ -58,6 +58,12 @@
|
|||||||
- https://they.mint.lgbt **Joey Aliaga** (Software Developer & Student)
|
- https://they.mint.lgbt **Joey Aliaga** (Software Developer & Student)
|
||||||
- https://tatewilhelm.me **Tate Wilhelm** (Student, Programmer & Tinkerer)
|
- https://tatewilhelm.me **Tate Wilhelm** (Student, Programmer & Tinkerer)
|
||||||
- https://mikefoden.com **Mike Foden** (Software Developer)
|
- https://mikefoden.com **Mike Foden** (Software Developer)
|
||||||
|
- https://undemalum.github.io/portfolio/ **Mateusz Konat** (Student)
|
||||||
|
- https://ku0hn.radio **Ben Kuhn** (Ham Radio Operator, InfoSec Engineer, Tinkerer)
|
||||||
|
- https://bg117.xyz/projects **bg117** (Student and Hobby Programmer)
|
||||||
|
- https://www.grumpymetalguy.com **GrumpyMetalGuy** (General Grumper and Developer)
|
||||||
|
- https://blog.jontes.page **Jonte** (general tech geek)
|
||||||
|
- https://nazdarthegame.com/ **Michal Skoula** (Software Developer)
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TEMPLATE:
|
TEMPLATE:
|
||||||
|
@ -10,4 +10,5 @@ description = ""
|
|||||||
showFullContent = false
|
showFullContent = false
|
||||||
readingTime = false
|
readingTime = false
|
||||||
hideComments = false
|
hideComments = false
|
||||||
|
color = "" #color from the theme settings
|
||||||
+++
|
+++
|
||||||
|
@ -15,14 +15,17 @@
|
|||||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||||
|
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
<div class="post on-list">
|
<article class="post on-list">
|
||||||
<h1 class="post-title">
|
<h1 class="post-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span class="post-date">
|
{{ with .Date }}
|
||||||
{{ .Date.Format "2006-01-02" }}
|
<time class="post-date">
|
||||||
</span>
|
{{ .Format "2006-01-02" }}
|
||||||
|
</time>
|
||||||
|
{{ end }}
|
||||||
{{ with .Params.Author }}
|
{{ with .Params.Author }}
|
||||||
<span class="post-author">:: {{ . }}</span>
|
<span class="post-author">:: {{ . }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -38,10 +41,8 @@
|
|||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{ partial "cover.html" . }}
|
{{ partial "cover.html" . }}
|
||||||
|
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{ if .Params.showFullContent }}
|
{{ if .Params.showFullContent }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
@ -53,13 +54,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if not .Params.showFullContent }}
|
{{ if not .Params.showFullContent }}
|
||||||
<div>
|
<div>
|
||||||
<a class="read-more button"
|
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||||
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
</div>
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -6,16 +6,18 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="posts">
|
<div class="posts">
|
||||||
{{ range .Paginator.Pages }}
|
{{ range .Paginator.Pages }}
|
||||||
<div class="post on-list">
|
<article class="post on-list">
|
||||||
<h1 class="post-title">
|
<h1 class="post-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span class="post-date">
|
{{ with .Date }}
|
||||||
{{ .Date.Format "2006-01-02" }}
|
<time class="post-date">
|
||||||
</span>
|
{{ .Format "2006-01-02" }} ::
|
||||||
|
</time>
|
||||||
|
{{ end }}
|
||||||
{{ with .Params.Author }}
|
{{ with .Params.Author }}
|
||||||
<span class="post-author">:: {{ . }}</span>
|
<span class="post-author">{{ . }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -31,7 +33,6 @@
|
|||||||
|
|
||||||
{{ partial "cover.html" . }}
|
{{ partial "cover.html" . }}
|
||||||
|
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{ if .Params.showFullContent }}
|
{{ if .Params.showFullContent }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
@ -43,13 +44,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if not .Params.showFullContent }}
|
{{ if not .Params.showFullContent }}
|
||||||
<div>
|
<div>
|
||||||
<a class="read-more button"
|
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||||
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
</div>
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="post">
|
<article class="post">
|
||||||
<h1 class="post-title">
|
<h1 class="post-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
|
</h1>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{ if .Params.Date }}
|
{{ with .Date }}
|
||||||
<span class="post-date">
|
<time class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Format "2006-01-02" }} ::
|
||||||
{{ if $.Site.Params.showLastUpdated }}
|
{{ if $.Site.Params.showLastUpdated }}
|
||||||
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
|
[{{or $.Site.Params.updatedDatePrefix "Updated"}} :: {{ .Lastmod.Format "2006-01-02" }}]
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</time>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Params.Author }}
|
{{ with .Params.Author }}
|
||||||
<span class="post-author">:: {{ . }}</span>
|
<span class="post-author">{{ . }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
||||||
<span class="post-reading-time">:: {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
<span class="post-reading-time">:: {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
||||||
@ -20,11 +21,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
<span class="post-tags">
|
<span class="post-tags">
|
||||||
{{ range .Params.tags }}
|
{{ range .Params.tags }}
|
||||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "cover.html" . }}
|
{{ partial "cover.html" . }}
|
||||||
|
|
||||||
@ -46,11 +47,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||||
{{ partial "posts_pagination.html" . }}
|
{{ partial "posts_pagination.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not (.Params.hideComments | default false) }}
|
{{ if not (.Params.hideComments | default false) }}
|
||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
{"Target":"style.css","MediaType":"text/css","Data":{}}
|
Loading…
Reference in New Issue
Block a user