diff options
author | Michael Romero <halogenica@users.noreply.github.com> | 2022-06-26 10:25:10 +0300 |
---|---|---|
committer | Michael Romero <halogenica@users.noreply.github.com> | 2022-06-26 10:25:10 +0300 |
commit | c79523a964a1c719bcc4163360546627fc442e71 (patch) | |
tree | 92b8a4f6f2f4351ee3faf93eedd6082612bb529f | |
parent | ec8f709bfb9b2a98285125df9fb3f3fe02e08a9e (diff) | |
parent | 99ca240e9977196207da2e09c3804d3e98c14e57 (diff) |
Merge branch 'master' into pr/292
42 files changed, 829 insertions, 198 deletions
@@ -1,4 +1,4 @@ -# Beautiful Hugo - A port of Beautiful Jekyll Theme +# Beautiful Hugo - An adaptation of the Beautiful Jekyll theme ![Beautiful Hugo Theme Screenshot](https://github.com/halogenica/beautifulhugo/blob/master/images/screenshot.png) @@ -61,19 +61,24 @@ To use this feature, uncomment and fill out the `disqusShortname` parameter in ` ### Staticman support -Add *staticman* configuration section in `config.toml` or `config.yaml` +Add *Staticman* configuration section in `config.toml` or `config.yaml` -Sample `config.yaml` configuration +Sample `config.toml` configuration ``` - staticman: - api: https://api.staticman.net/v2/entry/<USERNAME>/<REPOSITORY-BLOGNAME>/master/comments - pulls: https://github.com/<USERNAME>/<REPOSITORY-BLOGNAME>/pulls - recaptcha: +[Params.staticman] + api = "https://<API-ENDPOINT>/v3/entry/{GIT-HOST}/<USERNAME>/<REPOSITORY-BLOGNAME>/master/comments" +[Params.staticman.recaptcha] sitekey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v" secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic=" ``` +Note: The public `API-ENDPOINT` https://staticman.net is currently hitting its API limit, so one may use other API instances to provide Staticman comment service. + +The section `[Params.staticman.recaptcha]` is *optional*. To add reCAPTCHA to your site, you have to replace the default values with your own ones (to be obtained from Google.) The site `secret` has to be encrypted with + + https://<API-ENDPOINT>/v3/encrypt/<SITE-SECRET> + You must also configure the `staticman.yml` in you blog website. ``` @@ -99,7 +104,7 @@ comments: secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic=" ``` - +If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won't* need the section `reCaptcha` in `staticman.yml` ### Google Analytics @@ -109,20 +114,42 @@ Note that the Google Analytics tracking code will only be inserted into the page ### Commit SHA on the footer -If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two environment variables have to be set (`GIT_COMMIT_SHA` and `GIT_COMMIT_SHA_SHORT`) and parameter `commit` has to be defined in the config file: +If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `config.toml`: ``` +enableGitInfo = true [Params] commit = "https://github.com/<username>/<siterepo>/tree/" ``` - -This can be achieved by running the next command prior to calling Hugo: +See at [vincenttam/vincenttam.gitlab.io](https://gitlab.com/vincenttam/vincenttam.gitlab.io) for an example of how to add it to a continuous integration system. + +### Multilingual + +To allow Beautiful Hugo to go multilingual, you need to define the languages +you want to use inside the `languages` parameter on `config.toml` file, also +redefining the content dir for each one. Check the `i18n/` folder to see all +languages available. + +```toml +[languages] + [languages.en] + contentDir = "content/en" # English + [languages.ja] + contentDir = "content/ja" # Japanese + [languages.br] + contentDir = "content/br" # Brazilian Portuguese +``` + +Now you just need to create a subdir within the `content/` folder for each +language and just put stuff inside `page/` and `post/` regular directories. ``` - GIT_COMMIT_SHA=`git rev-parse --verify HEAD` GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD` +content/ content/ content/ +└── en/ └── br/ └── ja/ + ├── page/ ├── page/ ├── page/ + └── post/ └── post/ └── post/ + ``` - -See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an example of how to add it to a continuous integration system. ### Extra shortcodes @@ -133,9 +160,9 @@ There are two extra shortcodes provided (along with the customized figure shortc This simply adds the html5 detail attribute, supported on all *modern* browsers. Use it like this: ``` -{{% details "This is the details title (click to expand)" %}} +{{< details "This is the details title (click to expand)" >}} This is the content (hidden until clicked). -{{% /details %}} +{{< /details >}} ``` #### Split @@ -152,7 +179,7 @@ This is column 2. ## About -This is a port of the Jekyll theme [Beautiful Jekyll](https://deanattali.com/beautiful-jekyll/) by [Dean Attali](https://deanattali.com/aboutme#contact). It supports most of the features of the original theme. +This is an adaptation of the Jekyll theme [Beautiful Jekyll](https://deanattali.com/beautiful-jekyll/) by [Dean Attali](https://deanattali.com/aboutme#contact). It supports most of the features of the original theme, and many new features. It has diverged from the Jekyll theme over time, with years of community updates. ## License diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index cead546..0ebf774 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -11,12 +11,6 @@ title = "Facebook" icon = "fab fa-facebook" [[social_icons]] -id = "googleplus" -url = "https://plus.google.com/%s" -title = "Google+" -icon = "fab fa-google-plus" - -[[social_icons]] id = "github" url = "https://github.com/%s" title = "GitHub" @@ -41,6 +35,12 @@ title = "Twitter" icon = "fab fa-twitter" [[social_icons]] +id = "slack" +url = "https://%s.slack.com/" +title = "Slack" +icon = "fab fa-slack" + +[[social_icons]] id = "reddit" url = "https://reddit.com/u/%s" title = "Reddit" @@ -110,7 +110,7 @@ icon = "fas fa-gamepad" id = "keybase" url = "https://keybase.io/%s" title = "Keybase" -icon = "fas fa-key" +icon = "fab fa-keybase" [[social_icons]] id = "vk" @@ -135,3 +135,27 @@ id = "500px" url = "https://500px.com/%s" title = "500px" icon = "fab fa-500px" + +[[social_icons]] +id = "codepen" +url = "https://codepen.io/%s" +title = "CodePen" +icon = "fab fa-codepen" + +[[social_icons]] +id = "kaggle" +url = "https://www.kaggle.com/%s" +title = "kaggle" +icon = "fab fa-kaggle" + +[[social_icons]] +id = "mastodon" +url = "https://%s" +title = "Mastodon" +icon = "fab fa-mastodon" + +[[social_icons]] +id = "weibo" +url = "https://weibo.com/%s" +title = "Weibo" +icon = "fab fa-weibo" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 22dbfb9..97699ba 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -16,6 +16,7 @@ pygmentsCodefencesGuessSyntax = true [Params] # homeTitle = "Beautiful Hugo Theme" # Set a different text for the header on the home page subtitle = "Build a beautiful and simple website in minutes" + mainSections = ["post","posts"] logo = "img/avatar-icon.png" # Expecting square dimensions favicon = "img/favicon.ico" dateFormat = "January 2, 2006" @@ -28,6 +29,7 @@ pygmentsCodefencesGuessSyntax = true socialShare = true delayDisqus = true showRelatedPosts = true +# hideAuthor = true # gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic" #[[Params.bigimg]] @@ -47,7 +49,6 @@ pygmentsCodefencesGuessSyntax = true website = "yourwebsite.com" email = "youremail@domain.com" facebook = "username" - googleplus = "+username" # or xxxxxxxxxxxxxxxxxxxxx github = "username" gitlab = "username" bitbucket = "username" @@ -67,6 +68,11 @@ pygmentsCodefencesGuessSyntax = true paypal = "username" telegram = "username" 500px = "username" + codepen = "username" + mastodon = "url" + kaggle = "username" + weibo = "username" + slack = "username" [[menu.main]] name = "Blog" diff --git a/exampleSite/content/post/2015-02-20-test-markdown.md b/exampleSite/content/post/2015-02-20-test-markdown.md index 8ef8cbf..1b36059 100644 --- a/exampleSite/content/post/2015-02-20-test-markdown.md +++ b/exampleSite/content/post/2015-02-20-test-markdown.md @@ -5,7 +5,7 @@ date: 2015-02-20 tags: ["example", "markdown"] --- -You can write regular [markdown](http://markdowntutorial.com/) here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. +You can write regular [markdown](http://markdowntutorial.com/) here and [Hugo](https://gohugo.io) will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. **Here is some bold text** diff --git a/i18n/br.yaml b/i18n/br.yaml index 98cbc47..ca45382 100644 --- a/i18n/br.yaml +++ b/i18n/br.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "02/Jan/2006 15:04:05" - id: postedOnDate - translation: "Postado em {{ .Count }}" + translation: "Postado em {{ . }}" - id: lastModified - translation: "(Ultima modificação em {{ .Count }})" + translation: "(Ultima modificação em {{ . }})" - id: translationsLabel translation: "Outras linguagens: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Tema por <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adaptado para <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> alimentada • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adaptado de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/de.yaml b/i18n/de.yaml index be3a79a..39d9312 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Gepostet am {{ .Count }}" + translation: "Gepostet am {{ . }}" - id: lastModified - translation: "(Zuletzt geändert am {{ .Count }})" + translation: "(Zuletzt geändert am {{ . }})" - id: translationsLabel translation: "Andere Sprachen: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> angetrieben • Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> angepasst von <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation @@ -57,7 +57,7 @@ - id: useMarkdown translation: "Sie können Markdown-Syntax verwenden" - id: yourName - translation: "Irh Name" + translation: "Ihr Name" - id: yourEmail translation: "Ihre Emailadresse" - id: yourWebsite diff --git a/i18n/dk.yaml b/i18n/dk.yaml new file mode 100644 index 0000000..deb8afc --- /dev/null +++ b/i18n/dk.yaml @@ -0,0 +1,74 @@ +# Content +- id: dateFormat + translation: "January 2, 2006" +- id: shortdateFormat + translation: "Jan 2, 2006 15:04:05" +- id: postedOnDate + translation: "Slået op den {{ .Count }}" +- id: lastModified + translation: "(Senest redigeret den {{ .Count }})" +- id: translationsLabel + translation: "Andre sprog: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Læs mere" +- id: olderPosts + translation: "Ældre opslag" +- id: newerPosts + translation: "Nyere opslag" +- id: previousPost + translation: "Forrige opslag" +- id: nextPost + translation: "Næste opslag" +- id: readTime + translation: "Minutter" +- id: words + translation: "Ord" + + +# 404 page +- id: pageNotFound + translation: "Ups, denne side eksisterer ikke. (404 error)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> drevet • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> tilpasset fra <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + +# Navigation +- id: toggleNavigation + translation: "Navigation" +- id: languageSwitcherLabel + translation: "Sprog" +- id: gcseLabelShort + translation: "Søg" +- id: gcseLabelLong + translation: "Søg {{ .Site.Title }}" +- id: gcseClose + translation: "Luk" + +# Staticman +- id: noComment + translation: "Ingen kommentar" +- id: oneComment + translation: "Kommentar" +- id: moreComment + translation: "Kommentarer" +- id: useMarkdown + translation: "Du kan anvende Markdown syntax" +- id: yourName + translation: "Dit navn" +- id: yourEmail + translation: "Din emailadresse" +- id: yourWebsite + translation: "Din hjemmeside" + +# Delayed Disqus +- id: show + translation: "Vis" +- id: comments + translation: "Kommentarer" + +# Related posts +- id: seeAlso + translation: "Se også" diff --git a/i18n/en.yaml b/i18n/en.yaml index ce90070..eee2c8a 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "Jan 2, 2006 15:04:05" - id: postedOnDate - translation: "Posted on {{ .Count }}" + translation: "Posted on {{ . }}" - id: lastModified - translation: "(Last modified on {{ .Count }})" + translation: "(Last modified on {{ . }})" - id: translationsLabel translation: "Other languages: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adapted from <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/eo.yaml b/i18n/eo.yaml index 68540ca..24242f3 100644 --- a/i18n/eo.yaml +++ b/i18n/eo.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Afiŝiĝis je {{ .Count }}" + translation: "Afiŝiĝis je {{ . }}" - id: lastModified - translation: "(Laste aliiĝis je {{ .Count }})" + translation: "(Laste aliiĝis je {{ . }})" - id: translationsLabel translation: "Aliaj lingvoj: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a>-povigita • Haŭto de <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adaptiĝis al <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a>-povigita • Haŭto de <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adaptiĝis de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/es.yaml b/i18n/es.yaml index 6c0850f..0ef597a 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Publicado el {{ .Count }}" + translation: "Publicado el {{ . }}" - id: lastModified - translation: "(Última modificación en {{ .Count }})" + translation: "(Última modificación en {{ . }})" - id: translationsLabel translation: "Otros idiomas: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> alimentada • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adaptado de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/fr.yaml b/i18n/fr.yaml index ed85a9b..4b68667 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Posté le {{ .Count }}" + translation: "Posté le {{ . }}" - id: lastModified - translation: "(Dernière modification le {{ .Count }})" + translation: "(Dernière modification le {{ . }})" - id: translationsLabel translation: "Autres langues : " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Carbure avec <a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Avec le Theme <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapté en <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: 'Carbure avec <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Avec le Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adapté de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/hr.yaml b/i18n/hr.yaml new file mode 100644 index 0000000..2490ed1 --- /dev/null +++ b/i18n/hr.yaml @@ -0,0 +1,74 @@ +# Content +- id: dateFormat + translation: "Siječanj 2, 2006" +- id: shortdateFormat + translation: "Sij 2, 2006 15:04:05" +- id: postedOnDate + translation: "Obajvljeno na {{ .Count }}" +- id: lastModified + translation: "(Zadnja promjena na {{ .Count }})" +- id: translationsLabel + translation: "Ostali jezici: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Pročitaj više" +- id: olderPosts + translation: "Starije objave" +- id: newerPosts + translation: "Novije objave" +- id: previousPost + translation: "Prethodna objava" +- id: nextPost + translation: "Slijedeća objava" +- id: readTime + translation: "minuta" +- id: words + translation: "riječi" + + +# 404 page +- id: pageNotFound + translation: "Whoops, ova stranica ne postoji. Idemo dalje. (404 error)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '<a href="https://gohugo.io">Pokreće Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> prilagođena od <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + +# Navigation +- id: toggleNavigation + translation: "Uključi/isključi navigaciju" +- id: languageSwitcherLabel + translation: "Jezik" +- id: gcseLabelShort + translation: "Traži" +- id: gcseLabelLong + translation: "Traži {{ .Site.Title }}" +- id: gcseClose + translation: "Zatvori" + +# Staticman +- id: noComment + translation: "Nema komenatara" +- id: oneComment + translation: "komentar" +- id: moreComment + translation: "komenatari" +- id: useMarkdown + translation: "Možete koristiti Markdown sintaksu" +- id: yourName + translation: "Vaše ime" +- id: yourEmail + translation: "Vaša email adresa" +- id: yourWebsite + translation: "You web stranica" + +# Delayed Disqus +- id: show + translation: "Pokaži" +- id: comments + translation: "komentari" + +# Related posts +- id: seeAlso + translation: "Također vidi" diff --git a/i18n/it.yaml b/i18n/it.yaml index 4bf0305..c863da6 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan 2006 15:04:05" - id: postedOnDate - translation: "Redatto il {{ .Count }}" + translation: "Redatto il {{ . }}" - id: lastModified - translation: "(Ultima modifica il {{ .Count }})" + translation: "(Ultima modifica il {{ . }})" - id: translationsLabel translation: "Altre lingue: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Sviluppato con Hugo v{{ .Site.Hugo.Version }}</a> • Tema: <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adattato a <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Sviluppato con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattato da <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/ja.yaml b/i18n/ja.yaml index f810b0b..f8603f2 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "{{ .Count }}に投稿" + translation: "{{ . }}に投稿" - id: lastModified - translation: "(最終更新日時{{ .Count }})" + translation: "(最終更新日時{{ . }})" - id: translationsLabel translation: "翻訳:" - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '起動力に<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • テーマに<a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>に基づいている<a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '起動力に<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • テーマに<a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>に基づいている<a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/ko.yaml b/i18n/ko.yaml new file mode 100644 index 0000000..164a774 --- /dev/null +++ b/i18n/ko.yaml @@ -0,0 +1,74 @@ +# Content +- id: dateFormat + translation: "2006년 1월 2일" +- id: shortdateFormat + translation: "2006. 1. 2. 15:04:05" +- id: postedOnDate + translation: "{{ .Count }}에 게시됨" +- id: lastModified + translation: "({{ .Count }}에 마지막으로 수정됨)" +- id: translationsLabel + translation: "다른 언어: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "더 읽기" +- id: olderPosts + translation: "이전 페이지" +- id: newerPosts + translation: "다음 페이지" +- id: previousPost + translation: "이전 글" +- id: nextPost + translation: "다음 글" +- id: readTime + translation: "분" +- id: words + translation: "단어" + + +# 404 page +- id: pageNotFound + translation: "이런, 이 페이지를 찾을 수 없어요. (404 오류)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 을 사용함 • <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> 를 개조한 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 테마' + +# Navigation +- id: toggleNavigation + translation: "네비게이션 토글" +- id: languageSwitcherLabel + translation: "언어" +- id: gcseLabelShort + translation: "검색" +- id: gcseLabelLong + translation: "{{ .Site.Title }}에서 검색" +- id: gcseClose + translation: "닫기" + +# Staticman +- id: noComment + translation: "댓글이 없습니다." +- id: oneComment + translation: "개의 댓글" +- id: moreComment + translation: "개의 댓글들" +- id: useMarkdown + translation: "마크다운 문법을 쓸 수 있습니다." +- id: yourName + translation: "이름" +- id: yourEmail + translation: "이메일" +- id: yourWebsite + translation: "웹사이트" + +# Delayed Disqus +- id: show + translation: "표시" +- id: comments + translation: "댓글들" + +# Related posts +- id: seeAlso + translation: "더 보면 좋을 글들" diff --git a/i18n/lmo.yaml b/i18n/lmo.yaml new file mode 100644 index 0000000..92ece42 --- /dev/null +++ b/i18n/lmo.yaml @@ -0,0 +1,297 @@ + + +# Content + +- id: dateFormat + + translation: "2 January 2006" + +- id: shortdateFormat + + translation: "2 Jan 2006 15:04:05" + +- id: postedOnDate + + translation: "Publegaa il {{ .Count }}" + +- id: lastModified + + translation: "(Darrera modifega ell {{ .Count }})" + +- id: translationsLabel + + translation: "Alter lengov: " + +- id: translationsSeparator + + translation: ", " + +- id: readMore + + translation: "Lensg" + +- id: olderPosts + + translation: "Articol pussee vegg" + +- id: newerPosts + + translation: "Articoli pussee noeuv" + +- id: previousPost + + translation: "Articolo de prima" + +- id: nextPost + + translation: "Articolo dopo" + +- id: readTime + + translation: "megnuu" + +- id: words + + translation: "paroll" + + + + + +# 404 page + +- id: pageNotFound + + translation: "Ocio, quella pagina chi la esist no. (errore 404)" + + + +# Footer + +- id: poweredBy # Accepts HTML + + translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + + + +# Navigation + +- id: toggleNavigation + + translation: "Attiva/disattiva la navigazion" + +- id: languageSwitcherLabel + + translation: "Lengua" + +- id: gcseLabelShort + + translation: "Cerca" + +- id: gcseLabelLong + + translation: "Cerca {{ .Site.Title }}" + +- id: gcseClose + + translation: "Sara su" + + + +# Staticman + +- id: noComment + + translation: "Nissub comment" + +- id: oneComment + + translation: "comment" + +- id: moreComment + + translation: "comment" + +- id: useMarkdown + + translation: "Te pòdet doperà la sintassi Markdown" + +- id: yourName + + translation: "El tò nomm" + +- id: yourEmail + + translation: "La toa adressa e-mail" + +- id: yourWebsite + + translation: "El tò sitt web" + + + +# Delayed Disqus + +- id: show + + translation: "Mostra" + +- id: comments + + translation: "comment" + + + +# Related posts + +- id: seeAlso + + translation: "Varda anca" + +# Content + +- id: dateFormat + + translation: "2 January 2006" + +- id: shortdateFormat + + translation: "2 Jan 2006 15:04:05" + +- id: postedOnDate + + translation: "Publegaa il {{ .Count }}" + +- id: lastModified + + translation: "(Darrera modifega ell {{ .Count }})" + +- id: translationsLabel + + translation: "Alter lengov: " + +- id: translationsSeparator + + translation: ", " + +- id: readMore + + translation: "Lensg" + +- id: olderPosts + + translation: "Articol pussee vegg" + +- id: newerPosts + + translation: "Articoli pussee noeuv" + +- id: previousPost + + translation: "Articolo de prima" + +- id: nextPost + + translation: "Articolo dopo" + +- id: readTime + + translation: "megnuu" + +- id: words + + translation: "paroll" + + + + + +# 404 page + +- id: pageNotFound + + translation: "Ocio, quella pagina chi la esist no. (errore 404)" + + + +# Footer + +- id: poweredBy # Accepts HTML + + translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + + + +# Navigation + +- id: toggleNavigation + + translation: "Attiva/disattiva la navigazion" + +- id: languageSwitcherLabel + + translation: "Lengua" + +- id: gcseLabelShort + + translation: "Cerca" + +- id: gcseLabelLong + + translation: "Cerca {{ .Site.Title }}" + +- id: gcseClose + + translation: "Sara su" + + + +# Staticman + +- id: noComment + + translation: "Nissub comment" + +- id: oneComment + + translation: "comment" + +- id: moreComment + + translation: "comment" + +- id: useMarkdown + + translation: "Te pòdet doperà la sintassi Markdown" + +- id: yourName + + translation: "El tò nomm" + +- id: yourEmail + + translation: "La toa adressa e-mail" + +- id: yourWebsite + + translation: "El tò sitt web" + + + +# Delayed Disqus + +- id: show + + translation: "Mostra" + +- id: comments + + translation: "comment" + + + +# Related posts + +- id: seeAlso + + translation: "Varda anca" diff --git a/i18n/nb.yaml b/i18n/nb.yaml index cd12ec6..fa02605 100644 --- a/i18n/nb.yaml +++ b/i18n/nb.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Postet {{ .Count }}" + translation: "Postet {{ . }}" - id: lastModified - translation: "(Sist endret {{ .Count }})" + translation: "(Sist endret {{ . }})" - id: translationsLabel translation: "Andre språk: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Kjører på <a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Tema fra <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> tilpasset til <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: 'Kjører på <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Tema fra <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> tilpasset fra <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/nl.yaml b/i18n/nl.yaml index 02993bb..f757606 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Gepost op {{ .Count }}" + translation: "Gepost op {{ . }}" - id: lastModified - translation: "(Laatst gewijzigd op {{ .Count }})" + translation: "(Laatst gewijzigd op {{ . }})" - id: translationsLabel translation: "Andere talen: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a>-aangedreven • Thema door <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> aangepast voor <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a>-aangedreven • Thema door <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> aangepast van <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation @@ -65,9 +65,9 @@ # Delayed Disqus - id: show - translation: "Laat" + translation: "Laat zien" - id: comments - translation: "reacties zien" + translation: "reacties" # Related posts - id: seeAlso diff --git a/i18n/pl.yaml b/i18n/pl.yaml index e3d4f8b..4b41797 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Opublikowany {{ .Count }}" + translation: "Opublikowany {{ . }}" - id: lastModified - translation: "(Ostatnia modyfikacja {{ .Count }})" + translation: "(Ostatnia modyfikacja {{ . }})" - id: translationsLabel translation: "Inne języki: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '<a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>' + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> napędzany • Motyw <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> przystosowany od <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/ru.yaml b/i18n/ru.yaml index e05bdb4..0f72c37 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -1,12 +1,12 @@ # Content - id: dateFormat - translation: "Январь 2, 2006" + translation: "02.01.2006" - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Опубликовано {{ .Count }}" + translation: "Опубликовано {{ . }}" - id: lastModified - translation: "(Последнее изменение {{ .Count }})" + translation: "(Последнее изменение {{ . }})" - id: translationsLabel translation: "Другие языки: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'На базе <a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Тема <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> на базе <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + translation: 'На базе <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Тема <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> на базе <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/tr.yaml b/i18n/tr.yaml new file mode 100644 index 0000000..29e24f8 --- /dev/null +++ b/i18n/tr.yaml @@ -0,0 +1,74 @@ +# Content +- id: dateFormat + translation: "2 Ocak 2006" +- id: shortdateFormat + translation: "2 Oca 2006 15.04.05" +- id: postedOnDate + translation: "{{ .Count }} tarihinde paylaşıldı" +- id: lastModified + translation: "({{ .Count }} tarihinde güncellendi)" +- id: translationsLabel + translation: "Diğer diller: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Daha fazla oku" +- id: olderPosts + translation: "Önceki gönderiler" +- id: newerPosts + translation: "Son gönderiler" +- id: previousPost + translation: "Önceki gönderi" +- id: nextPost + translation: "Sonraki gönderi" +- id: readTime + translation: "dakika" +- id: words + translation: "kelime" + + +# 404 page +- id: pageNotFound + translation: "Ups, bu sayfa mevcut değil. Başka bir yöne ilerleyin. (404 hatası)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> altyapısı • <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> temasından uyarlanan <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> teması kullanılmaktadır.' + +# Navigation +- id: toggleNavigation + translation: "Gezinmeyi aktifleştirin" +- id: languageSwitcherLabel + translation: "Dil" +- id: gcseLabelShort + translation: "Arama" +- id: gcseLabelLong + translation: "{{ .Site.Title }} içinde arayın" +- id: gcseClose + translation: "Kapat" + +# Staticman +- id: noComment + translation: "Yorum yok" +- id: oneComment + translation: "yorum" +- id: moreComment + translation: "yorum" +- id: useMarkdown + translation: "Markdown söz dizimini kullanabilirsiniz" +- id: yourName + translation: "İsminiz" +- id: yourEmail + translation: "E-posta adresiniz" +- id: yourWebsite + translation: "Web siteniz" + +# Delayed Disqus +- id: show + translation: "Göster" +- id: comments + translation: "yorumlar" + +# Related posts +- id: seeAlso + translation: "Ayrıca bakınız" diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 9b104c3..7777495 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "发表于 {{ .Count }}" + translation: "发表于 {{ . }}" - id: lastModified - translation: "(上次修改时间 {{ .Count }})" + translation: "(上次修改时间 {{ . }})" - id: translationsLabel translation: "其它语言: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '由 <a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 强力驱动 • 主题 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + translation: '由 <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 强力驱动 • 主题 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml index fea27b0..6d2436d 100644 --- a/i18n/zh-TW.yaml +++ b/i18n/zh-TW.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "發表於 {{ .Count }}" + translation: "發表於 {{ . }}" - id: lastModified - translation: "(最後修改於 {{ .Count }})" + translation: "(最後修改於 {{ . }})" - id: translationsLabel translation: "其他語言: " - id: translationsSeparator @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '由 <a href="http://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 提供 • 主題 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + translation: '由 <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 提供 • 主題 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' # Navigation - id: toggleNavigation diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 25befda..a67d0c4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,6 +8,7 @@ {{ block "header" . }}{{ partial "header.html" . }}{{ end }} {{ block "main" . }}{{ end }} {{ partial "footer.html" . }} + {{ block "footer" . }}{{ end }} </body> </html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5e52b60..e08da36 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,38 +9,7 @@ {{ end }} <div class="posts-list"> {{ range .Paginator.Pages }} - <article class="post-preview"> - <a href="{{ .Permalink }}"> - <h2 class="post-title">{{ .Title }}</h2> - - {{ if .Params.subtitle }} - <h3 class="post-subtitle"> - {{ .Params.subtitle }} - </h3> - {{ end }} - </a> - - <p class="post-meta"> - {{ partial "post_meta.html" . }} - </p> - <div class="post-entry"> - {{ if .Truncated }} - {{ .Summary }} - <a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> - {{ else }} - {{ .Content }} - {{ end }} - </div> - - {{ if .Params.tags }} - <div class="blog-tags"> - {{ range .Params.tags }} - <a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a> - {{ end }} - </div> - {{ end }} - - </article> + {{ partial "post_preview.html" .}} {{ end }} </div> {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7af7637..0ab1bf5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -23,14 +23,19 @@ {{ end }} {{ if .Site.Params.showRelatedPosts }} - {{ $related := .Site.RegularPages.Related . | first 3 }} - {{ with $related }} - <h4 class="see-also">{{ i18n "seeAlso" }}</h4> - <ul> - {{ range . }} - <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> + {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} + {{ $.Scratch.Set "has_related" true }} {{ end }} - </ul> + + {{ if $.Scratch.Get "has_related" }} + <h4 class="see-also">{{ i18n "seeAlso" }}</h4> + <ul> + {{ $num_to_show := .Site.Params.related_content_limit | default 5 }} + {{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} + <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> + {{ end }} + </ul> + {{ end }} {{ end }} </article> diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index d16cf6f..88e6d31 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -5,18 +5,18 @@ <div class="container" role="main"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <article class="post-preview"> - <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> + <div class="panel-group" id="accordion"> {{ range $key, $value := .Data.Terms.ByCount }} <div class="panel panel-default"> - <a class="collapsed" role="button" data-toggle="collapse" data-target="#collapse{{ $value.Name }}" data-parent="#accordion" aria-expanded="false" aria-controls="collapse{{ $value.Name }}"> - <div class="panel-heading" role="tab" id="header{{ $value.Name }}"> + <a class="collapsed" role="button" data-toggle="collapse" data-target="#collapse{{ $value.Name }}" data-parent="#accordion"> + <div class="panel-heading" id="header{{ $value.Name }}"> <h4 class="panel-title"> {{ $value.Name }} <span class="badge">{{ $value.Count }}</span> </h4> </div> </a> - <div id="collapse{{ $value.Name }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{ $value.Name }}"> + <div id="collapse{{ $value.Name }}" class="panel-collapse collapse"> <div class="panel-body"> <a href="{{ $.Site.LanguagePrefix | absURL }}/{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item view-all"> View all</a> diff --git a/layouts/index.html b/layouts/index.html index d7544e2..cc15000 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,39 +9,9 @@ {{ end }} <div class="posts-list"> - {{ $pag := .Paginate (where .Data.Pages "Type" "post") }} + {{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range $pag.Pages }} - <article class="post-preview"> - <a href="{{ .Permalink }}"> - <h2 class="post-title">{{ .Title }}</h2> - {{ if .Params.subtitle }} - <h3 class="post-subtitle"> - {{ .Params.subtitle }} - </h3> - {{ end }} - {{ if .Params.image }} - <img src="{{ .Params.image }}" alt="{{ .Title }}" class="img-title" /> - {{ end }} - </a> - - {{ partial "post_meta.html" . }} - <div class="post-entry"> - {{ if .Truncated }} - {{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }} - <a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> - {{ else }} - {{ .Content }} - {{ end }} - </div> - - {{ if .Params.tags }} - <div class="blog-tags"> - {{ range .Params.tags }} - <a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a> - {{ end }} - </div> - {{ end }} - </article> + {{ partial "post_preview" . }} {{ end }} </div> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 030f657..8b48793 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,6 @@ + {{ if eq .Type "page" }} + {{ partial "page_meta.html" . }} + {{ end }} <footer> <div class="container"> <div class="row"> @@ -50,7 +53,7 @@ <!-- Please don't remove this, keep my open source work credited :) --> <p class="credits theme-by text-muted"> {{ i18n "poweredBy" . | safeHTML }} - {{ with .Site.Params.commit }} • [<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }} + {{ if $.GitInfo }} • [<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }} </p> </div> </div> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 02c3928..de9a5a3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -29,13 +29,9 @@ <!-- Site Title, Description, Author, and Favicon --> {{- with ($.Scratch.Get "Title") }} <title>{{ . }} - {{ $.Site.Title }}</title> - <meta property="og:title" content="{{ . }}" /> - <meta name="twitter:title" content="{{ . | truncate 70 }}" /> {{- end }} {{- with ($.Scratch.Get "Description") }} <meta name="description" content="{{ . }}"> - <meta property="og:description" content="{{ . }}"> - <meta name="twitter:description" content="{{ . | truncate 200 }}"> {{- end }} {{- with .Site.Author.name }} <meta name="author" content="{{ . }}"/> @@ -44,22 +40,6 @@ {{- with .Site.Params.favicon }} <link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/> {{- end -}} -<!-- Social Media Tags --> -{{- with .Params.share_img | default .Params.image | default .Site.Params.logo }} - <meta property="og:image" content="{{ . | absURL }}" /> - <meta name="twitter:image" content="{{ . | absURL }}" /> -{{- end }} - <meta name="twitter:card" content="summary" /> -{{- with .Site.Author.twitter }} - <meta name="twitter:site" content="@{{ . }}" /> - <meta name="twitter:creator" content="@{{ . }}" /> -{{- end }} -{{- with .Site.Params.fb_app_id }} - <meta property="fb:app_id" content="{{ . }}" /> -{{- end }} - <meta property="og:url" content="{{ .Permalink | absLangURL }}" /> - <meta property="og:type" content="website" /> - <meta property="og:site_name" content="{{ .Site.Title }}" /> <!-- Hugo Version number --> {{ hugo.Generator -}} <!-- Links and stylesheets --> diff --git a/layouts/partials/page_meta.html b/layouts/partials/page_meta.html new file mode 100644 index 0000000..ac9661b --- /dev/null +++ b/layouts/partials/page_meta.html @@ -0,0 +1,8 @@ +<div class="page-meta"> + {{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }} + {{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }} + {{ if ne $datestr $lastmodstr }} + {{ $lastmodstr | i18n "lastModified" }} + {{ end }} +</div> + diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index f7e03d7..a449767 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -11,10 +11,12 @@ {{ if .Site.Params.wordCount }} | <i class="fas fa-book"></i> {{ .WordCount }} {{ i18n "words" }} {{ end }} - {{ if .Params.author }} - | <i class="fas fa-user"></i> {{ .Params.author | safeHTML }} - {{ else }} - | <i class="fas fa-user"></i> {{ .Site.Author.name | safeHTML }} + {{ if not .Site.Params.hideAuthor }} + {{ if .Params.author }} + | <i class="fas fa-user"></i> {{ .Params.author | safeHTML }} + {{ else }} + | <i class="fas fa-user"></i> {{ .Site.Author.name | safeHTML }} + {{ end }} {{ end }} {{- if .Site.Params.staticman -}} | <i class="fas fa-comment"></i> diff --git a/layouts/partials/post_preview.html b/layouts/partials/post_preview.html new file mode 100644 index 0000000..0411585 --- /dev/null +++ b/layouts/partials/post_preview.html @@ -0,0 +1,39 @@ +<article class="post-preview"> + <a href="{{ .Permalink }}"> + <h2 class="post-title">{{ .Title }}</h2> + {{ if .Params.subtitle }} + <h3 class="post-subtitle"> + {{ .Params.subtitle }} + </h3> + {{ end }} + {{ if .Params.image }} + <img src="{{ .Params.image }}" alt="{{ .Title }}" class="img-title" /> + {{ end }} + {{ if .Params.video }} + <video loop autoplay muted playsinline class="img-title"> + <source src="{{ .Params.video }}"> + </video> + {{ end }} + </a> + + <p class="post-meta"> + {{ partial "post_meta.html" . }} + </p> + <div class="post-entry"> + {{ if .Truncated }} + {{ .Summary }} + <a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> + {{ else }} + {{ .Content }} + {{ end }} + </div> + + {{ if .Params.tags }} + <div class="blog-tags"> + {{ range .Params.tags }} + <a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a> + {{ end }} + </div> + {{ end }} + +</article>
\ No newline at end of file diff --git a/layouts/partials/share-links.html b/layouts/partials/share-links.html index d264d1c..78fe91b 100644 --- a/layouts/partials/share-links.html +++ b/layouts/partials/share-links.html @@ -9,13 +9,6 @@ </a> </li> - <!-- Google Plus --> - <li> - <a href="//plus.google.com/share?url={{ .Permalink }}" target="_blank" title="Share on Google Plus"> - <i class="fab fa-google-plus"></i> - </a> - </li> - <!-- Facebook --> <li> <a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook"> @@ -52,4 +45,4 @@ </li> </ul> </div> - {{ end }}
\ No newline at end of file + {{ end }} diff --git a/layouts/partials/staticman-comments.html b/layouts/partials/staticman-comments.html index 8d01894..a3db153 100644 --- a/layouts/partials/staticman-comments.html +++ b/layouts/partials/staticman-comments.html @@ -46,7 +46,7 @@ <fieldset> <div class="textfield"> - <textarea name="fields[comment]" type="text" placeholder="{{ i18n "useMarkdown" }}"></textarea> + <textarea name="fields[comment]" placeholder="{{ i18n "useMarkdown" }}"></textarea> </div> </fieldset> @@ -64,7 +64,7 @@ <fieldset> <div class="textfield"> - <input type="text" name="fields[website]" placeholder="{{ i18n "yourWebsite" }}"/> + <input type="url" name="fields[website]" placeholder="{{ i18n "yourWebsite" }}"/> </div> </fieldset> diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html index 3410075..a8ad297 100644 --- a/layouts/shortcodes/details.html +++ b/layouts/shortcodes/details.html @@ -1,3 +1,3 @@ -<details><summary>{{ .Get 0 }}</summary> -{{ .Inner }} +<details><summary>{{ .Get 0 | markdownify }}</summary> +{{ .Inner | markdownify }} </details> diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index edf542a..555f6bf 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -4,7 +4,7 @@ NB this overrides Hugo's built-in "figure" shortcode but is backwards compatible Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ --> <!-- count how many times we've called this shortcode; load the css if it's the first time --> -{{- if not ($.Page.Scratch.Get "figurecount") }}<link rel="stylesheet" href="/css/hugo-easy-gallery.css" />{{ end }} +{{- if not ($.Page.Scratch.Get "figurecount") }}<link rel="stylesheet" href="{{ "css/hugo-easy-gallery.css" | absURL}}" />{{ end }} {{- $.Page.Scratch.Add "figurecount" 1 -}} <!-- use either src or link-thumb for thumbnail image --> {{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }} diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index aac2ace..25448de 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -3,7 +3,7 @@ Put this file in /layouts/shortcodes/gallery.html Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ --> <!-- count how many times we've called this shortcode; load the css if it's the first time --> -{{- if not ($.Page.Scratch.Get "figurecount") }}<link rel="stylesheet" href="/css/hugo-easy-gallery.css" />{{ end }} +{{- if not ($.Page.Scratch.Get "figurecount") }}<link rel="stylesheet" href="{{ "css/hugo-easy-gallery.css" | absURL }}" />{{ end }} {{- $.Page.Scratch.Add "figurecount" 1 }} {{ $baseURL := .Site.BaseURL }} <div class="gallery caption-position-{{ with .Get "caption-position" | default "bottom" }}{{.}}{{end}} caption-effect-{{ with .Get "caption-effect" | default "slide" }}{{.}}{{end}} hover-effect-{{ with .Get "hover-effect" | default "zoom" }}{{.}}{{end}} {{ if ne (.Get "hover-transition") "none" }}hover-transition{{end}}" itemscope itemtype="http://schema.org/ImageGallery"> diff --git a/static/css/default-skin.png b/static/css/default-skin.png Binary files differnew file mode 100644 index 0000000..441c502 --- /dev/null +++ b/static/css/default-skin.png diff --git a/static/css/main.css b/static/css/main.css index 999ff11..779581f 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -82,6 +82,7 @@ div.panel-body a.list-group-item { font-weight: 800; border-radius: 0; border: none; + font-size: 16px; } div.panel-group .panel { border-radius: 0; @@ -194,10 +195,11 @@ img { .navbar-custom .avatar-container { opacity: 1; + visibility: visible; position: absolute; - -webkit-transition: opacity 0.5s ease-in-out; - -moz-transition: opacity 0.5s ease-in-out; - transition: opacity 0.5s ease-in-out; + -webkit-transition: visibility 0.5s, opacity 0.5s ease-in-out; + -moz-transition: visibility 0.5s, opacity 0.5s ease-in-out; + transition: visibility 0.5s, opacity 0.5s ease-in-out; left: 50%; width: 50px; margin-top: -25px; @@ -219,6 +221,7 @@ img { .navbar-custom.top-nav-short .avatar-container{ opacity: 0; + visibility: hidden; } .navbar-custom.top-nav-expanded .avatar-container { @@ -370,14 +373,19 @@ footer .theme-by { margin-bottom: 10px; } .post-preview .post-meta, -.post-heading .post-meta { +.post-heading .post-meta, +.page-meta { color: #808080; font-size: 18px; font-style: italic; margin: 0 0 10px; } +.page-meta { + align-self: center; +} .post-preview .post-meta a, -.post-heading .post-meta a { +.post-heading .post-meta a, +.page-meta a { color: #404040; text-decoration: none; } @@ -501,7 +509,8 @@ footer .theme-by { transition: opacity 1s linear; } .intro-header .page-heading, -.intro-header .tags-heading { +.intro-header .tags-heading, +.intro-header .categories-heading { text-align: center; } .intro-header.big-img .page-heading, @@ -511,7 +520,8 @@ footer .theme-by { text-shadow: 1px 1px 3px #000; } .intro-header .page-heading h1, -.intro-header .tags-heading h1 { +.intro-header .tags-heading h1, +.intro-header .categories-heading h1 { margin-top: 0; font-size: 50px; } @@ -566,7 +576,8 @@ footer .theme-by { padding: 150px 0; } .intro-header .page-heading h1, - .intro-header .tags-heading h1 { + .intro-header .tags-heading h1, + .intro-header .categories-heading h1 { font-size: 80px; } .intro-header .post-heading h1 { diff --git a/static/css/staticman.css b/static/css/staticman.css index 082c7f0..2c01efc 100644 --- a/static/css/staticman.css +++ b/static/css/staticman.css @@ -82,7 +82,7 @@ height: 10em; } -form--loading:before { +.form--loading:before { content: ''; } @@ -1,9 +1,9 @@ name = "Beautiful Hugo" license = "MIT" licenselink = "https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE" -description = "A port of Beautiful Jekyll theme" -tags = ["blog", "company", "portfolio", "projects", "minimal", "responsive", "seo"] -features = ["blog", "themes", "disqus", "minimal", "responsive", "staticman"] +description = "An adaptation of the Beautiful Jekyll theme" +tags = ["blog", "company", "portfolio", "projects", "minimal", "responsive", "seo", "google analytics", "bootstrap", "disqus", "light", "syntax highlighting", "multilingual", "portfolio", "projects", "mobile", "technical"] +features = ["blog", "company", "portfolio", "projects", "minimal", "responsive", "seo", "google analytics", "bootstrap", "disqus", "light", "syntax highlighting", "multilingual", "portfolio", "projects", "mobile", "technical"] min_version = 0.48 [author] |