From e8de7726c53c27095526be30dcbe2aef65676803 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 27 Nov 2020 21:58:24 +0200 Subject: [PATCH 01/19] fix(#744): Escape special characters in title (#745) --- CHANGELOG.md | 1 + _includes/head.html | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eb2427..26d013f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain - Fixed issue where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio - Added support for Patreon in the social network links in the footer +- Fixed bug where special characters in the title led to broken share tags (#744) ## v5.0.0 (2020-09-15) diff --git a/_includes/head.html b/_includes/head.html index 9d43c46..730e967 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -4,19 +4,19 @@ {% capture title %} {%- if page.share-title -%} - {{ page.share-title }} + {{ page.share-title | strip_html | xml_escape }} {%- elsif page.title -%} - {{ page.title }} + {{ page.title | strip_html | xml_escape }} {%- else -%} - {{ site.title }} + {{ site.title | strip_html | xml_escape }} {%- endif -%} {% endcapture %} {% capture description %} {%- if page.share-description -%} - {{ page.share-description }} + {{ page.share-description | strip_html | xml_escape }} {%- elsif page.subtitle -%} - {{ page.subtitle }} + {{ page.subtitle | strip_html | xml_escape }} {%- else -%} {%- assign excerpt_length = site.excerpt_length | default: 50 -%} {{ page.content | strip_html | xml_escape | truncatewords: excerpt_length | strip }} -- 2.45.2 From 00d377c850653b3451a41d3682767cd8adf86590 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sat, 5 Dec 2020 18:48:28 -0500 Subject: [PATCH 02/19] add matt artist as sponsor --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ceaa70..d55e7dd 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,9 @@ Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the lates

Sponsors 🏆

-> There are no sponsors yet +- [Matt Artist](https://mja00.dev/) -[Become the first sponsor for Beautiful Jekyll and unlock special rewards\!](https://github.com/sponsors/daattali/sponsorships?tier_id=39856) +[Become a sponsor for Beautiful Jekyll and unlock special rewards\!](https://github.com/sponsors/daattali/sponsorships?tier_id=39856) # Build your website in 3 steps -- 2.45.2 From e2feb189dade956bc354a3c9250284551ff9d6f0 Mon Sep 17 00:00:00 2001 From: Amy Troschinetz Date: Mon, 7 Dec 2020 23:38:52 -0800 Subject: [PATCH 03/19] Fix margin top alignment issue on Safari (#750) --- CHANGELOG.md | 1 + assets/css/beautifuljekyll.css | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d013f..60fe0e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased version +- Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari. - Changed the width at which the navbar collapses to a higher threshold because most modern non-mobile browsers are >1000px - Fixed bug where navbar secondary level dropdown items didn't inherit te same colour as the primary navbar links - Fixed bug where the navbar "burger" collapsed button didn't always revert back to a light colour diff --git a/assets/css/beautifuljekyll.css b/assets/css/beautifuljekyll.css index 6a16b8c..f53097e 100644 --- a/assets/css/beautifuljekyll.css +++ b/assets/css/beautifuljekyll.css @@ -311,7 +311,7 @@ img { position: absolute; left: 50%; width: 3.125rem; - margin-top: 3.1rem; + bottom: -1.5rem; transition: opacity 0.5s ease-in-out; -webkit-transition: opacity 0.5s ease-in-out; -moz-transition: opacity 0.5s ease-in-out; @@ -349,6 +349,7 @@ img { @media (min-width: 1200px) { .navbar-custom.top-nav-regular .avatar-container { width: 6.25rem; + bottom: -1.9375rem; } .navbar-custom.top-nav-regular .avatar-container .avatar-img-border { -- 2.45.2 From f8b93db7265a7a17ce36ad8ff476093992e58711 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Wed, 9 Dec 2020 17:26:39 -0500 Subject: [PATCH 04/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d55e7dd..9c12aad 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ Visit the [official FAQ page](https://beautifuljekyll.com/faq) for answers to co Beautiful Jekyll is used by 50,000+ people with wildly varying degrees of web skills, so it's impossible to answer all the questions that may arise. For any question that's not specifically related to Beautiful Jekyll and is more about Jekyll or web development in general, the answer can often be found on Google, in the [Jekyll documentation](https://jekyllrb.com/), or on the [Jekyll support forum](https://talk.jekyllrb.com/). -To receive support, select one of the [different plans](https://beautifuljekyll.com/plans) Beautiful Jekyll offers. +To receive support, select one of the [different plans](https://beautifuljekyll.com/plans) Beautiful Jekyll offers. You can also use the [Discussions](https://github.com/daattali/beautiful-jekyll/discussions) area to try to get help from the community. # Contributions -- 2.45.2 From 610af684efcfda25fad058da6818a37cfa882dc3 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Thu, 10 Dec 2020 18:54:42 -0500 Subject: [PATCH 05/19] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9c12aad..e4110ad 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the lates

Sponsors 🏆

- [Matt Artist](https://mja00.dev/) +- [\_hyp3ri0n](https://hyperiongray.com) [Become a sponsor for Beautiful Jekyll and unlock special rewards\!](https://github.com/sponsors/daattali/sponsorships?tier_id=39856) -- 2.45.2 From f731a90a096cff386a19fd8f0087ac23adde540e Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sun, 17 Jan 2021 20:33:33 -0500 Subject: [PATCH 06/19] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e4110ad..5589161 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the lates

Sponsors 🏆

+Developing and maintaining Beautiful Jekyll takes a lot of time and effort - thank you to anyone who helps fund this effort! + - [Matt Artist](https://mja00.dev/) - [\_hyp3ri0n](https://hyperiongray.com) -- 2.45.2 From fe0a48eea01d0351c8bff7473b5d58482da47da9 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sun, 17 Jan 2021 22:19:17 -0500 Subject: [PATCH 07/19] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5589161..8c79583 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Developing and maintaining Beautiful Jekyll takes a lot of time and effort - tha # Build your website in 3 steps -There's a very easy way to use this theme, and there's a hard way. For most people (including myself!), I suggest going the easy route. If you're an advanced user and want to tinker with the hard way (using ruby gems), then [skip the easy way](https://github.com/daattali/beautiful-jekyll#the-hard-way-using-ruby-gems) if you know what you're doing. +There's a very easy way to use this theme, and there's a hard way. For most people (including myself!), the easy route is recommended. If you're an advanced user and want to tinker with the hard way (using ruby gems), then [skip the easy way](https://github.com/daattali/beautiful-jekyll#the-hard-way-using-ruby-gems) if you know what you're doing. ## The easy way (recommended!) @@ -72,9 +72,9 @@ Click on __*Settings*__ at the top (the cog icon) and on that page you'll have a ### 3. Customize your website settings -Edit the `_config.yml` file to change any settings you want. To edit the file, click on it to view the file and then click on the pencil icon to edit it (watch the video tutorial above if you're confused). The settings in the file are self-explanatory and I added comments inside the file to help you understand what each setting does. Any line that begins with a hashtag (`#`) is a comment, and the other lines are actual settings. +Edit the `_config.yml` file to change any settings you want. To edit the file, click on it to view the file and then click on the pencil icon to edit it (watch the video tutorial above if you're confused). The settings in the file are self-explanatory and there are comments inside the file to help you understand what each setting does. Any line that begins with a hashtag (`#`) is a comment, and the other lines are actual settings. -Note that in the video above I only edited one setting in the `_config.yml` file. **You should actually go through the rest of the settings as well. Don't be lazy, go through all the settings!** +Note that in the video above only one setting in the `_config.yml` file is edited. **You should actually go through the rest of the settings as well. Don't be lazy, go through all the settings!** ### 4. Congratulations! You have a website! @@ -88,11 +88,11 @@ If you followed the easy method above, then you already have your site and you c # Plans -Beautiful Jekyll is, and always will be, free. But if you want to remove the Beautiful Jekyll ad from your website, use a Dark Mode skin, unlock other special rewards, or simply support my development efforts, [check out the different plans](https://beautifuljekyll.com/plans). +Beautiful Jekyll is, and always will be, free. But if you want to remove the Beautiful Jekyll ad from your website, use a Dark Mode skin, unlock other special rewards, or simply support the development efforts, [check out the different plans](https://beautifuljekyll.com/plans). # Add your own content -To add pages to your site, you can either write a markdown file (`.md`) or you can write an HTML file. It's much easier to write markdown than HTML, so I suggest you do that ([here's a great tutorial](https://markdowntutorial.com/) if you need to learn markdown in 5 minutes). +To add pages to your site, you can either write a markdown file (`.md`) or you can write an HTML file. It's much easier to write markdown than HTML, so that's the recommended approach ([here's a great tutorial](https://markdowntutorial.com/) if you need to learn markdown in 5 minutes). To see an example of a markdown file, click on any file that ends in `.md`, for example [`aboutme.md`](./aboutme.md). On that page you can see some nicely formatted text (there's a word in bold, a link, a few bullet points), and if you click on the pencil icon to edit the file, you'll see the markdown code that generated the pretty text. Very easy! -- 2.45.2 From 17656775873962b51ff59d6815460ab518f19674 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 4 Feb 2021 17:28:36 +0100 Subject: [PATCH 08/19] Remove references to any public Staticman API instance (#775) --- _config.yml | 20 ++++++++++---------- assets/js/staticman.js | 2 +- staticman.yml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/_config.yml b/_config.yml index 9644d21..0bcd2a3 100644 --- a/_config.yml +++ b/_config.yml @@ -161,19 +161,19 @@ footer-link-col: "#404040" # theme: github-light # Utterances theme # label: blog-comments # Label that will be assigned to GitHub Issues created by Utterances -# To use Staticman comments, first invite `staticmanlab` as a collaborator to your repository and -# accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. -# Then uncomment the following section and fill in "repository" and "branch". -# If you want to use reCaptcha for staticman (optional for spam protection), then fill -# in the "siteKey" and "secret" parameters below and also in `staticman.yml`. -# See more details at https://staticman.net/ +# To use Staticman comments, uncomment the following section. You may leave the reCaptcha +# section commented if you aren't using reCaptcha for spam protection. +# Using Staticman requires advanced knowledge, please consult +# https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further +# instructions. For any support with staticman please direct questions to staticman and +# not to BeautifulJekyll. #staticman: # repository : # GitHub username/repository eg. "daattali/beautiful-jekyll" # branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` -# endpoint : # (optional) URL of your own deployment, with a trailing slash eg. https:///v3/entry/github/ (will fallback to a public GitLab instance) -# reCaptcha: -# siteKey : # Use your own site key, you need to apply for one on Google -# secret : # ENCRYPT your password by going to https://staticman3.herokuapp.com/v3/encrypt/ +# endpoint : # URL of your deployment, with a trailing slash eg. "https:///v3/entry/github/" +# reCaptcha: # (optional, set these parameters in `staticman.yml` as well) +# siteKey : # You need to apply for a site key on Google +# secret : # Encrypt your password by going to https:///v3/encrypt/ # --- Misc --- # diff --git a/assets/js/staticman.js b/assets/js/staticman.js index 09422a6..e8bdfbe 100644 --- a/assets/js/staticman.js +++ b/assets/js/staticman.js @@ -11,7 +11,7 @@ layout: null $(form).addClass('disabled'); {% assign sm = site.staticman -%} - var endpoint = '{{ sm.endpoint | default: "https://staticman3.herokuapp.com/v3/entry/github/" }}'; + var endpoint = '{{ sm.endpoint }}'; var repository = '{{ sm.repository }}'; var branch = '{{ sm.branch }}'; diff --git a/staticman.yml b/staticman.yml index 8fe1bad..45e939b 100644 --- a/staticman.yml +++ b/staticman.yml @@ -5,7 +5,7 @@ # To encrypt strings use the following endpoint: # https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED} # {STATICMAN API INSTANCE} should match the `endpoint` in the theme config -# file. It defaults to "staticman3.herokuapp.com". +# file. comments: # (*) REQUIRED -- 2.45.2 From a0cf83da4a1c6feefd153a0932a165ae0b14e36d Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Thu, 4 Feb 2021 11:30:56 -0500 Subject: [PATCH 09/19] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60fe0e5..374c031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,13 @@ - Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari. - Changed the width at which the navbar collapses to a higher threshold because most modern non-mobile browsers are >1000px -- Fixed bug where navbar secondary level dropdown items didn't inherit te same colour as the primary navbar links +- Fixed bug where navbar secondary level dropdown items didn't inherit the same colour as the primary navbar links - Fixed bug where the navbar "burger" collapsed button didn't always revert back to a light colour - Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain - Fixed issue where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio - Added support for Patreon in the social network links in the footer - Fixed bug where special characters in the title led to broken share tags (#744) +- Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) ## v5.0.0 (2020-09-15) -- 2.45.2 From 76cd649799b3612f52228a7a10e091b377aae3cf Mon Sep 17 00:00:00 2001 From: Diksha Verma <112dikshaverma@gmail.com> Date: Wed, 24 Feb 2021 22:09:39 +0530 Subject: [PATCH 10/19] Adding option for Medium Social Link at footer (#784) --- CHANGELOG.md | 2 +- _config.yml | 1 + _includes/social-networks-links.html | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 374c031..a6b3aad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Fixed bug where the navbar "burger" collapsed button didn't always revert back to a light colour - Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain - Fixed issue where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio -- Added support for Patreon in the social network links in the footer +- Added support for Patreon and Medium in the social network links in the footer (#783) - Fixed bug where special characters in the title led to broken share tags (#744) - Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) diff --git a/_config.yml b/_config.yml index 0bcd2a3..4977a08 100644 --- a/_config.yml +++ b/_config.yml @@ -45,6 +45,7 @@ social-network-links: twitter: daattali patreon: DeanAttali youtube: c/daattali +# medium: yourname # reddit: yourname # linkedin: daattali # xing: yourname diff --git a/_includes/social-networks-links.html b/_includes/social-networks-links.html index 7825aba..e2f5768 100644 --- a/_includes/social-networks-links.html +++ b/_includes/social-networks-links.html @@ -275,5 +275,17 @@ {%- endif -%} + + {%- if site.social-network-links.medium -%} +
  • + + + Medium + +
  • +{%- endif -%} -- 2.45.2 From 7248ed991199e7f9419169cb3c74bd6cdc240733 Mon Sep 17 00:00:00 2001 From: Emaleth Date: Thu, 11 Mar 2021 23:33:59 +0100 Subject: [PATCH 11/19] Itch.io social link (#788) --- CHANGELOG.md | 1 + _includes/social-networks-links.html | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6b3aad..fa0542d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Added support for Patreon and Medium in the social network links in the footer (#783) - Fixed bug where special characters in the title led to broken share tags (#744) - Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) +- Added support for Itch.io in the social network links in the footer (#788) ## v5.0.0 (2020-09-15) diff --git a/_includes/social-networks-links.html b/_includes/social-networks-links.html index e2f5768..3f799eb 100644 --- a/_includes/social-networks-links.html +++ b/_includes/social-networks-links.html @@ -276,7 +276,7 @@ {%- endif -%} - {%- if site.social-network-links.medium -%} +{%- if site.social-network-links.medium -%}
  • {%- endif -%} +{%- if site.social-network-links.itchio -%} +
  • + + + Itchio + +
  • +{%- endif -%} + -- 2.45.2 From d1806ad223be02a6b9edef2d76dfdccd783acc6d Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Thu, 11 Mar 2021 17:34:41 -0500 Subject: [PATCH 12/19] Update CHANGELOG.md --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa0542d..8645051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,9 @@ - Fixed bug where the navbar "burger" collapsed button didn't always revert back to a light colour - Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain - Fixed issue where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio -- Added support for Patreon and Medium in the social network links in the footer (#783) +- Added support for Patreon, Medium, and Itch.io in the social network links in the footer (#783, #788) - Fixed bug where special characters in the title led to broken share tags (#744) - Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) -- Added support for Itch.io in the social network links in the footer (#788) ## v5.0.0 (2020-09-15) -- 2.45.2 From a531737107167728c5fc8e25a4aadbd65d47533c Mon Sep 17 00:00:00 2001 From: Ari Kalfus Date: Tue, 20 Apr 2021 00:52:34 -0400 Subject: [PATCH 13/19] Add support for Cloudflare analytics (#798) --- CHANGELOG.md | 1 + _config.yml | 3 +++ _includes/cloudflare_analytics.html | 8 ++++++++ _includes/head.html | 1 + 4 files changed, 13 insertions(+) create mode 100644 _includes/cloudflare_analytics.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 8645051..efa7296 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Added support for Patreon, Medium, and Itch.io in the social network links in the footer (#783, #788) - Fixed bug where special characters in the title led to broken share tags (#744) - Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) +- Added support for Cloudflare Analytics (#797) ## v5.0.0 (2020-09-15) diff --git a/_config.yml b/_config.yml index 4977a08..8bc1f89 100644 --- a/_config.yml +++ b/_config.yml @@ -133,6 +133,9 @@ footer-link-col: "#404040" # Fill in your Google Analytics ID to track your website using Google Analytics #google_analytics: "" +# Fill in your Cloudflare Analytics beacon token to track your website using Cloudflare Analytics +#cloudflare_analytics: "" + # Google Tag Manager ID #gtm: "" diff --git a/_includes/cloudflare_analytics.html b/_includes/cloudflare_analytics.html new file mode 100644 index 0000000..bd63f8b --- /dev/null +++ b/_includes/cloudflare_analytics.html @@ -0,0 +1,8 @@ +{% if site.cloudflare_analytics %} + + + +{% endif %} diff --git a/_includes/head.html b/_includes/head.html index 730e967..cf93eda 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -44,6 +44,7 @@ {% include gtag.html %} {% include gtm_head.html %} {% include google_analytics.html %} + {% include cloudflare_analytics.html %} {% if layout.common-ext-css %} {% for css in layout.common-ext-css %} -- 2.45.2 From 99fdbbd59354193e51525910eee09c855512e176 Mon Sep 17 00:00:00 2001 From: Leedan Date: Mon, 17 May 2021 15:00:46 +0800 Subject: [PATCH 14/19] Include Reddit in share options of posts (#815) --- CHANGELOG.md | 1 + _includes/social-share.html | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index efa7296..33579fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed bug where special characters in the title led to broken share tags (#744) - Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) - Added support for Cloudflare Analytics (#797) +- Added Reddit in share options of posts (#815) ## v5.0.0 (2020-09-15) diff --git a/_includes/social-share.html b/_includes/social-share.html index 2091c88..c04f445 100644 --- a/_includes/social-share.html +++ b/_includes/social-share.html @@ -42,6 +42,14 @@ {% endif %} + {% if site.share-links-active.reddit %} + + + Reddit + + {% endif %} + {% endif %} -- 2.45.2 From 950c341739a876b0f73de23e59839b42e8869b69 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sun, 30 May 2021 19:54:17 +0000 Subject: [PATCH 15/19] add search to the navbar using 'post_search' config param --- CHANGELOG.md | 1 + README.md | 5 +- _config.yml | 3 ++ _includes/nav.html | 10 ++++ _includes/search.html | 39 ++++++++++++++ assets/css/beautifuljekyll.css | 95 ++++++++++++++++++++++++++++++++++ assets/js/beautifuljekyll.js | 21 ++++++++ 7 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 _includes/search.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 33579fe..d87419b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased version +- Added search to the navbar (can be turned off in the config file) (#770) - Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari. - Changed the width at which the navbar collapses to a higher threshold because most modern non-mobile browsers are >1000px - Fixed bug where navbar secondary level dropdown items didn't inherit the same colour as the primary navbar links diff --git a/README.md b/README.md index 8c79583..28f05b4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ # Features -Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the latest features. +__Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the latest features.__ - **SIMPLE**: The primary goal of Beautiful Jekyll is to allow literally *anyone* to create a website in a few minutes. - **Modern**: Uses the latest best practices and technologies to achieve nearly perfect scores on Google Chrome's Audit. @@ -36,8 +36,9 @@ Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the lates - **Battle-tested**: By using Beautiful Jekyll, you'll be joining 50,000+ users enjoying this theme since 2015. - **SEO and social media support**: Customize how your site looks on Google and when shared on social media. - **Comments support**: Add comments to any page using either [Disqus](https://disqus.com/), [Facebook comments](https://developers.facebook.com/docs/plugins/comments), [Utterances](https://utteranc.es/), or [Staticman](https://staticman.net). -- **Tags**: Any blog post can be tagged with keywords, and an index page showing all the tags is automatically generated. +- **Tags**: Any blog post can be tagged with keywords, and an index page is automatically generated. - **Analytics**: Easily integrate Google Analytics, or other analytics platforms, to track visits to your website. +- **Search**: Let users easily find any page using a Search button in the navigation bar. - **Photos support**: Any page can have a full-width cover photo and thumbnail. - **RSS**: An RSS feed is automatically created, so you can even host a podcast easily with Beautiful Jekyll. diff --git a/_config.yml b/_config.yml index 8bc1f89..bf1783d 100644 --- a/_config.yml +++ b/_config.yml @@ -89,6 +89,9 @@ feed_show_excerpt: true # Whether or not to show a list of tags below each post preview in the feed page feed_show_tags: true +# Add a search button to the navbar +post_search: true + # The keywords to associate with your website, for SEO purposes #keywords: "my,list,of,keywords" diff --git a/_includes/nav.html b/_includes/nav.html index ae8294e..a1adfbc 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -30,6 +30,14 @@ {%- endif -%} {%- endfor -%} + {% if site.post_search %} + + {%- endif -%} @@ -50,3 +58,5 @@ {% endif %} + +{% include search.html %} diff --git a/_includes/search.html b/_includes/search.html new file mode 100644 index 0000000..7924fd0 --- /dev/null +++ b/_includes/search.html @@ -0,0 +1,39 @@ +{% if site.post_search %} + +
    + + + +
      + + + +
      + +{% endif %} diff --git a/assets/css/beautifuljekyll.css b/assets/css/beautifuljekyll.css index f53097e..719dab3 100644 --- a/assets/css/beautifuljekyll.css +++ b/assets/css/beautifuljekyll.css @@ -993,3 +993,98 @@ pre { display: block; margin: 0 auto; } + +/* Search bar */ +#beautifuljekyll-search-overlay { + display: none; + z-index: 999999; + position: fixed; + background: rgba(0,0,0,0.9); + left: 0; + right: 0; + top: 0; + bottom: 0; + text-align: center; + padding: 1rem; +} +#nav-search-exit { + position: absolute; + top: 1.5rem; + cursor: pointer; + right: 25%; + margin-right: 2rem; + color: #555; + font-size: 2rem; + line-height: 2rem; + font-weight: bold; +} +#nav-search-exit:hover { + color: #000; +} +#nav-search-input { + text-align: center; + background: #e7edee; + margin: auto; + display: block; + font-size: 2rem; + width: 50%; + transition: width 300ms ease; + color: #222; + border-radius: 5rem; + outline: none; + border: none; + padding: 0 3rem; +} +@media (max-width: 1199px) { + #nav-search-input { + width: 75%; + } + #nav-search-exit { + right: 12.5%; + } +} +@media (max-width: 767px) { + #nav-search-input { + width: 100%; + } + #nav-search-exit { + right: 0; + } +} +#nav-search-input:focus { + background: #f3f8fe; + box-shadow: 0px 0.15rem 1rem #e7f4ff; + outline: none; +} + +#nav-search-input::placeholder { + color: #777; +} + +#search-results-container { + list-style: none; + padding-left: unset; + margin-top: 1.5rem; + color: #fff; + font-size: 1.5rem; +} +#search-results-container a, +#search-results-container a:hover { + color: #fff; +} + +#nav-search-icon { + display: inline-block; +} +#nav-search-text { + display: none; +} + +@media (max-width: 1199px) { + #nav-search-icon { + display: none; + } + #nav-search-text { + display: inline-block; + } +} diff --git a/assets/js/beautifuljekyll.js b/assets/js/beautifuljekyll.js index bcddc67..48a3ada 100644 --- a/assets/js/beautifuljekyll.js +++ b/assets/js/beautifuljekyll.js @@ -27,6 +27,8 @@ var BeautifulJekyllJS = { // show the big header image BeautifulJekyllJS.initImgs(); + + BeautifulJekyllJS.initSearch(); }, initNavbar : function() { @@ -108,6 +110,25 @@ var BeautifulJekyllJS = { } else { $(".img-desc").hide(); } + }, + + initSearch : function() { + if (!document.getElementById("beautifuljekyll-search-overlay")) { + return; + } + + $("#nav-search-link").click(function(e) { + e.preventDefault(); + $("#beautifuljekyll-search-overlay").show(); + $("#nav-search-input").focus().select(); + }); + $("#nav-search-exit").click(function(e) { + e.preventDefault(); + $("#beautifuljekyll-search-overlay").hide(); + }); + $(document).on('keyup', function(e) { + if (e.key == "Escape") $("#beautifuljekyll-search-overlay").hide(); + }); } }; -- 2.45.2 From 711dd39059698f422ebf1a3cdb00b161f0871b9a Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sun, 30 May 2021 16:01:56 -0400 Subject: [PATCH 16/19] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d87419b..4aae898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Unreleased version -- Added search to the navbar (can be turned off in the config file) (#770) +- Added `post_search` config setting that creates a Search button in the navbar (older websites need to set `post_search: true` to enable this feature) (#770) - Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari. - Changed the width at which the navbar collapses to a higher threshold because most modern non-mobile browsers are >1000px - Fixed bug where navbar secondary level dropdown items didn't inherit the same colour as the primary navbar links -- 2.45.2 From fd1e03ae06c7d03f5bdd49eb688007b9e55ba273 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sun, 30 May 2021 16:06:02 -0400 Subject: [PATCH 17/19] ui: make sure search results dont have underline until hovered --- assets/css/beautifuljekyll.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/css/beautifuljekyll.css b/assets/css/beautifuljekyll.css index 719dab3..5bcc5da 100644 --- a/assets/css/beautifuljekyll.css +++ b/assets/css/beautifuljekyll.css @@ -1068,9 +1068,13 @@ pre { color: #fff; font-size: 1.5rem; } -#search-results-container a, +#search-results-container a { + color: #fff; + text-decoration: none; +} #search-results-container a:hover { color: #fff; + text-decoration: underline; } #nav-search-icon { -- 2.45.2 From 30a757de4741301dfefb2b20630eb5dece98b97a Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Sun, 30 May 2021 20:19:44 +0000 Subject: [PATCH 18/19] search feature: make sure page scrollbar disappears when searching but a scrollbar for search items shows if needed --- assets/css/beautifuljekyll.css | 2 ++ assets/js/beautifuljekyll.js | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/assets/css/beautifuljekyll.css b/assets/css/beautifuljekyll.css index 5bcc5da..4e809c4 100644 --- a/assets/css/beautifuljekyll.css +++ b/assets/css/beautifuljekyll.css @@ -1067,6 +1067,8 @@ pre { margin-top: 1.5rem; color: #fff; font-size: 1.5rem; + max-height: calc(100vh - 6.5rem); + overflow-y: auto; } #search-results-container a { color: #fff; diff --git a/assets/js/beautifuljekyll.js b/assets/js/beautifuljekyll.js index 48a3ada..4a7ab7f 100644 --- a/assets/js/beautifuljekyll.js +++ b/assets/js/beautifuljekyll.js @@ -121,13 +121,18 @@ var BeautifulJekyllJS = { e.preventDefault(); $("#beautifuljekyll-search-overlay").show(); $("#nav-search-input").focus().select(); + $("body").addClass("overflow-hidden"); }); $("#nav-search-exit").click(function(e) { e.preventDefault(); $("#beautifuljekyll-search-overlay").hide(); + $("body").removeClass("overflow-hidden"); }); $(document).on('keyup', function(e) { - if (e.key == "Escape") $("#beautifuljekyll-search-overlay").hide(); + if (e.key == "Escape") { + $("#beautifuljekyll-search-overlay").hide(); + $("body").removeClass("overflow-hidden"); + } }); } }; -- 2.45.2 From e0e553148914829d3c55a40b04b3964955041aa7 Mon Sep 17 00:00:00 2001 From: Marco Blessing Date: Mon, 2 Aug 2021 17:01:09 +0200 Subject: [PATCH 19/19] update changelog --- CHANGELOG-SA.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-SA.md b/CHANGELOG-SA.md index ae01f8c..7d58624 100644 --- a/CHANGELOG-SA.md +++ b/CHANGELOG-SA.md @@ -1,3 +1,7 @@ -## v5.0.0 (2020-11-21) +## 📅 21-08-08 -Initial version of this SA edition implemented. It's based on `beautiful-jekyll 5.0.0` -> commit `8b41236`. +- 📌 Merge upstream changes to commit `30a757d +` +## 📅 v5.0.0 (2020-11-21) + +- Initial version of this SA edition implemented. It's based on `beautiful-jekyll 5.0.0` -> commit `8b41236`. -- 2.45.2