From 5103c8bd0bace2742f03738a55b5131f3e87acff Mon Sep 17 00:00:00 2001 From: colombj Date: Fri, 24 Aug 2018 10:55:37 +0200 Subject: [PATCH 1/5] change .Permalink to .Permalink | safeURL --- layouts/_default/list.html | 8 ++++---- layouts/partials/footer.html | 4 ++-- layouts/partials/recent_posts.html | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 55dfb8e26..3a07eb426 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -28,7 +28,7 @@
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index bfd502ef9..2f139ce14 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -22,7 +22,7 @@

{{ i18n "recentPosts" }}

{{ range first 3 (where .Site.Pages "Type" "blog") }}
{{ end }} diff --git a/layouts/partials/recent_posts.html b/layouts/partials/recent_posts.html index 660d61f58..1e2bc419b 100644 --- a/layouts/partials/recent_posts.html +++ b/layouts/partials/recent_posts.html @@ -31,13 +31,13 @@

{{ .Site.Params.recent_posts.title }}

- {{ i18n "readMore" }} + {{ i18n "readMore" }}

-

{{ .Title }}

+

{{ .Title }}

{{ with .Params.author }} {{ i18n "authorBy" }} {{ . }} @@ -46,7 +46,7 @@

{{ .Title }}

{{ .Summary }}

- {{ i18n "continueReading" }} + {{ i18n "continueReading" }}

From 1b95ef8578f2c1795d551cc07d93142aed5d49f8 Mon Sep 17 00:00:00 2001 From: colombj Date: Fri, 24 Aug 2018 21:28:28 +0200 Subject: [PATCH 2/5] add https: prefix to urls --- layouts/partials/head.html | 24 ++++++++++++------------ layouts/partials/scripts.html | 16 ++++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 4f0293aa9..4e07a49e9 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -20,25 +20,25 @@ {{ .Hugo.Generator }} - + - - + + - + {{ if and (isset .Site.Params "style") .Site.Params.style }} - + {{ else }} - + {{ end }} - + {{ ` @@ -49,14 +49,14 @@ ` | safeHTML }} - - + + - - + + - + diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 33d9762d6..e6ea0e054 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,15 +1,15 @@ {{ template "_internal/google_analytics.html" . }} - - + + - - - - + + + + {{ if .Site.Params.googleMapsApiKey }} - + {{ else }} - + {{ end }} From b5abb11afb45fb0131275c6c8d18bd9438eeda46 Mon Sep 17 00:00:00 2001 From: colombj Date: Fri, 24 Aug 2018 21:34:28 +0200 Subject: [PATCH 3/5] add config and change readme --- README.md | 11 +++++++++++ exampleSite/config_todat.toml | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 exampleSite/config_todat.toml diff --git a/README.md b/README.md index 6c2cc43c9..2ed956894 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ This Hugo theme was ported from [Bootstrapious](http://bootstrapious.com/p/unive * [Recent posts](#recent-posts) * [Meta tags](#meta-tags) * [Usage](#usage) + * [on Dat](#publish on dat) * [Contributing](#contributing) * [License](#license) * [Thanks](#thanks) @@ -429,6 +430,16 @@ Now enter [`localhost:1313`](http://localhost:1313) in the address bar of your b For more information check out the official [Hugo documentation](http://gohugo.io/overview/usage/). +###publish on dat + +To create a version of the website to publish in on dat, you will need to run: + +``` +$ hugo --config config.toml,config_todat.toml +``` + +A new folder will be created, share that folder on the dat network, then copy the dat address and use it as the baseURL, do not forget to add a slash at the end of the baseURL. +Run the command again, and reload the dat sharing, the website should be nice looking on the beakerbrowser. ## Contributing diff --git a/exampleSite/config_todat.toml b/exampleSite/config_todat.toml new file mode 100644 index 000000000..92520f1eb --- /dev/null +++ b/exampleSite/config_todat.toml @@ -0,0 +1,2 @@ +baseurl = 'dat://xxx/' +publishDir = 'public-dat' \ No newline at end of file From a4632e05d6f95ef49a886b02e8167357cebadb4a Mon Sep 17 00:00:00 2001 From: colombj Date: Fri, 24 Aug 2018 23:48:55 +0200 Subject: [PATCH 4/5] safeurl in testimonials --- layouts/partials/testimonials.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/testimonials.html b/layouts/partials/testimonials.html index ec259845f..e9c4e4cf7 100644 --- a/layouts/partials/testimonials.html +++ b/layouts/partials/testimonials.html @@ -26,7 +26,7 @@

{{ .Site.Params.testimonials.title }}

- +
{{ .name }}

{{ .position }}

From b661bdb5479271cb24faf0b1af14bd60323788f0 Mon Sep 17 00:00:00 2001 From: colombj Date: Fri, 24 Aug 2018 23:52:49 +0200 Subject: [PATCH 5/5] add info on readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ed956894..0df5b43bb 100644 --- a/README.md +++ b/README.md @@ -439,7 +439,7 @@ $ hugo --config config.toml,config_todat.toml ``` A new folder will be created, share that folder on the dat network, then copy the dat address and use it as the baseURL, do not forget to add a slash at the end of the baseURL. -Run the command again, and reload the dat sharing, the website should be nice looking on the beakerbrowser. +Run the command again, and reload the dat sharing, the website should be nice looking on the beakerbrowser. Be careful, small caps and capitals are treated differently on dat, while it is not on http sites (image file names,...). ## Contributing