Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new version from external libraires with SRI Support #11

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hemingway
# Hemingway2

Hemingway is a really minimal blog theme for hugo.
Hemingway2 is a really minimal blog theme for hugo.

![](https://github.com/tanksuzuki/hemingway/blob/master/images/tn.png)

Expand All @@ -11,28 +11,34 @@ Clone this repository to your hugo theme directory.
```
mkdir themes
cd themes
git clone https://github.com/tanksuzuki/hemingway.git
git clone https://github.com/beli3ver/hemingway2.git
```

## Configuration

Take a look in the [exampleSite](https://github.com/tanksuzuki/hemingway/tree/master/exampleSite) folder.
Take a look in the [exampleSite](https://github.com/beli3ver/hemingway2/tree/master/exampleSite) folder.

This directory contains an example config file and the content for the demo.
It serves as an example setup for your documentation.

Copy the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary.

__[config.toml](https://github.com/tanksuzuki/hemingway/blob/master/exampleSite/config.toml)__:
__[config.toml](https://github.com/beli3ver/hemingway2/blob/master/exampleSite/config.toml)__:

```toml
baseurl = "https://example.com"
languageCode = "en"
title = "Hemingway"
theme = "hemingway"
copyright = "&copy; <a href=\"https://github.com/tanksuzuki\">Asuka Suzuki</a> 2016"
title = "Hemingway2"
theme = "hemingway2"
copyright = "&copy; <a href=\"https://github.com/beli3ver\">Malte Kiefer</a> 2016"
disqusShortname = "shortname"
googleAnalytics = ""
description = "Your personal description"
keywords = ["keyword1", "keyword2"]

[taxonomies]
tag = "tags"
category = "categories"

[params]

Expand All @@ -41,13 +47,21 @@ style = "github"
languages = ["go", "dockerfile"]

[[params.social]]
url = "https://github.com/tanksuzuki"
url = "https://github.com/beli3ver"
fa_icon = "fa-github"

[[params.social]]
url = "https://twitter.com/tanksuzuki"
url = "https://gitlab.com/beli3ver"
fa_icon = "fa-gitlab"

[[params.social]]
url = "https://twitter.com/malkie16"
fa_icon = "fa-twitter"

[[params.social]]
url = "https://telegram.me/beli3ver"
fa_icon = "fa-telegram"

[[params.social]]
url = "/index.xml"
fa_icon = "fa-rss"
Expand All @@ -63,8 +77,8 @@ You can go to localhost:1313 and this theme should be visible.

## License

Hemingway is licensed under the [MIT License](LICENSE.md).
Hemingway2 is licensed under the [MIT License](LICENSE.md).

## Author

[Asuka Suzuki](https://github.com/tanksuzuki)
[Malte Kiefer](https://github.com/beli3ver)
25 changes: 16 additions & 9 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
baseurl = "https://example.com"
languageCode = "en"
title = "Hemingway"
theme = "hemingway"
copyright = "&copy; <a href=\"https://github.com/tanksuzuki\">Asuka Suzuki</a> 2016"
disqusShortname = "shortname"
googleAnalytics = ""
description = "Your personal description"
keywords = ["keyword1", "keyword2"]

[taxonomies]
tag = "tags"
category = "categories"

[params]

Expand All @@ -13,13 +12,21 @@ style = "github"
languages = ["go", "dockerfile"]

[[params.social]]
url = "https://github.com/tanksuzuki"
url = "https://github.com/beli3ver"
fa_icon = "fa-github"

[[params.social]]
url = "https://twitter.com/tanksuzuki"
url = "https://gitlab.com/beli3ver"
fa_icon = "fa-gitlab"

[[params.social]]
url = "https://twitter.com/malkie16"
fa_icon = "fa-twitter"

[[params.social]]
url = "https://telegram.me/beli3ver"
fa_icon = "fa-telegram"

[[params.social]]
url = "/index.xml"
fa_icon = "fa-rss"
2 changes: 1 addition & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h1 class="title notfound">404</h1>
<h2 class="subtitle is-4">
Page not found
</h2>
<a class="button" href="{{ .Site.BaseURL }}">Home Page</a>
<a class="button" href="{{ .Site.BaseURL }}/">Home Page</a>
</div>
</div>
</section>
31 changes: 30 additions & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
<!-- This theme is not supported list page -->
<body>
{{ partial "header" . }}
{{ partial "nav" . }}
<section class="section">
<div class="container">
{{ range sort .Paginator.Pages }}
<article>
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
<div class="content">
{{ .Summary | plainify | safeHTML }}
{{ if .Truncated }}
...<a class="button is-link" href="{{ .Permalink }}" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
{{ end }}
</div>
</article>
{{ end }}
</div>
</section>
{{ partial "pager" . }}
{{ partial "footer" . }}
</body>
29 changes: 17 additions & 12 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{{ partial "header" . }}
{{ partial "nav" . }}
<section class="section">
<div class="container">
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title">{{ .Title }}</h1>
<div class="content">
{{ .Content }}
<body>
{{ partial "header" . }}
{{ partial "nav" . }}
<section class="section">
<div class="container">
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title">{{ .Title }}</h1>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
<div class="content">
{{ .Content }}
</div>
</div>
</div>
</section>
{{ partial "disqus" . }}
{{ partial "footer" . }}
</section>
{{ partial "disqus" . }}
{{ partial "footer" . }}
</body>
26 changes: 1 addition & 25 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1 @@
{{ partial "header" . }}
{{ partial "nav" . }}
<section class="section">
<div class="container">
{{ range sort .Paginator.Pages }}
<article>
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
<div class="content">
{{ .Summary | plainify | safeHTML }}
{{ if .Truncated }}
...<a class="button is-link" href="{{ .Permalink }}" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
{{ end }}
</div>
</article>
{{ end }}
</div>
</section>
{{ partial "pager" . }}
{{ partial "footer" . }}
{{ template "theme/_default/list.html" . }}
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<p>{{ .Site.Copyright | safeHTML }}</p>
</div>
</section>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>
{{ range .Site.Params.highlight.languages }}
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/languages/{{ . }}.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script>
{{ end }}
<script>hljs.initHighlightingOnLoad();</script>
{{ if .Site.GoogleAnalytics }}
Expand Down
8 changes: 5 additions & 3 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<html{{ with .Site.LanguageCode }} lang="{{ . }}"{{ end }}>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="{{ delimit .Keywords ", " }}" name="keywords">
<meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}" property="og:title">
<title>{{ .Title }}{{ if eq .IsHome false }} | {{ .Site.Title }}{{ end }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
{{ with .Site.Params.highlight.style }}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/{{ . }}.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ . }}.min.css">
{{ else }}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" integrity="sha256-Zd1icfZ72UBmsId/mUcagrmN7IN5Qkrvh75ICHIQVTk=" crossorigin="anonymous" />
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container">
<nav class="nav">
<div class="nav-left">
<a class="nav-item" href="{{ .Site.BaseURL }}"><h1 class="title is-4">{{ .Site.Title }}</h1></a>
<a class="nav-item" href="{{ .Site.BaseURL }}/"><h1 class="title is-4">{{ .Site.Title }}</h1></a>
</div>
<div class="nav-right">
<nav class="nav-item level is-mobile">
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="tags">
{{ range . }}
<a class="button is-link" href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
4 changes: 4 additions & 0 deletions sass/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ html
.nav .level-item
margin-left: 10px

nav .level
padding-top: 14px
padding-bot: 6px

.subtitle
color: #69707a

Expand Down
2 changes: 1 addition & 1 deletion static/css/style.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions theme.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# theme.toml template for a Hugo theme
# See https://github.com/spf13/hugoThemes#themetoml for an example

name = "Hemingway"
name = "Hemingway2"
license = "MIT"
licenselink = "https://github.com/tanksuzuki/hemingway/blob/master/LICENSE.md"
licenselink = "https://github.com/beli3ver/hemingway2/blob/master/LICENSE.md"
description = "Really minimal blog theme for hugo"
homepage = "https://github.com/tanksuzuki/hemingway"
homepage = "https://github.com/beli3ver/hemingway2"
tags = ["blog", "font awesome", "highlight.js"]
features = ["html5", "css3"]
features = ["html5", "css3", "tags"]
min_version = 0.16

[author]
name = "tanksuzuki"
homepage = "http://tanksuzuki.com"
name = "Malte Kiefer"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with the evolution of this theme, but how does removing references to the original author make sense for a PR (with a completely unrelated title as well)?

homepage = "https://github.com/beli3ver"