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/
|
||||
|
||||
# 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)
|
||||
- [New cool idea or feature](#feature)
|
||||
- [Terminal theme user?](#terminal-theme-user)
|
||||
- [Sponsoring](#sponsoring)
|
||||
- [Licence](#licence)
|
||||
|
||||
## 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
|
||||
|
||||
```bash
|
||||
hugo mod init github.com/panr/hugo-theme-terminal@module
|
||||
hugo mod get -u
|
||||
# or
|
||||
hugo mod get github.com/panr/hugo-theme-terminal@module
|
||||
hugo mod init github.com/panr/hugo-theme-terminal
|
||||
hugo mod get github.com/panr/hugo-theme-terminal
|
||||
```
|
||||
|
||||
then in config.toml add:
|
||||
and in your config file add:
|
||||
|
||||
```toml
|
||||
[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]]
|
||||
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
|
||||
|
||||
```
|
||||
git clone -b module https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||
```bash
|
||||
git clone https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||
```
|
||||
|
||||
This will clone the repository directly to the `themes/terminal` directory.
|
||||
|
||||
### Install theme as a submodule
|
||||
|
||||
```
|
||||
git submodule add -b module -f https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||
```bash
|
||||
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.
|
||||
|
||||
⚠️ **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
|
||||
|
||||
If you installed all needed `npm` dependencies, then you can run:
|
||||
|
||||
```
|
||||
```bash
|
||||
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 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" />
|
||||
|
||||
|
6
USERS.md
6
USERS.md
@ -58,6 +58,12 @@
|
||||
- https://they.mint.lgbt **Joey Aliaga** (Software Developer & Student)
|
||||
- https://tatewilhelm.me **Tate Wilhelm** (Student, Programmer & Tinkerer)
|
||||
- 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:
|
||||
|
@ -10,4 +10,5 @@ description = ""
|
||||
showFullContent = false
|
||||
readingTime = false
|
||||
hideComments = false
|
||||
color = "" #color from the theme settings
|
||||
+++
|
||||
|
@ -15,14 +15,17 @@
|
||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="post on-list">
|
||||
<article class="post on-list">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Date }}
|
||||
<time class="post-date">
|
||||
{{ .Format "2006-01-02" }}
|
||||
</time>
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">:: {{ . }}</span>
|
||||
{{ end }}
|
||||
@ -38,10 +41,8 @@
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
|
||||
<div class="post-content">
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content }}
|
||||
@ -53,13 +54,13 @@
|
||||
</div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button"
|
||||
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -6,16 +6,18 @@
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ range .Paginator.Pages }}
|
||||
<div class="post on-list">
|
||||
<article class="post on-list">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Date }}
|
||||
<time class="post-date">
|
||||
{{ .Format "2006-01-02" }} ::
|
||||
</time>
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">:: {{ . }}</span>
|
||||
<span class="post-author">{{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@ -31,7 +33,6 @@
|
||||
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
|
||||
<div class="post-content">
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content }}
|
||||
@ -43,13 +44,13 @@
|
||||
</div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button"
|
||||
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -1,18 +1,19 @@
|
||||
{{ define "main" }}
|
||||
<div class="post">
|
||||
<article class="post">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Params.Date }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ with .Date }}
|
||||
<time class="post-date">
|
||||
{{ .Format "2006-01-02" }} ::
|
||||
{{ 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 }}
|
||||
</span>
|
||||
</time>
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">:: {{ . }}</span>
|
||||
<span class="post-author">{{ . }}</span>
|
||||
{{ end }}
|
||||
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
||||
<span class="post-reading-time">:: {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
||||
@ -20,11 +21,11 @@
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
@ -46,11 +47,11 @@
|
||||
</div>
|
||||
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
{{ partial "posts_pagination.html" . }}
|
||||
{{ partial "posts_pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Params.hideComments | default false) }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ 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