chore: initial commit
This commit is contained in:
commit
5880538157
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
custom: ['https://www.paypal.me/janraasch/7,00']
|
||||||
|
github: ['janraasch']
|
32
.github/workflows/ci.yml
vendored
Normal file
32
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: latest
|
||||||
|
|
||||||
|
- name: Build local ./exampleSite
|
||||||
|
run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-bearblog/
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./public
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
27
.jsbeautifyrc
Normal file
27
.jsbeautifyrc
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"indent_size": 2,
|
||||||
|
"indent_char": " ",
|
||||||
|
"indent_with_tabs": false,
|
||||||
|
"editorconfig": false,
|
||||||
|
"eol": "\n",
|
||||||
|
"end_with_newline": true,
|
||||||
|
"indent_level": 0,
|
||||||
|
"preserve_newlines": true,
|
||||||
|
"max_preserve_newlines": 10,
|
||||||
|
"space_in_paren": false,
|
||||||
|
"space_in_empty_paren": false,
|
||||||
|
"jslint_happy": false,
|
||||||
|
"space_after_anon_function": false,
|
||||||
|
"space_after_named_function": false,
|
||||||
|
"brace_style": "collapse",
|
||||||
|
"unindent_chained_methods": false,
|
||||||
|
"break_chained_methods": false,
|
||||||
|
"keep_array_indentation": false,
|
||||||
|
"unescape_strings": false,
|
||||||
|
"wrap_line_length": 0,
|
||||||
|
"e4x": false,
|
||||||
|
"comma_first": false,
|
||||||
|
"operator_position": "before-newline",
|
||||||
|
"indent_empty_lines": false,
|
||||||
|
"templating": ["auto"]
|
||||||
|
}
|
20
LICENSE
Normal file
20
LICENSE
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 Jan Raasch
|
||||||
|
|
||||||
|
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.
|
67
README.md
Normal file
67
README.md
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# Hugo Bear Blog ![Test](https://github.com/janraasch/hugo-bearblog/workflows/CI/badge.svg?branch=master&event=push)
|
||||||
|
|
||||||
|
🧸 A [Hugo](https://gohugo.io/)-theme based on [Bear Blog](https://bearblog.dev).
|
||||||
|
|
||||||
|
> Free, no-nonsense, super-fast blogging.
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
For a current & working demo of this theme, please check out https://janraasch.github.io/hugo-bearblog/ 🎯.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
If you already have a Hugo site on your machine, you can simply add this theme via
|
||||||
|
|
||||||
|
```
|
||||||
|
git submodule add https://github.com/janraasch/hugo-bearblog.git themes/hugo-bearblog
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, adjust the `config.toml` as detailed below.
|
||||||
|
|
||||||
|
For more information, read the official [setup guide][hugo-setup-guide] of Hugo.
|
||||||
|
|
||||||
|
## Adjust configuration / config.toml
|
||||||
|
|
||||||
|
Please check out the [config.toml](https://github.com/janraasch/hugo-bearblog/blob/master/exampleSite/config.toml) included in the [exampleSite](https://github.com/janraasch/hugo-bearblog/tree/master/exampleSite) of this theme.
|
||||||
|
|
||||||
|
## Content & structure
|
||||||
|
|
||||||
|
### Starting fresh
|
||||||
|
|
||||||
|
If you are starting fresh, simply copy over the contents of the `exampleSite`-directory included in this theme to your source directory. That should give you a good idea about how things work, and then you can go on from there to make the site your own.
|
||||||
|
|
||||||
|
### Adding content
|
||||||
|
|
||||||
|
You can add **a new post/page** via running
|
||||||
|
|
||||||
|
```
|
||||||
|
hugo new blog/my-new-post.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adding your branding / colors / css
|
||||||
|
|
||||||
|
Add a `custom_head.html`-file to your `layouts/partials`-directory. In there you may add a `<style>`-tag, *or* you may add a `<link>`-tag referencing your own `custom.css` (in case you prefer to have a separate `.css`-file). Check out the [`style.html`](https://github.com/janraasch/hugo-bearblog/blob/master/layouts/partials/style.html)-file to find our which CSS-styles are applied by default.
|
||||||
|
|
||||||
|
## Issues / Feedback / Contributing
|
||||||
|
Please use [GitHub issues](https://github.com/janraasch/hugo-bearblog/issues) and [Pull Requests](https://github.com/janraasch/hugo-bearblog/pulls).
|
||||||
|
|
||||||
|
If you do not have a GitHub-account, please hit me up via e-mail (see [janraasch.com](https://www.janraasch.com)).
|
||||||
|
|
||||||
|
|
||||||
|
## Sponsor [![Pay me][insert-coins-svg]][paypal-dot-me]
|
||||||
|
Please consider supporting my work via [GitHub Sponsors][github-sponsors] or [PayPal][paypal-dot-me].
|
||||||
|
|
||||||
|
[![GitHub Stats](https://github-readme-stats.vercel.app/api/?username=janraasch)][github-sponsors]
|
||||||
|
|
||||||
|
## Special Thanks 🎁
|
||||||
|
|
||||||
|
A special thank you goes out to [Herman](https://herman.bearblog.dev), for creating the original [ʕ•ᴥ•ʔ Bear Blog](https://bearblog.dev/).
|
||||||
|
|
||||||
|
## License
|
||||||
|
[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Jan Raasch](https://www.janraasch.com)
|
||||||
|
|
||||||
|
[paypal-dot-me]: https://www.paypal.me/janraasch/7,00
|
||||||
|
[github-sponsors]: https://github.com/sponsors/janraasch
|
||||||
|
[insert-coins-svg]: https://img.shields.io/badge/insert-coins-11dde2.svg
|
||||||
|
|
||||||
|
[hugo-setup-guide]: https://gohugo.io/getting-started/installing
|
9
archetypes/default.md
Normal file
9
archetypes/default.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
+++
|
||||||
|
title = "{{ replace .Name "-" " " | title }}"
|
||||||
|
date = "{{ .Date }}"
|
||||||
|
# description = "An optional description for SEO. If not provided, an automatically created summary will be used."
|
||||||
|
# menu = "main"
|
||||||
|
tags = [{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}"{{ printf "%s" $term }}",{{ end }}{{ end }}]
|
||||||
|
+++
|
||||||
|
|
||||||
|
This is a page about »{{ replace .Name "-" " " | title }}«.
|
44
exampleSite/config.toml
Normal file
44
exampleSite/config.toml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
baseURL = "https://example.com"
|
||||||
|
|
||||||
|
# The name of this wonderful theme ;-).
|
||||||
|
theme = 'hugo-bearblog'
|
||||||
|
|
||||||
|
# Basic metadata configuration for your blog.
|
||||||
|
title = "Hugo ʕ•ᴥ•ʔ Bear Blog"
|
||||||
|
author = "Jane Doe"
|
||||||
|
copyright = "Copyright © 2020, Jane Doe."
|
||||||
|
languageCode = "en-US"
|
||||||
|
|
||||||
|
# Generate a nice robots.txt for SEO
|
||||||
|
enableRobotsTXT = true
|
||||||
|
|
||||||
|
# Generate "Bearblog"-like URLs !only!, see https://bearblog.dev/.
|
||||||
|
disableKinds = ["taxonomy"]
|
||||||
|
ignoreErrors = ["error-disable-taxonomy"]
|
||||||
|
[permalinks]
|
||||||
|
blog = "/:slug/"
|
||||||
|
tags = "/blog/:slug"
|
||||||
|
|
||||||
|
[params]
|
||||||
|
# The "description" of your website. This is used in the meta data of your generated html.
|
||||||
|
description = "Hugo + Bear = :heart:"
|
||||||
|
|
||||||
|
# The path to your "favicon". This should be a square (at least 32px x 32px) png-file.
|
||||||
|
# Hint: It's good practise to also put a "favicon.ico"-file into your "static"-folder.
|
||||||
|
favicon = "images/favicon.png"
|
||||||
|
|
||||||
|
# These "images" are used for the structured data templates. This will show up, when
|
||||||
|
# services like Twitter or Slack want to generate a preview of a link to your site.
|
||||||
|
# See https://gohugo.io/templates/internal#twitter-cards and
|
||||||
|
# https://gohugo.io/templates/internal#open-graph.
|
||||||
|
images = ["images/share.png"]
|
||||||
|
|
||||||
|
# Another "title" :-). This one is used as the site_name on the Hugo's internal
|
||||||
|
# opengraph structured data template.
|
||||||
|
# See https://ogp.me/ and https://gohugo.io/templates/internal#open-graph.
|
||||||
|
title = "Hugo ʕ•ᴥ•ʔ Bear"
|
||||||
|
|
||||||
|
# This theme will, by default, inject a made-with-line at the bottom of the page.
|
||||||
|
# You can turn it off, but we would really appreciate if you don’t :-).
|
||||||
|
# hideMadeWithLine = true
|
21
exampleSite/content/_index.md
Normal file
21
exampleSite/content/_index.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# A match made in heaven
|
||||||
|
|
||||||
|
There is a website obesity crisis. Bloated websites full of scripts, ads, and trackers are slowing your readers down every time they try to read your well-crafted content.
|
||||||
|
|
||||||
|
Hugo Bear Blog is all you need to build a fantastic and optimized site or blog. It works perfectly on **any** viewing device. All you need to focus on is writing good content.
|
||||||
|
|
||||||
|
[Go to the original bear blog](https://bearblog.dev/).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
What happens when you combine the worlds' fastest, most lightweight static site generator with a design theme built to provide you with free, no-nonsense, super-fast blogging capabilities?
|
||||||
|
|
||||||
|
**Use this theme, and find out!**
|
||||||
|
|
||||||
|
Made with 💟 by [Jan Raasch](https://www.janraasch.com).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Simply publish content online, grow an audience, and keep your pages tiny, fast, and **optimized for search engines**.
|
||||||
|
|
||||||
|
Each page is ~5kb, and you can **host your blog yourself**.
|
3
exampleSite/content/blog/_index.md
Normal file
3
exampleSite/content/blog/_index.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
+++
|
||||||
|
title = "Blog"
|
||||||
|
+++
|
25
exampleSite/content/blog/bear.md
Normal file
25
exampleSite/content/blog/bear.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
+++
|
||||||
|
title = "Bear"
|
||||||
|
menu = "main"
|
||||||
|
date = "2020-01-01"
|
||||||
|
tags = [
|
||||||
|
"blogging",
|
||||||
|
"no javascript",
|
||||||
|
"no stylesheets",
|
||||||
|
"no trackers"
|
||||||
|
]
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Bear
|
||||||
|
|
||||||
|
Website: https://bearblog.dev
|
||||||
|
|
||||||
|
There is a website obesity crisis. Bloated websites are full of scripts, ads, and trackers slowing your readers down every time they try to read your well-crafted content.
|
||||||
|
|
||||||
|
Bear is all you need to build a fantastic and optimized site or blog. It works perfectly on **any** viewing device. All you need to focus on is writing good content.
|
||||||
|
|
||||||
|
Bear makes it simple to publish content online and grow an audience while keeping pages tiny, fast, and **optimized for search engines.**
|
||||||
|
|
||||||
|
Each page is ~5kb.
|
||||||
|
|
||||||
|
Learn more and contribute on [GitHub](https://github.com/HermanMartinus/bearblog).
|
31
exampleSite/content/blog/hugo.md
Normal file
31
exampleSite/content/blog/hugo.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
+++
|
||||||
|
title = "Hugo"
|
||||||
|
menu = "main"
|
||||||
|
date = "2020-01-02"
|
||||||
|
tags = [
|
||||||
|
"blogging",
|
||||||
|
"static site generator"
|
||||||
|
]
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Hugo
|
||||||
|
|
||||||
|
Website: https://gohugo.io
|
||||||
|
|
||||||
|
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 swift, 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).
|
144
exampleSite/content/blog/markdown-syntax.md
Normal file
144
exampleSite/content/blog/markdown-syntax.md
Normal file
File diff suppressed because it is too large
Load Diff
BIN
exampleSite/static/favicon.ico
Normal file
BIN
exampleSite/static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
exampleSite/static/images/favicon.png
Normal file
BIN
exampleSite/static/images/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
exampleSite/static/images/share.png
Normal file
BIN
exampleSite/static/images/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
images/screenshot.png
Normal file
BIN
images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
images/tn.png
Normal file
BIN
images/tn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
6
layouts/404.html
Normal file
6
layouts/404.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{{ define "title" }}404{{ end }}
|
||||||
|
|
||||||
|
{{ define "main" }}
|
||||||
|
<h1>404</h1>
|
||||||
|
<h2>ʕノ•ᴥ•ʔノ ︵ ┻━┻</h2>
|
||||||
|
{{ end }}
|
43
layouts/_default/baseof.html
Normal file
43
layouts/_default/baseof.html
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" />
|
||||||
|
{{- partial "favicon.html" . -}}
|
||||||
|
<title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title>
|
||||||
|
|
||||||
|
{{- partial "seo_tags.html" . -}}
|
||||||
|
<meta name="referrer" content="no-referrer-when-downgrade" />
|
||||||
|
|
||||||
|
{{ with .OutputFormats.Get "rss" -}}
|
||||||
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- partial "style.html" . -}}
|
||||||
|
|
||||||
|
<!-- A partial to be overwritten by the user.
|
||||||
|
Simply place a custom_head.html into
|
||||||
|
your local /layouts/partials-directory -->
|
||||||
|
{{- partial "custom_head.html" . -}}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
{{- partial "header.html" . -}}
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
{{- block "main" . }}{{- end }}
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
{{- partial "footer.html" . -}}
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- A partial to be overwritten by the user.
|
||||||
|
Simply place a custom_body.html into
|
||||||
|
your local /layouts/partials-directory -->
|
||||||
|
{{- partial "custom_body.html" . -}}
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
57
layouts/_default/list.html
Normal file
57
layouts/_default/list.html
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<style>
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
li span {
|
||||||
|
flex: 0 0 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li a:visited {
|
||||||
|
color: #6532dc;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<content>
|
||||||
|
{{ if .Data.Singular }}
|
||||||
|
<h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
|
||||||
|
<small>
|
||||||
|
<a href="{{ "/blog" | relURL }}">Remove filter</a>
|
||||||
|
</small>
|
||||||
|
{{ end }}
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li>
|
||||||
|
<span>
|
||||||
|
<i>
|
||||||
|
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||||
|
{{ .Date.Format "02 Jan, 2006" }}
|
||||||
|
</time>
|
||||||
|
</i>
|
||||||
|
</span>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
<li>
|
||||||
|
No posts yet
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ if .Data.Singular }}
|
||||||
|
{{else}}
|
||||||
|
<small>
|
||||||
|
<div>
|
||||||
|
{{ range .Site.Taxonomies.tags }}
|
||||||
|
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</small>
|
||||||
|
{{ end }}
|
||||||
|
</content>
|
||||||
|
{{ end }}
|
20
layouts/_default/single.html
Normal file
20
layouts/_default/single.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
{{ if eq .Type "blog" }}{{ if not .Params.menu }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
<p>
|
||||||
|
<i>
|
||||||
|
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||||
|
{{ .Date.Format "02 Jan, 2006" }}
|
||||||
|
</time>
|
||||||
|
</i>
|
||||||
|
</p>
|
||||||
|
{{ end }}{{ end }}
|
||||||
|
<content>
|
||||||
|
{{ .Content }}
|
||||||
|
</content>
|
||||||
|
<p>
|
||||||
|
{{ range (.GetTerms "tags") }}
|
||||||
|
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
3
layouts/index.html
Normal file
3
layouts/index.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
3
layouts/partials/custom_body.html
Normal file
3
layouts/partials/custom_body.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<!-- A partial to be overwritten by the user.
|
||||||
|
Simply place a custom_body.html into
|
||||||
|
your local /layouts/partials-directory -->
|
3
layouts/partials/custom_head.html
Normal file
3
layouts/partials/custom_head.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<!-- A partial to be overwritten by the user.
|
||||||
|
Simply place a custom_head.html into
|
||||||
|
your local /layouts/partials-directory -->
|
2
layouts/partials/favicon.html
Normal file
2
layouts/partials/favicon.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
{{ with .Site.Params.favicon }}
|
||||||
|
<link rel="shortcut icon" href="{{ . | absURL }}" />{{ end }}
|
1
layouts/partials/footer.html
Normal file
1
layouts/partials/footer.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ if ne .Site.Params.hideMadeWithLine true }}Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>{{ end }}
|
14
layouts/partials/head.html
Normal file
14
layouts/partials/head.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" />
|
||||||
|
{{- partial "favicon.html" . -}}
|
||||||
|
<title>{{- block "title" . }}{{ .Site.Title }}{{- end }}</title>
|
||||||
|
|
||||||
|
{{- partial "seo_tags.html" . -}}
|
||||||
|
<meta name="referrer" content="no-referrer-when-downgrade" />
|
||||||
|
|
||||||
|
{{ with .OutputFormats.Get "rss" -}}
|
||||||
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- partial "style.html" . -}}
|
4
layouts/partials/header.html
Normal file
4
layouts/partials/header.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<a href="{{ "/" | relURL }}" class="title">
|
||||||
|
<h2>{{ .Site.Title }}</h2>
|
||||||
|
</a>
|
||||||
|
<nav>{{- partial "nav.html" . -}}</nav>
|
5
layouts/partials/nav.html
Normal file
5
layouts/partials/nav.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<a href="{{ "/" | relURL }}">Home</a>
|
||||||
|
{{ range .Site.Menus.main }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ end }}
|
||||||
|
<a href="{{ "/blog" | relURL }}">Blog</a>
|
13
layouts/partials/seo_tags.html
Normal file
13
layouts/partials/seo_tags.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!-- Primary Meta Tags -->
|
||||||
|
<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
||||||
|
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||||
|
<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
|
||||||
|
|
||||||
|
<!-- Open Graph / Facebook -->
|
||||||
|
{{ template "_internal/opengraph.html" . }}
|
||||||
|
|
||||||
|
<!-- Twitter -->
|
||||||
|
{{ template "_internal/twitter_cards.html" . }}
|
||||||
|
|
||||||
|
<!-- Microdata -->
|
||||||
|
{{ template "_internal/schema.html" . }}
|
99
layouts/partials/style.html
Normal file
99
layouts/partials/style.html
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
margin: auto;
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 720px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: white;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6,
|
||||||
|
strong,
|
||||||
|
b {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #3273dc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-decoration: none;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title span {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
content {
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 2px 5px;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
border-left: 1px solid #999;
|
||||||
|
color: #555;
|
||||||
|
display: block;
|
||||||
|
padding: 10px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
border-left: 1px solid #999;
|
||||||
|
color: #555;
|
||||||
|
padding-left: 10px;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding: 25px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helptext {
|
||||||
|
color: #777;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorlist {
|
||||||
|
color: #eba613;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
2
layouts/robots.txt
Normal file
2
layouts/robots.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
User-Agent: *
|
||||||
|
Sitemap: {{ "sitemap.xml" | absURL }}
|
177
package-lock.json
generated
Normal file
177
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
28
package.json
Normal file
28
package.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "hugo-bearblog",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "🧸 A [Hugo](https://gohugo.io/)-theme based on [Bear Blog](https://bearblog.dev).",
|
||||||
|
"main": "index.js",
|
||||||
|
"devDependencies": {
|
||||||
|
"js-beautify": "^1.13.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "npm run beautify",
|
||||||
|
"beautify": "js-beautify layouts/**/*.html -r"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/janraasch/hugo-bearblog.git"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "Jan Raasch",
|
||||||
|
"email": "jan@janraasch.com",
|
||||||
|
"url": "https://www.janraasch.com"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/janraasch/hugo-bearblog/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/janraasch/hugo-bearblog#readme"
|
||||||
|
}
|
24
theme.toml
Normal file
24
theme.toml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# theme.toml template for a Hugo theme
|
||||||
|
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||||
|
|
||||||
|
name = "Hugo Bear Blog"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://github.com/janraasch/hugo-bearblog/blob/master/LICENSE"
|
||||||
|
description = "A Hugo theme based on »Bear Blog«. Free, no-nonsense, super-fast blogging."
|
||||||
|
homepage = "https://github.com/janraasch/hugo-bearblog"
|
||||||
|
tags = ["blog", "responsive", "minimal", "seo", "clean", "simple", "light", "minimalist", "mobile", "fast", "white", "minimalistic", "reading"]
|
||||||
|
features = ["favicon", "seo", "no stylesheets", "no javascript", "rss"]
|
||||||
|
min_version = "0.73.0"
|
||||||
|
# https://gohugo.io/content-management/taxonomies#default-taxonomies
|
||||||
|
# https://gohugo.io/templates/taxonomy-templates/#example-list-tags-in-a-single-page-template
|
||||||
|
# https://gohugo.io/templates/taxonomy-templates/#example-list-all-site-tags
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "Jan Raasch"
|
||||||
|
homepage = "https://www.janraasch.com"
|
||||||
|
|
||||||
|
# If porting an existing theme
|
||||||
|
[original]
|
||||||
|
name = "ʕ•ᴥ•ʔ Bear Blog"
|
||||||
|
homepage = "https://bearblog.dev"
|
||||||
|
repo = "https://github.com/HermanMartinus/bearblog"
|
Loading…
Reference in New Issue
Block a user