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

merge upstream #1

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3c55b34
Update bootstrap to 5.3.0 (#466)
davidmn Jun 19, 2023
fb15b8e
nav partial: properly link multilingual translation to the permalink …
alexandra-zaharia Jun 19, 2023
c774ab5
i18n: remove duplicated Content in lmo (#461)
alexandear Jun 19, 2023
f0ff519
Fallback to first bigimg when JavaScript disabled (#456)
WJBarnes456 Jun 19, 2023
96a4269
Add Social Icons. (#412)
guilt Jun 19, 2023
415fa89
Add example configuration for social media footer links (#386)
heapcrash Jun 19, 2023
0cb1c1a
fix terms with special characters (#378)
magmax Jun 19, 2023
df91ed0
Add Medium to the list of socials (#365)
chrimaho Jun 19, 2023
7b7fe48
fix: photoswipe doesn't work for <figure> without <a> inside. (#402)
whatacold Jun 19, 2023
d9c68ae
Add check for a slice of authors (#351)
AdamBark Jun 19, 2023
6aab8c5
Adding Disclaimer (#390)
rterakedis Jun 19, 2023
1d98d70
fix: self-hosted bootstrap update (#467)
henryiii Jun 19, 2023
bbe3aa8
chore: update katex to 0.16.7 (#468)
henryiii Jun 19, 2023
fccd6ce
chore: update jquery to 3.7.0 (#469)
henryiii Jun 19, 2023
9e4a9af
fix: remove warning using katex (#470)
henryiii Jun 19, 2023
b3acbc3
Revert "fix: self-hosted bootstrap update (#467)"
henryiii Jun 19, 2023
a9fa626
Revert "Update bootstrap to 5.3.0 (#466)"
henryiii Jun 19, 2023
a17a048
chore: update bootstrap to 3.4.1 (#472)
henryiii Jun 19, 2023
c9856df
fix: wrong css included (#474)
KenHung Jun 24, 2023
7a0d193
ci: build on PRs (#479)
henryiii Oct 30, 2023
62618bd
Allow theme to be used as hugo module (#477)
deining Oct 31, 2023
08cfb44
Fix display of translation links (#482)
Rivierg Nov 10, 2023
6b650c3
fix: assign role and tabindex=0 to navlink-parent (#492)
jaller94 Feb 27, 2024
5bb2aa1
seo/article: Fix dateModified and add timezone (#496)
jaller94 May 7, 2024
2610147
Fixes Upstream Issue 349 - tag link has double forward slash (#354)
jvincentnz Jun 8, 2024
7108c2e
Add about social icon (#495)
xuhdev Jul 10, 2024
acc1dd2
Add Cusdis support (#489)
BarthPaleologue Jul 10, 2024
89594f9
Update nav.html (#493)
compermisos Jul 10, 2024
a48a6fa
Site.Author is deprecated, use Params.author instead (#481)
Rivierg Jul 10, 2024
484d57f
Require Hugo 0.120+, fix deprecation warnings (#502)
hydr0nium Jul 11, 2024
bd5ebaa
fix #403: Exclude the rss link in the post pages as it's empty. (#483)
whatacold Jul 11, 2024
17bf2ef
Remove the use of .Site.DisqusShortname (#511)
xuhdev Aug 14, 2024
acbc3ef
Fix deprecation warnings (#510)
deining Aug 14, 2024
b617b1f
Update README.md (#505)
fyordsvat Aug 14, 2024
6ce5243
Update theme.toml (#504)
fyordsvat Aug 14, 2024
276de53
fix: min_version is a string
henryiii Aug 14, 2024
fd74af4
Copy code button (#499)
mansoorbarri Sep 3, 2024
3fff655
Put Author in Params (#517)
davidmn Nov 13, 2024
60605bb
Add Bluesky as a Social (#518)
davidmn Nov 14, 2024
70e3a88
Add Last.fm social icon (#515)
alexcannan Nov 14, 2024
7b8953f
Fix bluesky (#520)
davidmn Nov 17, 2024
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

# Ignore minimized files when diffing/grepping
*.min.js -diff
*.min.css -diff
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Based on the sample workflow for building and deploying a Hugo site to GitHub Pages
name: Build Hugo site

on:
# Build on all PRs
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow one concurrent build per PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.130.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: >
hugo
--minify
--baseURL "${{ steps.pages.outputs.base_url }}/"
-s "./exampleSite/"
--themesDir "../../"
--logLevel info
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./exampleSite/public

10 changes: 5 additions & 5 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.104.2
HUGO_VERSION: 0.130.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
Expand All @@ -51,7 +51,7 @@ jobs:
-s "./exampleSite/" \
--themesDir "../../"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./exampleSite/public

Expand All @@ -69,4 +69,4 @@ jobs:
success()
&& github.ref == 'refs/heads/master'
&& github.repository == 'halogenica/beautifulhugo'
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk

# Hugo's lock
.hugo_build.lock
exampleSite/public/
90 changes: 79 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,33 @@ See https://hugo-theme-beautifulhugo.netlify.app/

Install Hugo and create a new site. See [the Hugo documentation](https://gohugo.io/getting-started/quick-start/) for details.

Add Beautifulhugo:
### Git Submodule

Add Beautifulhugo as git submodule:

$ git submodule add https://github.com/halogenica/beautifulhugo.git themes/beautifulhugo

### Hugo module

Initialize your site as hugo module:

$ hugo mod init github.com/USERNAME/SITENAME

Add Beautifulhugo module as a dependency of your site:

$ hugo mod get github.com/halogenica/beautifulhugo

### Site preview

Copy the content of `exampleSite` at the root of your project:

cp -r themes/beautifulhugo/exampleSite/* . -iv


If you installed Beautifulhugo as hugo module, set your theme in your config file (hugo.toml):

[[module.imports]]
path = "github.com/halogenica/beautifulhugo"

Start Hugo:

hugo serve
Expand Down Expand Up @@ -56,7 +75,7 @@ pygmentsStyle = "trac"
pygmentsUseClassic = true
```

Pygments is mostly compatable with the newer Chroma. It is slower but has some additional theme options. I recommend Chroma over Pygments. Pygments will use `syntax.css` for highlighting, unless you also set the config `pygmentsUseClasses = false` which will generate the style code directly in the HTML file.
Pygments is mostly compatible with the newer Chroma. It is slower but has some additional theme options. I recommend Chroma over Pygments. Pygments will use `syntax.css` for highlighting, unless you also set the config `pygmentsUseClasses = false` which will generate the style code directly in the HTML file.

#### Highlight.js - Client side syntax highlighting
```
Expand All @@ -68,13 +87,21 @@ Client side highlighting does not require pygments to be installed. This will us

### Disqus support

To use this feature, uncomment and fill out the `disqusShortname` parameter in `config.toml`.
To use this feature add your disqus shortname to the hugo.toml file like this:

```toml
[services]
[services.disqus]
shortname = ''
```

For further reference see [hugo config](https://gohugo.io/methods/site/config/)

### Staticman support

Add *Staticman* configuration section in `config.toml` or `config.yaml`
Add *Staticman* configuration section in `hugo.toml` or `hugo.yaml`

Sample `config.toml` configuration
Sample `hugo.toml` configuration

```
[Params.staticman]
Expand Down Expand Up @@ -115,17 +142,34 @@ 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`
If you *don't* have the section `[Params.staticman]` in `hugo.toml`, you *won't* need the section `reCaptcha` in `staticman.yml`

### Site Disclaimer

If you need to put a Disclaimer on your website (e.g. "My views are my own and not my employer's"), you can do so via the following:

* Uncomment and edit the `disclaimerText` parameter in `hugo.toml`.
* If you need to adjust the disclaimer's styling, modify the declarations within the `footer div.disclaimer` selector in `static/css/main.css`.

> The code for the disclaimer text is in `layouts/partials/footer.html`. Moving this code block to another partial file (or relocating it within `footer.html`) will require changes to the css selector in `main.css` as well.

### Google Analytics

To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
Sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID.

To use this feature add your Google Analytics ID to the hugo.toml file like this:

```
[services]
[services.googleAnalytics]
id = ''
```

Note that the Google Analytics tracking code will only be inserted into the page when the site isn't served on Hugo's built-in server, to prevent tracking from local testing environments.

### 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 site parameters `commit` has to be defined in the config file `config.toml`:
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 `hugo.toml`:

```
enableGitInfo = true
Expand All @@ -138,7 +182,7 @@ See at [vincenttam/vincenttam.gitlab.io](https://gitlab.com/vincenttam/vincentta
### 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
you want to use inside the `languages` parameter on `hugo.toml` file, also
redefining the content dir for each one. Check the `i18n/` folder to see all
languages available.

Expand Down Expand Up @@ -166,7 +210,7 @@ content/ content/ content/

With default settings, visiting to a website using Beautifulhugo connects also to remote services like google fonts or jsdelivr to embed fonts, js and other assets.

To avoid this, set the following param in config.toml:
To avoid this, set the following param in hugo.toml:

```
[Params]
Expand Down Expand Up @@ -199,6 +243,30 @@ This is column 2.
{{< endcolumns >}}
```

### Social Media Icons

In order to show social media icons in the footer, add a section like this to your `hugo.yaml` or `hugo.toml`. You can see the full list of supported social media sites in `data/beautifulhugo/social.toml`.

```yaml
author:
name: "Author Name"
website: "https://example.com"
github: halogenica/beautifulhugo
twitter: username
discord: 96VAXXvjCB
...
```

```toml
[Params.author]
name = "Author Name"
website = "https://example.com"
github = "halogenica/beautifulhugo"
twitter = "username"
discord = "96VAXXvjCB"
...
```

## About

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.
Expand Down
56 changes: 55 additions & 1 deletion data/beautifulhugo/social.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ icon = "fab fa-bitbucket"
id = "twitter"
url = "https://twitter.com/%s"
title = "Twitter"
icon = "fab fa-twitter"
icon = "fab fa-x-twitter"

[[social_icons]]
id = "slack"
Expand Down Expand Up @@ -161,6 +161,12 @@ url = "https://weibo.com/%s"
title = "Weibo"
icon = "fab fa-weibo"

[[social_icons]]
id = "medium"
url = "https://medium.com/@%s"
title = "Medium"
icon = "fab fa-medium"

[[social_icons]]
id = "discord"
url = "https://discord.gg/%s"
Expand All @@ -172,3 +178,51 @@ id = "strava"
url = "https://www.strava.com/athletes/%s"
title = "Strava"
icon = "fab fa-strava"

[[social_icons]]
id = "steam"
url = "https://steamcommunity.com/id/%s"
title = "Steam"
icon = "fab fa-steam"

[[social_icons]]
id = "quora"
url = "https://www.quora.com/profile/%s"
title = "Quora"
icon = "fab fa-quora"

[[social_icons]]
id = "amazonwishlist"
url = "https://amzn.com/w/%s"
title = "Amazon Wishlist"
icon = "fab fa-amazon"

[[social_icons]]
id = "slideshare"
url = "https://www.slideshare.net/%s"
title = "Slideshare"
icon = "fab fa-slideshare"

[[social_icons]]
id = "angellist"
url = "https://www.angel.co/p/%s"
title = "AngelList"
icon = "fab fa-angellist"

[[social_icons]]
id = "about"
url = "%s"
title = "About"
icon = "fas fa-at"

[[social_icons]]
id = "lastfm"
url = "https://www.last.fm/user/%s"
title = "Last.fm"
icon = "fab fa-lastfm"

[[social_icons]]
id = "bluesky"
url = "https://bsky.app/profile/%s"
title = "Bluesky"
icon = "fab fa-bluesky"
2 changes: 1 addition & 1 deletion exampleSite/content/page/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ What else do you need?

### my history

To be honest, I'm having some trouble remembering right now, so why don't you just watch [my movie](http://en.wikipedia.org/wiki/The_Princess_Bride_%28film%29) and it will answer **all** your questions.
To be honest, I'm having some trouble remembering right now, so why don't you just watch [my movie](https://en.wikipedia.org/wiki/The_Princess_Bride_%28film%29) and it will answer **all** your questions.
4 changes: 2 additions & 2 deletions exampleSite/content/post/2015-02-20-test-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: 2015-02-20
tags: ["example", "markdown"]
---

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.
You can write regular [markdown](https://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](https://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc.

**Here is some bold text**

Expand All @@ -23,7 +23,7 @@ Here's a useless table:

How about a yummy crepe?

![Crepe](http://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg)
![Crepe](https://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg)

Here's a code chunk with syntax highlighting:

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/post/2017-03-05-math-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $$
\phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots
$$

Additional details can be found on [GitHub](https://github.com/Khan/KaTeX) or on the [Wiki](http://tiddlywiki.com/plugins/tiddlywiki/katex/).
Additional details can be found on [GitHub](https://github.com/KaTeX/KaTeX) or on the [project homepage](https://katex.org/).
<!--more-->

### Example 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: 2017-03-20
tags: ["example", "photoswipe"]
---

Beautiful Hugo adds a few custom shortcodes created by [Li-Wen Yip](https://www.liwen.id.au/heg/) and [Gert-Jan van den Berg](https://github.com/GjjvdBurg/HugoPhotoSwipe) for making galleries with [PhotoSwipe](http://photoswipe.com) .
Beautiful Hugo adds a few custom shortcodes created by [Li-Wen Yip](https://www.liwen.id.au/heg/) and [Gert-Jan van den Berg](https://github.com/GjjvdBurg/HugoPhotoSwipe) for making galleries with [PhotoSwipe](https://photoswipe.com) .

{{< gallery caption-effect="fade" >}}
{{< figure thumb="-thumb" link="/img/hexagon.jpg" >}}
Expand Down
Loading