1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2025-05-10 14:36:01 +02:00

56 Commits

Author SHA1 Message Date
1aedf82cf8 Bump version to 1.3.2 2019-06-20 14:22:15 +03:00
7b649e8717 CHANGELOG.md: Move unreleased changes to v1.3.2 2019-06-20 14:22:01 +03:00
9bf1c85346 CHANGELOG.md: Add note about date formatting fix
Special characters in the unquoted date string get escaped and may
hurt SEO as this causes malformed JSON-lD. Fix contributed by user
@TommySprat.

See: https://github.com/alanorth/hugo-theme-bootstrap4-blog/pull/111
2019-06-20 14:18:11 +03:00
63e36db2d5 Merge pull request #111 from TommySprat/dateformat-escape-fix
Do not escape characters in formatted date
2019-06-20 14:16:35 +03:00
c1b3e978b7 Remove escape characters in formatted date
Without the quotes in the template the '+' character will no longer
needlessly be escaped as '\x2b'
2019-06-13 00:07:36 +02:00
4ab2e0da8c package-lock.json: Run npm audit fix
So GitHub stops complaining about security vulnerabilities.
2019-06-05 10:34:08 +03:00
23203082f6 CHANGELOG.md: Add note about absURL change
See: https://github.com/alanorth/hugo-theme-bootstrap4-blog/pull/110
2019-06-05 10:30:53 +03:00
b4c3e06143 Merge pull request #110 from TommySprat/trailing-slash-agnostic-baseurl
Support baseurl without trailing slash
2019-06-05 10:26:18 +03:00
8da12539f3 Support baseurl without trailing slash 2019-06-04 00:26:09 +02:00
c17a7d229f CHANGELOG.md: Add note about recents block in sidebar 2019-05-26 10:30:36 +03:00
26e0a9a259 layouts/partials/recent.html: Only list "Regular" pages
This makes Hugo only list "Regular" pages in the sidebar. Otherwise
if you have very few posts, for example, you might see one entry in
the list called "Posts".

See: https://gohugo.io/functions/where/#mainsections
2019-05-26 10:28:31 +03:00
1faeef487b Bump version to 1.3.1 2019-05-05 12:37:56 +03:00
8d6b318a63 CHANGELOG.md: Move unreleased changes to v1.3.1 2019-05-05 12:36:17 +03:00
cca6636809 CHANGELOG.md: Add note about package.json 2019-05-05 12:30:56 +03:00
d6a099a5cd package.json: Run npm update 2019-05-05 12:30:15 +03:00
70e79a60fa CHANGELOG.md: Add note about Twitter link 2019-05-05 12:21:37 +03:00
ed69bec464 layouts: Update Twitter sharing link
Use the new (?) sharing intent and add the page title as Tweet text.
2019-05-05 12:20:21 +03:00
aed40fe2d3 CHANGELOG.md: Add note about SourceHut CI 2019-04-23 16:48:50 +03:00
81c64c55dd README.md: Add SourceHut build badge 2019-04-23 16:48:02 +03:00
480f31074d .build.yml: Add SourceHut CI script 2019-04-23 16:46:29 +03:00
947ec526cd README.md: Add note about RTL language support 2019-04-22 19:19:57 +03:00
633321fb66 README.md: Fix capitalization 2019-04-22 19:19:08 +03:00
78eb7cf237 package.json: Bump version to 1.3.0 2019-04-22 18:55:15 +03:00
620cfa2366 CHANGELOG.md: Move unreleased changes to v1.3.0 2019-04-22 18:54:14 +03:00
b862745a0d Localize "by" and "in" strings in post meta
This became a problem when I added right-to-left language support.
When you mix RTL languages like Arabic with English (even for just
dates and small strings) everything becomes jumbled. For now I have
only added translations for English (default), Arabic, and Bulgarian.
2019-04-22 18:51:33 +03:00
9da05e7869 Regenerate style.rtl.css 2019-04-22 15:56:55 +03:00
1320168ebd .travis.yml: Use Ubuntu 16.04 "xenial" 2019-04-19 11:04:37 +03:00
9bb2ec06b0 .travis.yml: Use current and LTS Node.js versions
See: https://nodejs.org/en/about/releases/
2019-04-19 11:00:26 +03:00
9934368215 layouts: Set dir="auto" on some HTML elements
When a site is rendered in Arabic the root HTML element gets the
dir="rtl" attribute, but even Arabic sites might have an English
title or footer, etc so we should set dir="auto" on those elements.
2019-04-18 23:38:53 +03:00
2db85d8ab6 CHANGELOG.md: Add note about RTL support 2019-04-18 22:23:06 +03:00
e4876d98cf i18n/ar.yaml: Put arrow on the right side
This works. The way I understand it is that it needs to be "wrong"
before we run rtlcss so that it gets flipped to be correct when in
right-to-left mode.
2019-04-18 22:21:25 +03:00
6a3bdc53fd Add right-to-left version of CSS
This uses rtlcss to make a right-to-left version of the CSS and then
utilizes Hugo's Language variable to conditionally include it. Also,
we set the "dir" attribute on the HTML tag if the currently rendered
language is Arabic.
2019-04-18 22:19:42 +03:00
974203f6eb Use rtlcss to make styles appropriate for RTL languages 2019-04-18 22:17:28 +03:00
90d1a79e01 i18n/ar.yaml: Improved Arabic translation
Credit: Bayan Abid
2019-04-18 16:08:03 +03:00
ed144e2467 theme.toml: Update link 2019-04-18 10:49:43 +03:00
f71886b04f Add Arabic translation
Very poorly done using Google Translate, just so I can see how the
strings look and have a place to start fixing them.
2019-04-17 18:29:33 +03:00
4c15fdb00a CHANGELOG.md: Add unreleased changes 2019-04-17 13:58:33 +03:00
8ea73321a1 Update dependencies in package.json
To keep in sync with upstream bootstrap dependencies.
2019-04-17 13:58:07 +03:00
37187d06f3 package-lock.json: Bump version in lock file
I guess this gets updated when I re-run `npm install`...
2019-04-17 13:57:37 +03:00
fdefc2e541 CHANGELOG.md: Update formatting 2019-04-14 16:35:09 +03:00
3c81a6ca75 CHANGELOG.md: Fix my handle in notes 2019-04-14 16:32:31 +03:00
dedf1bd62c package.json: Bump version to 1.2.1
It looks like I forgot to do this for a few releases.
2019-04-14 16:30:30 +03:00
ad29f240a2 CHANGELOG.md: Move unreleased changes to v1.2.1 2019-04-14 16:29:47 +03:00
b70b3684b6 CHANGELOG.md: Add unreleased changes 2019-04-14 16:27:02 +03:00
2916229d28 layouts: Update for Hugo 0.55.0
See: https://github.com/gohugoio/hugo/releases/tag/v0.55.0
2019-04-14 16:25:35 +03:00
3cced68d64 CHANGELOD.md: Accredit changes 2019-04-06 13:05:22 +03:00
1ff41d275d CHANGELOG.md: Add unreleased changes
Remove Google+ sharing support because the platform is being wound
down by Google.
2019-04-06 13:02:36 +03:00
f410c43eed Merge pull request #108 from bit33/removed-googleplus
Removed Google+ from sharing icons
2019-04-06 12:09:33 +03:00
08cf066111 Removed Google+ from sharing icons
Google+ is no longer available for consumers
2019-04-05 23:55:09 +02:00
fbb4b9f227 Add Dutch translation to unreleased changes 2019-03-13 09:29:37 +02:00
9613fcdeee Add Dutch translation 2019-03-13 09:27:20 +02:00
13b9552119 Add CHANGELOG.md 2019-02-13 18:43:13 +02:00
c079c28841 Regenerate assets 2019-02-13 18:40:55 +02:00
af05f26a36 Update to Bootstrap v4.3.1
See: https://blog.getbootstrap.com/2019/02/11/bootstrap-4-3-0/
2019-02-13 18:40:17 +02:00
09e29be817 Add package-lock.json 2018-12-19 13:18:56 +02:00
3b0a3a1ddc package.json: Update devDependencies
Synchronize with upstream, see:

https://github.com/twbs/bootstrap/blob/v4-dev/package.json
2018-12-19 13:18:04 +02:00
28 changed files with 1882 additions and 51 deletions

15
.build.yml Normal file
View File

@ -0,0 +1,15 @@
image: archlinux
packages:
- nodejs-lts-dubnium
- npm
sources:
- https://git.sr.ht/~alanorth/hugo-theme-bootstrap4-blog
tasks:
- setup: |
id
node -v
cd hugo-theme-bootstrap4-blog
npm install
- test: |
cd hugo-theme-bootstrap4-blog
npm run build

View File

@ -1,10 +1,10 @@
language: node_js
node_js:
- 6
- 8
- 9
- 10
- 11
script: npm run build
sudo: false
dist: trusty
dist: xenial
# vim: ts=2 sw=2 et

41
CHANGELOG.md Normal file
View File

@ -0,0 +1,41 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [[1.3.2]] - 2019-06-20
### Changed
- Only list "Regular" pages in recent posts in sidebar (@alanorth)
- Use absURL instead of baseURL to be more robust with different site configurations (@TommySprat)
- Quote date in post metadata so it does not get escaped (@TommySprat #111)
## [1.3.1] - 2019-05-05
### Added
- SourceHut CI configuration (@alanorth)
### Updated
- Twitter sharing button (@alanorth)
- Dependencies in package.json (@alanorth)
## [1.3.0] - 2019-04-22
### Added
- Arabic translation (@alanorth)
- Support for RTL CSS (@alanorth)
### Updated
- clean-css-cli 4.3.0
## [1.2.1] - 2019-04-14
### Added
- Dutch translation #107 (@bit33)
### Removed
- Google+ icons #108 (@bit33)
### Updated
- Template functions for Hugo 0.55.0 (@alanorth)
## [1.2.0] - 2019-02-13
### Updated
- Bootstrap v4.3.1

View File

@ -1,4 +1,4 @@
# Hugo Bootstrap v4 Blog [![Build Status](https://travis-ci.org/alanorth/hugo-theme-bootstrap4-blog.svg?branch=master)](https://travis-ci.org/alanorth/hugo-theme-bootstrap4-blog)
# Hugo Bootstrap v4 Blog [![Build Status](https://travis-ci.org/alanorth/hugo-theme-bootstrap4-blog.svg?branch=master)](https://travis-ci.org/alanorth/hugo-theme-bootstrap4-blog) [![builds.sr.ht status](https://builds.sr.ht/~alanorth/hugo-theme-bootstrap4-blog.svg)](https://builds.sr.ht/~alanorth/hugo-theme-bootstrap4-blog?)
A simple but opinionated [Hugo](https://gohugo.io) theme geared towards blog-style content. Based on the older two-column [Bootstrap blog example](https://v4-alpha.getbootstrap.com/examples/blog/) that was used for several Bootstrap versions, but has now been retired in favor of a "snarky" (their words) new example as of version [4.0.0's final release](https://blog.getbootstrap.com/2018/01/18/bootstrap-4/).
![Screenshot](https://raw.githubusercontent.com/alanorth/hugo-theme-bootstrap4-blog/master/screenshot.png "Screenshot")
@ -11,14 +11,14 @@ See [picturingjordan.com](https://picturingjordan.com) for an example of this th
- Uses Bootstrap v4's [native system font stack](https://getbootstrap.com/docs/4.0/content/reboot/#native-font-stack) to load quickly and look good on all platforms
- Excellent [structured data](https://developers.google.com/search/docs/guides/intro-structured-data) (JSON-LD), [OpenGraph](http://ogp.me), and [Twitter Card](https://dev.twitter.com/cards/types) metadata support
- robots.txt linking to XML sitemap (disabled by default, see [Hugo docs](https://gohugo.io/extras/robots-txt/))
- Basic support for [multi-lingual content](https://gohugo.io/content-management/multilingual/) (added in Hugo 0.17) and user interface translation (i18n)
- Basic support for [multi-lingual content](https://gohugo.io/content-management/multilingual/) (added in Hugo 0.17) and user interface translation (i18n), including RTL languages like Arabic
- Supports Google, Bing, and Yandex site verification via meta tags
- Supports Google Analytics (async version), see [Hugo docs](https://gohugo.io/extras/analytics/)
- Supports Disqus comments, see [Hugo docs](https://gohugo.io/extras/comments/)
- Can show a message about cookie usage to the user, see [`exampleSite/config.toml`](https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/exampleSite/config.toml)
- Allow addition of custom `<head>` code in site's `layouts/partial/head-custom.html` (see [#17](https://github.com/alanorth/hugo-theme-bootstrap4-blog/pull/17))
- Configurable display of summaries of content in list templates.
- configurable keywords for every post
- Configurable keywords for every post
## Usage
Clone the repository to your site's `themes` directory. Refer to [`exampleSite/config.toml`](https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/exampleSite/config.toml) for recommended configuration values.

View File

@ -1,5 +1,6 @@
{
"style": "static/css/style.css",
"stylertl": "static/css/style.rtl.css",
"cookieconsentcss": "static/css/cookieconsent.min.css",
"cookieconsentjs": "static/js/cookieconsent.min.js"
}

View File

@ -1,3 +1,4 @@
style = "sha384-6+EGfPoOzk/n2DVJSlglKT8TV1TgIMvVcKI73IZgBswLasPBn94KommV6ilJqCXE"
style = "sha384-G5B34w7DFTumWTswxYzTX7NWfbvQEg1HbFFEg6ItN03uTAAoS2qkPS/fu3LhuuSA"
stylertl = "sha384-wxZc+CAOuj0Z/AJqCKfxerYzFw93KXl6wI/vGBVOmdqRyBrIv3STXmzcnBdyQK9C"
cookieconsentcss = "sha384-6iYDyQZuuNT7DcPJGXx241czdv2+GDGUcXRiqw1iXrjgYMTorSetxFP3JCMQMwnR"
cookieconsentjs = "sha384-PDjg2ZdS3khPzd53i18+7tzB32JVQfFMrTXYo21RqPgUmEVAPwIhxOUF/8sP79CS"

47
i18n/ar.yaml Normal file
View File

@ -0,0 +1,47 @@
- id: about
translation: "عن المُدَوَّنَة"
- id: home
translation: "الصَّفْحَة الرَّئيسِيَّة"
- id: recentPosts
translation: "المَنْشورات الأَخِيرَة"
- id: readMore
translation: "قِرَاءَة المَزِيد ←"
- id: translations
translation: "تَرْجَمَة"
- id: share
translation: "شَارِك"
- id: paginatorPrevious
translation: "الصَّفْحَة السَّابِقَة"
- id: paginatorNext
translation: "الصَّفْحَة التَّالِيَة"
- id: cookieMessage
translation: "هذا المَوْقِع يَسْتَخْدِم مَلَفَّات كُوكِيز"
- id: cookieLink
translation: ".اعْرَف أَكْثَر"
- id: cookieDismiss
translation: "!أُوَافِق"
- id: backToTop
translation: "العَوْدَة إِلَى الاَعْلَى"
- id: links
translation: "الرَِّوَابِط"
- id: authoredBy
translation: "الكاتب"
- id: postedIn
translation: "في"
- id: comma
translation: "،"

View File

@ -36,3 +36,9 @@
- id: links
translation: "Линкове"
- id: authoredBy
translation: "от"
- id: postedIn
translation: "в"

View File

@ -36,3 +36,12 @@
- id: links
translation: "Links"
- id: authoredBy
translation: "by"
- id: postedIn
translation: "in"
- id: comma
translation: ","

38
i18n/nl.yaml Normal file
View File

@ -0,0 +1,38 @@
- id: about
translation: "Over ons"
- id: home
translation: "Home"
- id: recentPosts
translation: "Recente berichten"
- id: readMore
translation: "Lees verder →"
- id: translations
translation: "Vertalingen"
- id: share
translation: "Delen"
- id: paginatorPrevious
translation: "Vorige pagina"
- id: paginatorNext
translation: "Volgende pagina"
- id: cookieMessage
translation: "Deze website gebruikt cookies."
- id: cookieLink
translation: "Lees hier meer"
- id: cookieDismiss
translation: "OK"
- id: backToTop
translation: "Terug naar boven"
- id: links
translation: "Links"

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ .Lang }}">
<html lang="{{ .Lang }}" {{ if eq .Lang "ar" }}dir="rtl"{{ end }}>
<head>
{{ partial "head-meta.html" . }}
@ -12,14 +12,19 @@
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{ if eq .Lang "ar" }}
{{ "<!-- ar -->" | safeHTML }}
<link href="{{ "css/style.rtl.css" | absURL }}" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.styleltr}}" crossorigin="anonymous"{{ end }}>
{{ else }}
{{ "<!-- combined, minified CSS -->" | safeHTML }}
<link href="{{ .Site.BaseURL }}css/style.css" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.style}}" crossorigin="anonymous"{{ end }}>
{{ if .RSSLink }}
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ "css/style.css" | absURL }}" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.style}}" crossorigin="anonymous"{{ end }}>
{{ end }}
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ template "_internal/google_analytics_async.html" . }}
{{ if .Site.Params.cookie_consent_info_url }}
@ -50,8 +55,8 @@
{{ if (ne .Site.Params.header_visible false) }}
<header class="blog-header">
<div class="container">
<h1 class="blog-title"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
{{ if .Site.Params.description }}<p class="lead blog-description">{{ .Site.Params.description | markdownify }}</p>{{ end }}
<h1 class="blog-title" dir="auto"><a href="{{ "/" | absURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
{{ if .Site.Params.description }}<p class="lead blog-description" dir="auto">{{ .Site.Params.description | markdownify }}</p>{{ end }}
</div>
</header>
{{ end }}
@ -76,7 +81,7 @@
{{ block "footer" . }}
<footer class="blog-footer">
<p>
<p dir="auto">
{{ if .Site.Copyright }}
{{ .Site.Copyright | markdownify }}
{{ else }}

View File

@ -2,8 +2,8 @@
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
<h2 class="blog-post-title" dir="auto"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> {{ i18n "authoredBy" }} {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} {{ i18n "postedIn" }} {{ partial "meta-terms.html" . }}{{ end }}</p>
</header>
{{ .Content }}
</article> <!-- /.blog-post -->

View File

@ -12,7 +12,7 @@
},
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{- if not .Date.IsZero }}
"dateModified": "{{ .Date.Format $ISO8601 }}",
"dateModified": {{ .Date.Format $ISO8601 }},
{{- end }}
{{- with .Site.Social.GooglePlus }}
"publisher": "{{ printf "%s" . }}",

View File

@ -25,12 +25,12 @@
"wordCount": "{{ .WordCount }}",
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{- if not .PublishDate.IsZero }}
"datePublished": "{{ .PublishDate.Format $ISO8601 }}",
"datePublished": {{ .PublishDate.Format $ISO8601 }},
{{- else }}
"datePublished": "{{ .Date.Format $ISO8601 }}",
"datePublished": {{ .Date.Format $ISO8601 }},
{{- end }}
{{- if not .Lastmod.IsZero }}
"dateModified": "{{ .Lastmod.Format $ISO8601 }}",
"dateModified": {{ .Lastmod.Format $ISO8601 }},
{{- end }}
{{- with .Site.Social.GooglePlus }}
"publisher": "{{ printf "%s" . }}",
@ -58,8 +58,8 @@
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
<h2 class="blog-post-title" dir="auto"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> {{ i18n "authoredBy" }} {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} {{ i18n "postedIn" }} {{ partial "meta-terms.html" . }}{{ end }}</p>
</header>
{{ .Content }}

View File

@ -2,8 +2,8 @@
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
<h2 class="blog-post-title" dir="auto"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> {{ i18n "authoredBy" }} {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} {{ i18n "postedIn" }} {{ partial "meta-terms.html" . }}{{ end }}</p>
</header>
{{ .Summary }}
<a href='{{ .Permalink }}'>{{ i18n "readMore" }}</a>

View File

@ -1,5 +1,5 @@
<link href="{{ .Site.BaseURL }}css/cookieconsent.min.css" rel="stylesheet" type="text/css"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentcss }}" crossorigin="anonymous"{{ end }}>
<script src="{{ .Site.BaseURL }}js/cookieconsent.min.js"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentjs }}" crossorigin="anonymous"{{ end }} async></script>
<link href="{{ "css/cookieconsent.min.css" | absURL }}" rel="stylesheet" type="text/css"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentcss }}" crossorigin="anonymous"{{ end }}>
<script src="{{ "js/cookieconsent.min.js" |absURL }}"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentjs }}" crossorigin="anonymous"{{ end }} async></script>
<script>
window.addEventListener("load", function(){

View File

@ -16,6 +16,6 @@
<meta name="yandex-verification" content="{{ . }}" />
{{ end }}
{{- .Hugo.Generator -}}
{{- .Site.Hugo.Generator -}}
{{- /* vim: set ts=2 sw=2 et: */}}

View File

@ -1,8 +1,8 @@
{{ if .Params.categories }}
<i class="fa fa-folder" aria-hidden="true"></i>&nbsp;{{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" rel="category tag">{{ . }}</a>{{ end }}
<i class="fa fa-folder" aria-hidden="true"></i>&nbsp;{{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}{{ i18n "comma" }} {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" rel="category tag">{{ . }}</a>{{ end }}
{{ end }}
{{ if .Params.tags }}
<i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" rel="tag">{{ . }}</a>{{ end }}
<i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}{{ i18n "comma" }} {{ end }}<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" rel="tag">{{ . }}</a>{{ end }}
{{ end }}
{{- /* vim: set ts=2 sw=2 et: */}}

View File

@ -2,7 +2,7 @@
<h4>{{ i18n "recentPosts" }}</h4>
<ol class="list-unstyled">
{{ $num_recent_posts := (index .Site.Params.sidebar "num_recent_posts" | default 5) }}
{{ range first $num_recent_posts (where .Site.Pages "Section" "in" .Site.Params.mainSections) }}
{{ range first $num_recent_posts (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
<li><a href="{{.RelPermalink}}">{{.Title | markdownify }}</a></li>
{{ end }}
</ol>

View File

@ -2,9 +2,8 @@
<h4>{{ i18n "share" }}</h4>
<nav class="nav sharing-icons">
<a class="nav-item" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" title="Share on Facebook"><span class="fa fa-facebook fa-2x" aria-hidden="true"></span></a>
<a class="nav-item" href="https://plus.google.com/share?url={{ .Permalink }}" title="Share on Google+"><span class="fa fa-google-plus fa-2x" aria-hidden="true"></span></a>
<a class="nav-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ .Permalink }}" title="Share on LinkedIn"><span class="fa fa-linkedin fa-2x" aria-hidden="true"></span></a>
<a class="nav-item" href="https://twitter.com/home?status={{ .Permalink }}" title="Tweet this"><span class="fa fa-twitter fa-2x"></span></a>
<a class="nav-item" href="https://twitter.com/intent/tweet?url={{ .Permalink }}&amp;text={{ .Title }}" title="Tweet this"><span class="fa fa-twitter fa-2x"></span></a>
</nav>
</section>

View File

@ -2,7 +2,7 @@
{{ if and (.Site.Params.sidebar) (isset .Site.Params.sidebar "about") }}
<section class="sidebar-module sidebar-module-inset">
<h4>{{ i18n "about" }}</h4>
<p>{{ .Site.Params.sidebar.about | markdownify }}</p>
<p dir="auto">{{ .Site.Params.sidebar.about | markdownify }}</p>
</section>
{{ end }}

View File

@ -1,3 +1,3 @@
Sitemap: {{ .Site.BaseURL }}sitemap.xml
Sitemap: {{ "sitemap.xml" | absURL }}
User-agent: *

1656
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "hugo-theme-bootstrap4-blog",
"version": "1.1.7",
"version": "1.3.2",
"description": "A Bootstrap v4 theme for the Hugo static site generator.",
"repository": {
"type": "git",
@ -8,20 +8,22 @@
},
"scripts": {
"build:css": "node-sass --output-style expanded --precision 6 source/scss/style.scss static/css/style.css.tmp && cleancss --level 1 static/css/style.css.tmp -o static/css/style.css",
"build:ltrcss": "rtlcss -s static/css/style.css.tmp static/css/style.rtl.css.tmp && cleancss --level 1 static/css/style.rtl.css.tmp -o static/css/style.rtl.css",
"build:fonts": "cp node_modules/font-awesome/fonts/* static/fonts",
"build:cookieconsent": "cp node_modules/cookieconsent/build/cookieconsent.min.css static/css && cp node_modules/cookieconsent/build/cookieconsent.min.js static/js",
"build:generatesri": "node build/sri.js > data/sri.toml",
"build": "npm run build:css && npm run build:fonts && npm run build:cookieconsent && npm run build:generatesri && npm run clean",
"clean": "rm static/css/style.css.tmp"
"build": "npm run build:css && npm run build:ltrcss && npm run build:fonts && npm run build:cookieconsent && npm run build:generatesri && npm run clean",
"clean": "rm static/css/style.css.tmp static/css/style.rtl.css.tmp"
},
"keywords": "hugo",
"author": "Alan Orth",
"license": "CC-BY-3.0",
"devDependencies": {
"bootstrap": "4.1.3",
"clean-css-cli": "^4.2.1",
"bootstrap": "~4.3.1",
"clean-css-cli": "^4.3.0",
"cookieconsent": "3.0.4",
"font-awesome": "^4.7.0",
"node-sass": "^4.9.3"
"node-sass": "^4.12.0",
"rtlcss": "^2.4.0"
}
}

View File

@ -1,7 +1,7 @@
/*!
* Bootstrap v4.1.3 (https://getbootstrap.com/)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Bootstrap v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@ -34,9 +34,11 @@
//@import "node_modules/bootstrap/scss/media";
//@import "node_modules/bootstrap/scss/list-group";
//@import "node_modules/bootstrap/scss/close";
//@import "node_modules/bootstrap/scss/toasts";
//@import "node_modules/bootstrap/scss/modal";
//@import "node_modules/bootstrap/scss/tooltip";
//@import "node_modules/bootstrap/scss/popover";
//@import "node_modules/bootstrap/scss/carousel";
//@import "node_modules/bootstrap/scss/spinners";
@import "node_modules/bootstrap/scss/utilities";
@import "node_modules/bootstrap/scss/print";

File diff suppressed because one or more lines are too long

9
static/css/style.rtl.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
name = "Hugo Bootstrap v4 Blog"
license = "CC-BY-3.0"
licenselink = "https://github.com/alanorth/hugo-theme-bootstrap4/blob/master/LICENSE.txt"
licenselink = "https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/LICENSE.txt"
description = "A simple Hugo theme based on the Bootstrap v4 blog example."
homepage = "https://github.com/alanorth/hugo-theme-bootstrap4"
homepage = "https://github.com/alanorth/hugo-theme-bootstrap4-blog"
tags = ["bootstrap", "blog", "font awesome"]
features = ["responsive", "blog"]
min_version = 0.25