diff --git a/.github/issue_template.md b/.github/issue_template.md index bbe50146cf2f..2e25e5c9e57e 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -1,3 +1,3 @@ Please only submit feature suggestions or bug reports if you believe something is broken. -If you need help, or if you enjoy Beautiful Jekyll and want to support it, please upgrade to one of our plans: https://beautifuljekyll.com/plans/ +If you need help, you can attend the [Office Hours](https://beautifuljekyll.com/officehours) (only available for [sponsors](https://beautifuljekyll.com/plans/)). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcb9d5a3b73a..e684fb8c84aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,11 +5,22 @@ jobs: name: Build Jekyll runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Build the site in the jekyll/builder container + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + - name: Install dependencies + run: bundle install && bundle exec appraisal install + - name: Setup Pages + id: configure-pages + uses: actions/configure-pages@v5 + - name: Setup CI config run: | - export JEKYLL_VERSION=3.8 - docker run \ - -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ - -e PAGES_REPO_NWO=${{ github.repository }} \ - jekyll/builder:$JEKYLL_VERSION /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future" + echo "---" > _config_ci.yml + echo "baseurl: ${{ steps.configure-pages.outputs.base_path }}" >> _config_ci.yml + - name: Build site + env: + JEKYLL_ENV: production + run: bundle exec appraisal jekyll build --future --config _config_ci.yml,_config.yml + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 diff --git a/Appraisals b/Appraisals new file mode 100644 index 000000000000..dac8cfe0ffb0 --- /dev/null +++ b/Appraisals @@ -0,0 +1,6 @@ +appraise "jekyll-3" do + gem "jekyll", "3.9.4" +end +appraise "jekyll-4" do + gem "jekyll", "4.3.3" +end diff --git a/CHANGELOG.md b/CHANGELOG.md index 374c031b3926..8a03eeaabc06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,63 @@ ## Unreleased version +- BREAKING CHANGE: Allow changing the order of the social network links that appear in the footer (#1152) +- BREAKING CHANGE: `google-scholar` social network link no longer requires the prefix `citations?user=`; if you previously set this parameter, it needs to be updated (#1189) +- Added `mathjax` YAML parameter to allow support for MathJax, used to write LaTeX expressions (#195) +- Added explicit support for favicons, you only need to add a `favicon.ico` file to the root directory +- The footer of a page always sticks to the bottom, even on short pages (#576) +- Added `author` YAML parameter to allow specifying the author(s) of a post (#1220) +- Fixed bug where search results broke if a post title had a backslash (#1279) +- Fixed bug where hovering over search results showed the text "{desc}" (#1156) +- Added social network links for GitLab, Bluesky, Whatsapp, Untappd (#1168, #1218, #1299, #1307) +- Support reddit social network link to either be a subreddit or a user (#1371) +- Use CSS variables (#661) +- Added instructions and example on how to fix image links in project sites (#1171) +- Pagination buttons: use nicer arrows, and don't show text on small screens (#1221) +- Updated Yelp URL format - if you previously used the `yelp` social network config parameter, you might need to update the config value (#1259) +- Added `title-on-all-pages` config setting, that adds the website title to all page titles (#1272) +- Change Twitter icon to X (#1193) +- Upgraded font-awesome to 6.5.2 (#1330) + +## v6.0.1 (2023-06-08) + +This version has been in the works for a few years. It includes several new features that were highly requested, numerous bug fixes, new documentation, and aggresively encourages migrating from the old Google Universal Analytics to the new Analytics 4. -- 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 +#### Breaking changes + +- As of July 2023, Google Universal Analytics is going away and being replaced by Google Analytics 4. Beautiful Jekyll sites that still use the old analytics tag will show a warning to encourage them to move to Analytics 4 (#1096). +- More control over RSS feed sharing: previously, an RSS feed was *always* generated, and if the config setting `rss-description` was set then there was an RSS icon in the footer. Now, an RSS feed is only generated when the config setting `rss-description` exists, and an RSS footer icon is only shown if `rss: true` is set in the `social-network-links` config settings. + +#### New parameters and settings + +- Added `navbar-var-length` config setting that allows the navigation menu to be the same length as the longest sub-menu, so that long words in the submenu are not cut off (#765) +- Added `post_search` config setting that creates a Search button in the navbar (#770) +- Added `edit_page_button` config setting that adds a "Edit page" button to the footer (to edit the current page on GitHub) (#1004) +- Added `footer-hover-col` config setting to customize the hover colour of links in the footer (#848) + +#### New features and improvements + +- Made the home page feed more accessible for screen readers (#950) +- Added support for giscus comments (#886) and CommentBox (#960) +- Added support for Cloudflare Analytics (#797) +- Added Reddit in share options of posts (#815) + +#### Bug fixes + +- Fixed page titles, subtitles, and excerpts rendering correctly when there are special characeters in them (#856) - 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 image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio - Fixed bug where special characters in the title led to broken share tags (#744) +- Fixed bug where staticman didn't work jQuery slim version is used (#766) +- Fixed very long strings to wrap around the next line rather than go off-screen (#787) + +#### Small changes + - Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775) +- Added social network links for Patreon, Medium, Itch.io, Discord, Kaggle, Hackerrank (#783, #788, #907, #961, #978) +- 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 + ## v5.0.0 (2020-09-15) @@ -55,7 +104,6 @@ One of the major changes in this version is that a lot of time was spent on reth - Upgraded kramdown to version 2.3.0 to fix security issues - Upgraded jQuery to version 3.5.1 to fix a couple security vulnerabilities with the previous version - ## v4.1.0 (2020-08-08) - Added Open Graph `site_name` meta field to pages automatically diff --git a/LICENSE b/LICENSE index 27e2cdf65595..0b6ae57226ca 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Dean Attali +Copyright (c) 2023 Dean Attali Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8c79583ba8ae..c2d1c5a39d6a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,12 @@ -[![](https://i.imgur.com/zNBkzj1.png)](https://beautifuljekyll.com/plans/) - # Beautiful Jekyll -[![xscode](https://img.shields.io/badge/Available%20on-xs%3Acode-blue?style=?style=plastic&logo=appveyor&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF////////VXz1bAAAAAJ0Uk5T/wDltzBKAAAAlUlEQVR42uzXSwqAMAwE0Mn9L+3Ggtgkk35QwcnSJo9S+yGwM9DCooCbgn4YrJ4CIPUcQF7/XSBbx2TEz4sAZ2q1RAECBAiYBlCtvwN+KiYAlG7UDGj59MViT9hOwEqAhYCtAsUZvL6I6W8c2wcbd+LIWSCHSTeSAAECngN4xxIDSK9f4B9t377Wd7H5Nt7/Xz8eAgwAvesLRjYYPuUAAAAASUVORK5CYII=)](https://xscode.com/daattali/beautiful-jekyll) [![Gem Version](https://badge.fury.io/rb/beautiful-jekyll-theme.svg)](https://badge.fury.io/rb/beautiful-jekyll-theme) > By [Dean Attali](https://deanattali.com) · [Demo](https://beautifuljekyll.com/) **Beautiful Jekyll** is a ready-to-use template to help you create a beautiful website quickly. Perfect for personal sites, blogs, or simple project websites. [Check out a demo](https://beautifuljekyll.com) of what you'll get after just two minutes. You can also look at [my personal website](https://deanattali.com) or [my consulting website](https://attalitech.com) to see it in use, or see [examples of websites](http://beautifuljekyll.com/examples) other people created using this theme. -**If you enjoy Beautiful Jekyll, please consider [supporting me](https://github.com/sponsors/daattali) for over 5 years of development (and to unlock rewards!) ❤** +**If you enjoy Beautiful Jekyll, please consider [supporting me](https://github.com/sponsors/daattali). You'll also gain access to office hours and more features! ❤** ## Table of contents @@ -21,12 +18,13 @@ - [Customizing parameters for each page](#customizing-parameters-for-each-page) - [Supported parameters](#supported-parameters) - [Featured users (success stories!)](#featured-users-success-stories) -- [FAQ and support](#faq-and-support) -- [Credits and contributions](#credits) +- [Next steps](#next-steps) +- [Getting help](#getting-help) +- [Credits and contributions](#contributions) # 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. @@ -35,9 +33,10 @@ Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the lates - **Flexible usage**: Use Beautiful Jekyll directly on GitHub or via a Ruby gem - choose the best [development method](#build-your-website-in-3-steps) for you. - **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. +- **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/), [Staticman](https://staticman.net), [giscus](https://giscus.app), or [CommentBox](https://commentbox.io/). +- **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. @@ -45,56 +44,60 @@ Check out [*What's New?*](https://beautifuljekyll.com/updates/) to see the lates 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) +- [DoFollow](https://dofollow.co.uk/) +- [Varna Sri Raman](https://about.me/varna) -[Become a 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 new features\!](https://github.com/sponsors/daattali/sponsorships?tier_id=39856)** # 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!), 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. +There are a few different ways to build a website using Beautiful Jekyll, and this document will go through the simplest one: using a fork on GitHub. For most people (including myself!), this easy method is the recommended one. + +Even if you choose to use one of the [advanced installation methods](https://beautifuljekyll.com/getstarted/#install-steps-hard), I still suggest you read through the easy method first. ## The easy way (recommended!) Getting started is *literally* as easy as 1-2-3 :smile: -Scroll down to see the steps involved, but here is a 40-second video just as a reference as you work through the steps. If you don't already have a [GitHub account](https://github.com/join), you'll need to sign up. +Scroll down to see the steps involved, but here is a 30-second video just as a reference as you work through the steps. If you don't already have a [GitHub account](https://github.com), you'll need to sign up. -![Installation steps](assets/img/install-steps.gif) +![Installation steps](https://beautifuljekyll.com/assets/img/install-steps.gif) ### 1. Fork this project -Fork this project by clicking the __*Fork*__ button at the top right corner of this page. Forking means that you now copied this entire project and all the files into your account. +Click on the __*Fork*__ button at the top right corner of this page. Forking means that you're copying this entire project and all its files into your account. Do not click on the __*Create fork*__ button on the next page yet. -### 2. Rename the project to `.github.io` +### 2. Rename the repository to `YOURUSERNAME.github.io` -Click on __*Settings*__ at the top (the cog icon) and on that page you'll have an option to rename the project (*Repository name*). This will create a website with the **Beautiful Jekyll** template that will be available at `https://.github.io` within a couple minutes (check out the [FAQ](https://beautifuljekyll.com/faq/#custom-domain) if you want to use a different project name). If after a few minutes your website is still not ready, try making any edit to any file, just to force GitHub to re-build your site. +You'll see the word "repository" used a lot in GitHub - it simply means "project". Under __*Repository name*__ you should see the name `beautiful-jekyll`, this is where you need to rename your project to `YOURUSERNAME.github.io` (replace `YOURUSERNAME` with your GitHub user name). It's important to use this exact name so that GitHub will recognize it and automatically create a website for this project. +> Tip: If you want to use a different URL for your website, check out the [FAQ](https://beautifuljekyll.com/faq/#custom-domain) + ### 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 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. +Edit the `_config.yml` file to change any settings you want. To edit the file, first click on it to view the file, and on the next page 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. After changing the settings, click the green __*Commit changes*__ button to save these edits. -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!** +> Note: In the video above, only one setting in the `_config.yml` file is edited, but you should go through the rest of the settings as well. ### 4. Congratulations! You have a website! -After you save your changes to the `_config.yml` file (by clicking on *Commit changes* as the video tutorial shows), your website should be ready in a minute or two at `https://.github.io`. Every time you make a change to any file, your website will get rebuilt and should be updated in about a minute or so. Your website will be initialized with several sample blog posts and a couple other pages. +If you named your project correctly and made an edit to the config file, your website should be ready in a minute or two at `https://YOURUSERNAME.github.io`. Every time you make a change to any file, your website will get rebuilt and should be updated in about a minute or so. Your website will be initialized with several sample blog posts and a couple other pages. -Note that this was the easy way to *create* your website, but it does come at a cost: when Beautiful Jekyll gains new features in the future, *updating* your website to include all the latest features is cumbersome. See the [FAQ](https://beautifuljekyll.com/faq/#updating) for help with upgrading in the future. +## The harder way (for advanced users) -## The hard way (using ruby gems) +The instructions above explain how to use Beautiful Jekyll in the easiest way: by forking on GitHub. There are more [advanced installation methods](https://beautifuljekyll.com/getstarted/#install-steps-hard) that include either using GitHub Pages with remote themes, or using Ruby gems. They provide you with more control, but are only intended for advanced users. -If you followed the easy method above, then you already have your site and you can skip this section! If you want to use Beautiful Jekyll as a ruby gem instead, follow the [advanced installation instructions](https://beautifuljekyll.com/getstarted/#install-steps-hard). This is harder to set up initially, but it makes it super easy to keep your site up to date with Beautiful Jekyll when more features are added in the future. +> Note: Beautiful Jekyll was primarily designed to be used as a GitHub theme, so you will not get any support if you use this theme via Ruby gems. # 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). +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, access office hours, 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 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! +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! In contrast, look at [`tags.html`](./tags.html). That's how your write HTML - not as pretty. So stick with markdown if you don't know HTML. @@ -129,7 +132,7 @@ You can look at the top of [`aboutme.md`](https://raw.githubusercontent.com/daat # Supported parameters -Below is a list of the parameters that Beautiful Jekyll supports (any of these can be added to the YAML front matter of any page). Remember to also look in the `_config.yml` file to see additional site-wide settings. +Below is a list of the parameters that Beautiful Jekyll supports (any of these can be added to the YAML front matter of any page). Remember to also look in the `_config.yml` file to see additional site-wide settings. If there's a parameter that you want to apply to the entire site instead of one specific page, check out [this FAQ answer](https://beautifuljekyll.com/faq/#default-params). ## Main parameters @@ -142,7 +145,8 @@ subtitle | Short description of page or blog post that goes under the title tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, analysis, finance]` cover-img | Include a large full-width image at the top of the page. You can either provide the path to a single image (eg. `"/path/to/img"`) , or a list of images to cycle through (eg. `["/path/img1", "/path/img2"]`). If you want to add a caption to an image, then you must use the list notation (use `[]` even if you have only one image), and each image should be provided as `"/path/to/img" : "Caption of image"`. thumbnail-img | For blog posts, if you want to add a thumbnail that will show up in the feed, use `thumbnail-img: /path/to/image`. If no thumbnail is provided, then `cover-img` will be used as the thumbnail. You can use `thumbnail-img: ""` to disable a thumbnail. -comments | If you want do add comments to a specific page, use `comments: true`. Comments only work if you enable one of the comments providers (Facebook, disqus, staticman, utterances) in `_config.yml` file. Comments are automatically enabled on blog posts but not on other pages; to turn comments off for a specific post, use `comments: false`. +comments | If you want do add comments to a specific page, use `comments: true`. Comments only work if you enable one of the comments providers (Facebook, disqus, staticman, utterances, giscus, CommentBox) in `_config.yml` file. Comments are automatically enabled on blog posts but not on other pages; to turn comments off for a specific post, use `comments: false`. +mathjax | If you want to use LaTeX formulas, you need to enable MathJax. Note that in MathJax you need to use `$$` and `\\(` to start and end expressions ## Parameters for SEO and social media sharing @@ -160,6 +164,7 @@ These are parameters that you may not use often, but can come in handy sometimes Parameter | Description ----------- | ----------- +author | Specify the author of a blog post (useful if a website has multiple authors). readtime | If you want a post to show how many minutes it will take to read it, use `readtime: true`. show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`. social-share | By default, every blog post has buttons to share the page on social media. If you want to turn this feature off, use `social-share: false`. @@ -200,22 +205,35 @@ Visit the [Official website](http://beautifuljekyll.com/examples) to see sample If you'd like to showcase yourself and join this list, [upgrading to the Individual plan](https://github.com/sponsors/daattali/sponsorships?&tier_id=7362) will give you that publicity plus some other rewards! -# FAQ and support +# Next steps -Visit the [official FAQ page](https://beautifuljekyll.com/faq) for answers to commonly asked questions. +Congratulations on making it this far! You now have all the tools to easily build a beautiful website for free. -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/). +- After you get comfortable with the basics of writing in markdown, I suggest taking a look at this [sample post](https://beautifuljekyll.com/2020-02-28-sample-markdown/) and [the code that created it](https://raw.githubusercontent.com/daattali/beautiful-jekyll/master/_posts/2020-02-28-sample-markdown.md) to learn some more advanced tips about markdown. + +- I **highly recommend** going over the [*Frequently Asked Questions*](https://beautifuljekyll.com/faq/) to find out answers to questions you may not even know you have. Every few months I suggest checking the [*What's New?*](https://beautifuljekyll.com/updates/) page to see if there are new features, and learn [how to update your site to the newest version](https://beautifuljekyll.com/faq/#updating) when it's time. + +- You can also check out the [advanced installation methods](https://beautifuljekyll.com/getstarted/#install-steps-hard) that give you a little more control but are harder to use. Keep in mind that Beautiful Jekyll was primarily designed to be used as a GitHub theme, so you will not get any support if you choose one of the Ruby installation methods. + +- Remember that Beautiful Jekyll is built on top of Jekyll. This means that reading through the [Jekyll documentation](https://jekyllrb.com/) will introduce you to many more features that you might find useful! -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. +# Getting help + +Visit the [FAQ page](https://beautifuljekyll.com/faq) for answers to commonly asked questions. + +**If you choose to [become a sponsor](https://beautifuljekyll.com/plans/), you'll have access to my [office hours](https://beautifuljekyll.com/officehours/) where you can ask for help.** You can also use the [Discussions](https://github.com/daattali/beautiful-jekyll/discussions) area to try and get help from the community. + +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/). # Contributions Thank you to [all past contributors](https://github.com/daattali/beautiful-jekyll/graphs/contributors). If you find any problems or would like to contribute in any way, feel free to create a pull request/open an issue/send me a message. -You can also contribute by becoming an [official sponsor](https://github.com/sponsors/daattali/sponsorships?tier_id=39856) to help keep Beautiful Jekyll well-maintained. +You can also contribute by becoming an [official sponsor](https://github.com/sponsors/daattali/sponsorships?tier_id=39856) to help keep Beautiful Jekyll well-maintained! # Credits This template was not made *entirely* from scratch. I'd like to give special thanks to [Jekyll Now](https://github.com/barryclark/jekyll-now) and [Bootstrap Clean Blog](https://github.com/IronSummitMedia/startbootstrap-clean-blog), from whom I've taken several ideas initially. I'd also like to thank [Dr. Jekyll's Themes](https://drjekyllthemes.github.io/), [Jekyll Themes](http://jekyllthemes.org/), and another [Jekyll Themes](http://jekyllrc.github.io/jekyllthemes/) for featuring Beautiful Jekyll in their Jekyll theme directories. + diff --git a/_config.yml b/_config.yml index 81dee7fa759b..f6176a416d01 100644 --- a/_config.yml +++ b/_config.yml @@ -1,9 +1,13 @@ -# Welcome to Beautiful Jekyll! -# This config file is meant for settings that affect your entire website. When you first -# set up your website you should go through all these settings and edit them, but after -# the initial set up you won't need to come back to this file often. - +########################################################### +### Welcome to Beautiful Jekyll! +### This config file is meant for settings that affect your entire website. When you first +### set up your website you should go through all these settings and edit them, but after +### the initial set up you won't need to come back to this file often. +########################################################### + +############################ # --- Required options --- # +############################ # Name of website title: xDSL @@ -11,7 +15,9 @@ title: xDSL # Your name to show in the footer author: xDSL project +############################################### # --- List of links in the navigation bar --- # +############################################### navbar-links: Home: "index" @@ -27,7 +33,9 @@ navbar-links: - Partners: "partners" - ExCALIBUR: "excalibur" +################ # --- Logo --- # +################ # Image to show in the navigation bar - works best with a square image # Remove this parameter if you don't want an image in the navbar @@ -41,9 +49,12 @@ avatar: "/assets/img/logo.png" title-img: "/assets/img/xdsl_long_logo.png" +##################################### # --- Footer social media links --- # +##################################### # Select the social network links that you want to show in the footer. +# You can change the order that they show up on the page by changing the order here. # Uncomment the links you want to show and add your information to each one. social-network-links: # email: "someone@example.com" @@ -68,6 +79,7 @@ social-network-links: # telegram: yourname # calendly: yourname # mastodon: instance.url/@username +# bluesky: yourname # ORCID: your ORCID ID # google-scholar: your google scholar # discord: invite/invite_code or users/userid @@ -78,7 +90,9 @@ remove-ads: true # The URL for the feed will be https:///feed.xml #rss-description: This website is a virtual proof that I'm awesome +########################### # --- General options --- # +########################### # Select which social network share links to show in posts share-links-active: @@ -91,6 +105,9 @@ share-links-active: # Remove this if you don't want a link in the footer url-pretty: "xdsl.dev" +# Add the website title to the title of every page +title-on-all-pages: true + # Excerpt word length - Truncate the excerpt of each post on the feed page to the specified number of words excerpt_length: 50 @@ -106,7 +123,9 @@ post_search: true # The keywords to associate with your website, for SEO purposes #keywords: "my,list,of,keywords" +###################################### # --- Colours / background image --- # +###################################### # Personalize the colours in your website. Colour values can be any valid CSS colour @@ -140,13 +159,15 @@ footer-hover-col: "#FCA311" #site-js: # - "/assets/js/custom-script.js" +################################# # --- Web Analytics Section --- # +################################# -# Fill in your Google Analytics gtag.js ID to track your website using gtag -#gtag: "" +# Fill in your Google Analytics tag ID (or "Measurement ID") to track your website usage +#gtag: "G-XXXXXXXXXX" -# 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: "" # Fill in your Cloudflare Analytics beacon token to track your website using Cloudflare Analytics #cloudflare_analytics: "" @@ -162,7 +183,14 @@ footer-hover-col: "#FCA311" # uri: "demo.wiki.pro" # opt-out: true +# Google Universal Analytics ID -- deprecated +# As of July 2023 this is no longer supported by Google! If you are still using `google_analytics`, +# you should switch to using the `gtag` field above instead. +#google_analytics: "UA-XXXXXXXX-X" + +#################### # --- Comments --- # +#################### # To use Disqus comments, sign up to https://disqus.com and fill in your Disqus shortname (NOT the userid) #disqus: "" @@ -170,6 +198,9 @@ footer-hover-col: "#FCA311" # To use Facebook Comments, create a Facebook app and fill in the Facebook App ID #fb_comment_id: "" +# To use CommentBox, sign up for a Project ID on https://commentbox.io +#commentbox: "" # Project ID, e.g. "5694267682979840-proj" + # To use Utterances comments: (0) uncomment the following section, (1) fill in # "repository" (make sure the repository is public), (2) Enable Issues in your repository, # (3) Install the Utterances app in your repository https://github.com/apps/utterances @@ -210,7 +241,9 @@ footer-hover-col: "#FCA311" # emit-metadata: 0 # theme: light +################ # --- Misc --- # +################ # Ruby Date Format to show dates of posts date_format: "%B %-d, %Y" @@ -218,7 +251,9 @@ date_format: "%B %-d, %Y" # Facebook App ID #fb_app_id: "" +################################################################################# # --- You don't need to touch anything below here (but you can if you want) --- # +################################################################################# # Output options (more information on Jekyll's site) timezone: "America/Toronto" diff --git a/_includes/cloudflare_analytics.html b/_includes/cloudflare_analytics.html new file mode 100644 index 000000000000..bd63f8b27bb7 --- /dev/null +++ b/_includes/cloudflare_analytics.html @@ -0,0 +1,8 @@ +{% if site.cloudflare_analytics %} + + + +{% endif %} diff --git a/_includes/commentbox.html b/_includes/commentbox.html new file mode 100644 index 000000000000..e8019dadef62 --- /dev/null +++ b/_includes/commentbox.html @@ -0,0 +1,7 @@ +{% if site.commentbox %} + +
+ + + +{% endif %} diff --git a/_includes/comments.html b/_includes/comments.html index ce34285f3bc2..66242332a143 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -3,4 +3,6 @@ {% include fb-comment.html %} {% include staticman-comments.html %} {% include utterances-comment.html %} + {% include giscus-comment.html %} + {% include commentbox.html %} {% endif %} diff --git a/_includes/footer-minimal.html b/_includes/footer-minimal.html index c6a5af5533aa..66b295a71db4 100644 --- a/_includes/footer-minimal.html +++ b/_includes/footer-minimal.html @@ -12,7 +12,7 @@ {% if site.url-pretty %}   •   - {{ site.url-pretty }} + {{ site.url-pretty }} {% endif %} diff --git a/_includes/footer.html b/_includes/footer.html index 8fb0e7e4f497..9bfaf547a326 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -20,7 +20,7 @@ {% if site.url-pretty %}  •  - {{ site.url-pretty }} + {{ site.url-pretty }} {% endif %} @@ -30,6 +30,12 @@ Do-not-Track {% endif %} {% endif%} + + {% if site.edit_page_button and site.github.repository_url %} +  •  + Edit page + {% endif%} +

{% unless site.remove-ads %}

Powered by diff --git a/_includes/giscus-comment.html b/_includes/giscus-comment.html new file mode 100644 index 000000000000..b6e7fa164215 --- /dev/null +++ b/_includes/giscus-comment.html @@ -0,0 +1,16 @@ +{% if site.giscus.repository and site.giscus.hostname %} + + + +{% endif %} diff --git a/_includes/google_analytics.html b/_includes/google_analytics.html index 01f74066310d..6fb0698c93b4 100644 --- a/_includes/google_analytics.html +++ b/_includes/google_analytics.html @@ -1,5 +1,17 @@ {% if site.google_analytics %} +{% unless site.gtag %} +

+
×
+
+ This website is using outdated Google Analytics +
+ More info + As of July 2023, Google's Universal Analytics is going away and being replaced by Google Analytics 4. This website is still using the old Universal Analytics. In order to remove this message, the website owner must remove the google_analytics property in the website's config file, and optionally replace it with the new gtag property. +
+
+
+{% endunless %} + {% assign favicon_exists = site.static_files | where: "path", "/favicon.ico" | size %} + {% if favicon_exists == 1 %} + + {% endif %} + {% if page.head-extra %} {% for file in page.head-extra %} {% include {{ file }} %} diff --git a/_includes/header.html b/_includes/header.html index 393a07c79eee..105f7a46ef14 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,15 +1,11 @@ - - {% assign date_format = site.date_format | default: "%B %-d, %Y" %} -{% if page.cover-img or page.title %} - {% if page.cover-img %}
-{% if page.cover-img %} -
+
+ {% if page.cover-img or page.title %}
-

{% if page.title %}{{ page.title }}{% else %}
{% endif %}

+

{% if page.title %}{{ page.title | strip_html }}{% else %}
{% endif %}

{% if page.subtitle %} {% if include.type == "page" %}
- {{ page.subtitle }} + {{ page.subtitle | strip_html }} {% else %} -

{{ page.subtitle }}

+

{{ page.subtitle | strip_html }}

{% endif %} {% endif %} - - {% if include.type == "post" %} + + {% if include.type == "post" %} + {% if page.author %} + By {{ page.author | strip_html }}
+ {% endif%} {% if page.last-updated %}
- + {% endif %} + {% if page.cover-img %}{% endif %}
+ +{% if page.header-extra %} + {% for file in page.header-extra %} + {% include {{ file }} %} + {% endfor %} {% endif %} -
-
-
-
-
-

{% if page.title %}{{ page.title }}{% else %}
{% endif %}

- {% if page.subtitle %} - {% if include.type == "page" %} -
- {{ page.subtitle }} - {% else %} -

{{ page.subtitle }}

- {% endif %} - {% endif %} - {% if include.type == "post" %} - - {% if page.last-updated %} - - {% endif %} - {% if page.readtime %} - {% include readtime.html %} - {% endif %} - {% endif %} -
-
-
-
-
- - -{% else %} - {% if page.hero != true %} -
- {% endif %} -{% endif %} diff --git a/_includes/mathjax.html b/_includes/mathjax.html new file mode 100644 index 000000000000..f8d7bea3aafc --- /dev/null +++ b/_includes/mathjax.html @@ -0,0 +1,12 @@ +{% if page.mathjax %} + + +{% endif %} diff --git a/_includes/nav.html b/_includes/nav.html index 13be224b4e72..90246911def8 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,9 +1,9 @@
@@ -39,4 +47,16 @@ {% endfor %} {% endif %} + {% if site.avatar and page.show-avatar != false %} + + {% endif %} + + +{% include search.html %} diff --git a/_includes/search.html b/_includes/search.html new file mode 100644 index 000000000000..dc0f87f61f38 --- /dev/null +++ b/_includes/search.html @@ -0,0 +1,19 @@ +{% if site.post_search %} + +
+ + + +
    + + + +
    + +{% endif %} diff --git a/_includes/social-networks-links.html b/_includes/social-networks-links.html index 7825aba69d01..be42622f9f6b 100644 --- a/_includes/social-networks-links.html +++ b/_includes/social-networks-links.html @@ -1,6 +1,9 @@ +{% if site.social-network-links %} +{% endif %} diff --git a/_includes/social-share.html b/_includes/social-share.html index 2091c883b583..b2e07e4b64bf 100644 --- a/_includes/social-share.html +++ b/_includes/social-share.html @@ -11,10 +11,10 @@ Share: {% if site.share-links-active.twitter %} - - - Twitter + + + X (Twitter) {% endif %} @@ -42,6 +42,14 @@ {% endif %} + {% if site.share-links-active.reddit %} + + + Reddit + + {% endif %} + {% endif %} diff --git a/_layouts/base.html b/_layouts/base.html index 14a9227886e8..df2c16fd7d8a 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -5,7 +5,7 @@ common-ext-css: - href: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" sri: "sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" - - "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" + - "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" - "https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" - "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" common-ext-js: @@ -21,11 +21,10 @@ - + {% include head.html %} - {% include gtm_body.html %} {% include nav.html %} diff --git a/_layouts/default.html b/_layouts/default.html index 96907b43e4cc..1bbc3cf81222 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,7 +4,7 @@
    -
    +
    {% if page.before-content %}
    {% for file in page.before-content %} @@ -22,4 +22,4 @@ {% endfor %}
    {% endif %} -
    + diff --git a/_layouts/home.html b/_layouts/home.html index c97b27faaff9..5ff3d9731bdb 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -6,99 +6,116 @@ {% assign posts = paginator.posts | default: site.posts %} -
    + +
      {% for post in posts %} -
      +
    • +
      - {%- capture thumbnail -%} - {% if post.thumbnail-img %} - {{ post.thumbnail-img }} - {% elsif post.cover-img %} - {% if post.cover-img.first %} - {{ post.cover-img[0].first.first }} + {%- capture thumbnail -%} + {% if post.thumbnail-img %} + {{ post.thumbnail-img }} + {% elsif post.cover-img %} + {% if post.cover-img.first %} + {{ post.cover-img[0].first.first }} + {% else %} + {{ post.cover-img }} + {% endif %} {% else %} - {{ post.cover-img }} {% endif %} - {% else %} + {% endcapture %} + {% assign thumbnail=thumbnail | strip %} + + {% if site.feed_show_excerpt == false %} + {% if thumbnail != "" %} +
      + + Post thumbnail + +
      + {% endif %} {% endif %} - {% endcapture %} - {% assign thumbnail=thumbnail | strip %} - {% if site.feed_show_excerpt == false %} - {% if thumbnail != "" %} -
      - - Post thumbnail - -
      - {% endif %} - {% endif %} + +

      {{ post.title | strip_html }}

      -
      -

      {{ post.title }}

      + {% if post.subtitle %} +

      + {{ post.subtitle | strip_html }} +

      + {% endif %} +
      - {% if post.subtitle %} -

      - {{ post.subtitle }} -

      + {% if post.author %} + By {{ post.author | strip_html }} {% endif %} - + - + {% if thumbnail != "" %} +
      + + Post thumbnail + +
      + {% endif %} - {% if thumbnail != "" %} -
      - - Post thumbnail - -
      - {% endif %} + {% unless site.feed_show_excerpt == false %} + {% if thumbnail != "" %} +
      + + Post thumbnail + +
      + {% endif %} - {% unless site.feed_show_excerpt == false %} - {% if thumbnail != "" %} -
      - - Post thumbnail - -
      - {% endif %} +
      + {% assign excerpt_length = site.excerpt_length | default: 50 %} + {{ post.excerpt | strip_html | truncatewords: excerpt_length }} + {% assign excerpt_word_count = post.excerpt | number_of_words %} + {% if post.content != post.excerpt or excerpt_word_count > excerpt_length %} + [Read More] + {% endif %} +
      + {% endunless %} -
      - {% assign excerpt_length = site.excerpt_length | default: 50 %} - {{ post.excerpt | strip_html | xml_escape | truncatewords: excerpt_length }} - {% assign excerpt_word_count = post.excerpt | number_of_words %} - {% if post.content != post.excerpt or excerpt_word_count > excerpt_length %} - [Read More] + {% if site.feed_show_tags != false and post.tags.size > 0 %} +
      + Tags: + +
        + {% for tag in post.tags %} +
      • + {{- tag -}} +
      • + {% endfor %} +
      +
      {% endif %} -
      - {% endunless %} - - {% if site.feed_show_tags != false and post.tags.size > 0 %} -
      - Tags: - {% for tag in post.tags %} - {{- tag -}} - {% endfor %} -
      - {% endif %} -
      +
    • + {% endfor %} -
    + {% if paginator.total_pages > 1 %} diff --git a/_layouts/minimal.html b/_layouts/minimal.html index 9322065c3d0f..f81f29c82c84 100644 --- a/_layouts/minimal.html +++ b/_layouts/minimal.html @@ -20,7 +20,7 @@ -
    +
    {% if page.before-content %}
    {% for file in page.before-content %} @@ -38,7 +38,7 @@ {% endfor %}
    {% endif %} -
    + {% include footer-minimal.html %} diff --git a/_layouts/page.html b/_layouts/page.html index c8b677083d74..e1ffcd585bea 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -4,7 +4,7 @@ {% include header.html type="page" %} -
    +
    {% if page.before-content %} @@ -28,4 +28,4 @@ {% include comments.html %}
    -
    + diff --git a/_layouts/post.html b/_layouts/post.html index 2c29fde6b60a..62b11bfd4dc1 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -4,7 +4,7 @@ {% include header.html type="post" %} -
    +
    @@ -39,9 +39,9 @@
    {% endif %} -
    +
    {{ content }} -
    +
    {% if page.tags.size > 0 %}
    @@ -67,16 +67,22 @@ {% include comments.html %}
    -
    + diff --git a/assets/css/beautifuljekyll.css b/assets/css/beautifuljekyll.css index d99286f196ab..79d14cd31730 100644 --- a/assets/css/beautifuljekyll.css +++ b/assets/css/beautifuljekyll.css @@ -4,6 +4,26 @@ layout: null @import url("pygment_highlights.css"); +:root { + /* config file CSS variables */ + --page-col: {{ site.page-col | default: "#FFFFFF" }}; + --text-col: {{ site.text-col | default: "#404040" }}; + --link-col: {{ site.link-col | default: "#008AFF" }}; + --hover-col: {{ site.hover-col | default: "#0085A1" }}; + --navbar-col: {{ site.navbar-col | default: "#EAEAEA" }}; + --navbar-text-col: {{ site.navbar-text-col | default: "#404040" }}; + --navbar-border-col: {{ site.navbar-border-col | default: "#DDDDDD" }}; + --footer-col: {{ site.footer-col | default: "#EAEAEA" }}; + --footer-text-col: {{ site.footer-text-col | default: "#777777" }}; + --footer-link-col: {{ site.footer-link-col | default: "#404040" }}; + --footer-hover-col: {{ site.footer-hover-col | default: "#0085A1" }}; + + /* common CSS variables */ + --body-font: "Helvetica Neue", "Helvetica", "Arial", sans-serif; + --header-font: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + --mid-col: #808080; +} + /* --- General --- */ html { @@ -11,22 +31,29 @@ html { } body { - font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; + font-family: var(--body-font); font-size: 1.125rem; - color: {{ site.text-col | default: "#404040" }}; + color: var(--text-col); position: relative; - background-color: {{ site.page-col | default: "#FFFFFF" }}; + background-color: var(--page-col); {% if site.page-img %} background-image: url({{ site.page-img | relative_url }}); background-attachment: fixed; {% endif %} + overflow-wrap: break-word; + min-height: 100vh; + display: flex; + flex-direction: column; +} +body > main { + flex: 1; } p { line-height: 1.5; margin: 1.875rem 0; } h1,h2,h3,h4,h5,h6 { - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); font-weight: 800; line-height: 1.1; } @@ -46,19 +73,22 @@ h1, h2, h3, h4 { margin-top: 1.25rem; } a { - color: {{ site.link-col | default: "#008AFF" }}; + color: var(--link-col); } a:hover, a:focus { - color: {{ site.hover-col | default: "#0085A1" }}; + color: var(--hover-col); } blockquote { - color: #808080; + color: var(--mid-col); font-style: italic; } blockquote p:first-child { margin-top: 0; } +.jumbotron { + background: #EEE; +} hr.small { max-width: 6.25rem; margin: 1rem auto; @@ -80,21 +110,21 @@ hr.small { } ::-moz-selection { - color: #fff; + color: var(--page-col); + background-color: var(--hover-col); text-shadow: none; - background-color: {{ site.hover-col | default: "#0085A1" }}; } ::selection { - color: #fff; + color: var(--page-col); + background-color: var(--hover-col); text-shadow: none; - background-color: {{ site.hover-col | default: "#0085A1" }}; } img::selection { - color: #fff; + color: var(--hover-col); background: transparent; } img::-moz-selection { - color: #fff; + color: var(--hover-col); background: transparent; } @@ -122,10 +152,9 @@ img { /* --- Navbar --- */ .navbar-custom { - background-color: {{ site.navbar-col | default: "#EAEAEA" }}; - border-bottom: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }}; - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-weight: bold; + background-color: var(--navbar-col); + border-bottom: 1px solid var(--navbar-border-col); + font-family: var(--header-font); {% if site.navbar-img %} background-image: url({{ site.navbar-img | relative_url }}); background-attachment: fixed; @@ -180,8 +209,6 @@ img { } .navbar-custom .navbar-nav .nav-link { - padding-top: 0; - padding-bottom: 0; line-height: 1.25rem; padding-top: 0.9375rem; padding-bottom: 0.9375rem; @@ -189,7 +216,8 @@ img { .navbar-custom .navbar-brand, .navbar-custom .navbar-nav .nav-link { - color: {{ site.navbar-text-col | default: "#404040" }}; + font-weight: 800; + color: var(--navbar-text-col); } .navbar-toggler { @@ -242,21 +270,28 @@ img { } .navbar-custom .nav-item.dropdown .dropdown-menu { - min-width: 0; margin-top: 0; font-size: 1em; border: 0; padding: 0; + {% if site.navbar-var-length %} + min-width: 100%; + {% else %} + min-width: 0; width: 100%; word-break: break-word; + {% endif %} } + .navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item { - white-space: normal; padding: 0.625rem; + background-color: var(--navbar-col); text-decoration: none !important; - border-width: 0 1px 1px 1px; font-weight: bold; - color: {{ site.navbar-text-col | default: "#404040" }}; + color: var(--navbar-text-col); + {% unless site.navbar-var-length %} + white-space: normal; + {% endunless %} } @media (min-width: 1200px) { @@ -266,14 +301,18 @@ img { .navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item { padding-left: 0.625rem; - border: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }}; + border: 1px solid var(--navbar-border-col); border-width: 0 1px 1px; } + + .navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item:first-child { + border-top-width: 1px; + } } @media (max-width: 1199px) { .navbar-custom .navbar-collapse { - border-top: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }}; + border-top: 1px solid var(--navbar-border-col); margin: 0 -1rem; } @@ -298,7 +337,7 @@ img { .navbar-custom .navbar-nav .nav-link:focus, .navbar-custom .navbar-nav .dropdown-menu .dropdown-item:hover, .navbar-custom .navbar-nav .dropdown-menu .dropdown-item:focus { - color: {{ site.hover-col | default: "#0085A1" }}; + color: var(--hover-col); } .navbar-custom .avatar-container { @@ -364,10 +403,10 @@ img { footer { padding: 1.875rem 0; - border-top: 1px #EAEAEA solid; + border-top: 1px var(--footer-col) solid; margin-top: 3.125rem; font-size: 0.875rem; - background-color: {{ site.footer-col | default: "#EAEAEA" }}; + background-color: var(--footer-col); {% if site.footer-img %} background-image: url({{ site.footer-img | relative_url }}); background-attachment: fixed; @@ -375,11 +414,22 @@ footer { } footer p.text-muted { - color: {{ site.footer-text-col | default: "#777777" }} !important; + color: var(--footer-text-col) !important; } footer a { - color: {{ site.footer-link-col | default: "#404040" }}; + color: var(--footer-link-col); +} +footer .footer-links a { + color: var(--text-col); +} +footer .footer-links .fa-inverse { + color: var(--page-col); +} + +footer a:hover, +footer a:focus { + color: var(--footer-hover-col); } footer .list-inline { @@ -388,7 +438,7 @@ footer .list-inline { margin-bottom: 1.875rem; } footer .copyright { - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); text-align: center; margin-bottom: 0; margin-top: 0; @@ -400,7 +450,7 @@ footer .theme-by { footer .footer-custom-content { text-align: center; margin-bottom: 0.9375rem; - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); } @media (min-width: 768px) { @@ -420,6 +470,10 @@ footer .footer-custom-content { /* --- Post preview (feed) --- */ +.posts-list { + margin: 0; +} + .post-preview { padding: 1.25rem 0; border-bottom: 1px solid #eee; @@ -438,14 +492,14 @@ footer .footer-custom-content { .post-preview a { text-decoration: none; - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - color: {{ site.text-col | default: "#404040" }}; + font-family: var(--header-font); + color: var(--text-col); } .post-preview a:focus, .post-preview a:hover { text-decoration: none; - color: {{ site.hover-col | default: "#0085A1" }}; + color: var(--hover-col); } .post-preview .post-title { @@ -459,11 +513,11 @@ footer .footer-custom-content { } .post-preview .post-meta, .post-heading .post-meta { - color: #808080; + color: var(--mid-col); font-size: 1.125rem; font-style: italic; margin: 0 0 0.625rem; - font-family: 'Lora', 'Times New Roman', serif; + font-family: var(--body-font); } .post-heading .post-meta { display: inline-block; @@ -540,18 +594,22 @@ footer .footer-custom-content { /* --- Tags --- */ .blog-tags { - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); font-size: 0.9375rem; margin: 1.875rem 0; } .blog-tags span { - color: {{ site.text-col | default: "#404040" }}; + color: var(--text-col); opacity: 0.8; } +.blog-tags .list-inline-item { + margin-right: 0; +} + .blog-tags a { - color: {{ site.text-col | default: "#404040" }}; + color: var(--text-col); text-decoration: none; padding: 0 0.3125rem; opacity: 0.8; @@ -561,8 +619,8 @@ footer .footer-custom-content { .blog-tags a:hover { opacity: 1; - color: {{ site.text-col | default: "#404040" }}; - border-color: {{ site.text-col | default: "#404040" }}; + color: var(--text-col); + border-color: var(--text-col); } .post-preview .blog-tags { @@ -583,7 +641,7 @@ footer .footer-custom-content { } #full-tags-list { - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); } #full-tags-list .tag-entry { @@ -595,7 +653,7 @@ footer .footer-custom-content { } #full-tags-list .tag-entry .entry-date { - color: #808080; + color: var(--mid-col); font-style: italic; font-size: 1rem; } @@ -657,7 +715,7 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img { font-size: 1.6875rem; line-height: 1.1; display: block; - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); font-weight: 300; margin: 0.625rem 0 0; } @@ -682,7 +740,7 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img { padding: 0.3125rem 0.625rem; font-size: 0.6875rem; color: #EEE; - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); right: 0; bottom: 0; display: none; @@ -709,39 +767,6 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img { } } -.header-section.has-img .no-img { - margin-top: 0; - background-color: #FCFCFC; - margin: 0 0 2.5rem; - padding: 1.25rem 0; - box-shadow: 0 0 0.3125rem #AAA; -} -/* Many phones are 320 or 360px, so make sure images are a proper aspect ratio in those cases */ -.header-section.has-img .intro-header.no-img { - display: none; -} -@media (max-width: 365px) { - .header-section.has-img .intro-header.no-img { - display: block; - } - .intro-header.big-img { - width: 100%; - height: 13.75rem; - } - .intro-header.big-img .page-heading, - .intro-header.big-img .post-heading { - display: none; - } - .header-section.has-img .big-img { - margin-bottom: 0; - } -} -@media (max-width: 325px) { - .intro-header.big-img { - height: 12.5rem; - } -} - #header-gh-btns { margin-bottom: 0.9375rem; } @@ -774,15 +799,16 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img { } .pagination .page-item .page-link { - font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-family: var(--header-font); text-transform: uppercase; font-size: 0.875rem; font-weight: 800; letter-spacing: 1px; padding: 0.625rem 0.3125rem; - background-color: #FFF; + background-color: var(--page-col); border-radius: 0; - color: {{ site.text-col | default: "#404040" }}; + color: var(--text-col); + padding: 0.75rem 1rem; } @media (min-width: 768px) { .pagination .page-item .page-link { @@ -791,9 +817,9 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img { } .pagination .page-item .page-link:hover, .pagination .page-item .page-link:focus { - color: #FFF; - border: 1px solid {{ site.hover-col | default: "#0085A1" }}; - background-color: {{ site.hover-col | default: "#0085A1" }}; + color: var(--page-col); + border: 1px solid var(--hover-col); + background-color: var(--hover-col); } /* --- Tables --- */ @@ -803,26 +829,23 @@ table { } table tr { border-top: 1px solid #cccccc; - background-color: #ffffff; + background-color: var(--page-col); margin: 0; padding: 0; } table tr:nth-child(2n) { background-color: #f8f8f8; } -table tr th { - font-weight: bold; - border: 1px solid #cccccc; - text-align: left; - margin: 0; - padding: 0.375rem 0.8125rem; -} +table tr th, table tr td { border: 1px solid #cccccc; text-align: left; margin: 0; padding: 0.375rem 0.8125rem; } +table tr th { + font-weight: bold; +} table tr th :first-child, table tr td :first-child { margin-top: 0; @@ -911,6 +934,10 @@ pre { margin-top: 1.875rem; } +#social-share-section a { + color: #fff; +} + /* --- Notification boxes --- */ .box-note, .box-warning, @@ -969,7 +996,7 @@ pre { max-width: 25%; border-width: 0.25rem; border-radius: 0.1875rem; - border-color: #808080; + border-color: var(--mid-col); } .blog-post blockquote { @@ -987,3 +1014,107 @@ pre { display: block; margin: 0 auto; } + +/* Search bar */ +#beautifuljekyll-search-overlay { + font-family: var(--header-font); + 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; + max-height: calc(100vh - 6.5rem); + overflow-y: auto; +} +#search-results-container a { + color: #fff; + text-decoration: none; +} +#search-results-container a:hover { + color: #fff; + text-decoration: underline; +} + +#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/data/searchcorpus.json b/assets/data/searchcorpus.json new file mode 100644 index 000000000000..9b0aecfa8b49 --- /dev/null +++ b/assets/data/searchcorpus.json @@ -0,0 +1,23 @@ +--- +layout: null +--- +[ +{% for post in site.posts %} +{ +"title" : "{% if post.title != "" %}{{ post.title | strip_html | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}", +"desc" : "{% if post.title != "" %}{{ post.title | strip_html | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}", +"category" : "{{ post.tags | join: ', ' }}", +"url" : "{{ site.baseurl }}{{ post.url | escape }}", +"date" : "{{ post.date | date: "%B %e, %Y" | default: "January 1, 1970" }}" +}, +{% endfor %} +{% for page in site.html_pages %}{% if page.title != "{title}" and page.title != "404 - Page not found" %} +{ +"title" : "{% if page.title != "" %}{{ page.title | strip_html | escape }}{% else %}{{ page.excerpt | strip_html | escape | strip }}{% endif %}", +"desc" : "{% if page.title != "" %}{{ page.title | strip_html | escape }}{% else %}{{ page.excerpt | strip_html | escape | strip }}{% endif %}", +"category" : "{% if page.tags %}{{ page.tags | join: ', ' }}{% else %}page{% endif %}", +"url" : "{{ site.baseurl }}{{ page.url }}", +"date" : "{{ page.date | date: '%B %e, %Y' | default: "January 1, 1970" }}" +}{% unless forloop.last %},{% endunless %} +{% endif %}{% endfor %} +] diff --git a/assets/img/hello_world.jpeg b/assets/img/hello_world.jpeg deleted file mode 100644 index 488f785bad34..000000000000 Binary files a/assets/img/hello_world.jpeg and /dev/null differ diff --git a/assets/img/install-steps.gif b/assets/img/install-steps.gif deleted file mode 100644 index 5381ace50cfe..000000000000 Binary files a/assets/img/install-steps.gif and /dev/null differ diff --git a/assets/js/beautifuljekyll.js b/assets/js/beautifuljekyll.js index bcddc6798998..c871dd76b0cd 100644 --- a/assets/js/beautifuljekyll.js +++ b/assets/js/beautifuljekyll.js @@ -1,6 +1,6 @@ -// Dean Attali / Beautiful Jekyll 2020 +// Dean Attali / Beautiful Jekyll 2023 -var BeautifulJekyllJS = { +let BeautifulJekyllJS = { bigImgEl : null, numImgs : null, @@ -27,6 +27,8 @@ var BeautifulJekyllJS = { // show the big header image BeautifulJekyllJS.initImgs(); + + BeautifulJekyllJS.initSearch(); }, initNavbar : function() { @@ -52,23 +54,23 @@ var BeautifulJekyllJS = { // 2fc73a3a967e97599c9763d05e564189 // set an initial image - var imgInfo = BeautifulJekyllJS.getImgInfo(); - var src = imgInfo.src; - var desc = imgInfo.desc; + const imgInfo = BeautifulJekyllJS.getImgInfo(); + const src = imgInfo.src; + const desc = imgInfo.desc; BeautifulJekyllJS.setImg(src, desc); // For better UX, prefetch the next image so that it will already be loaded when we want to show it - var getNextImg = function() { - var imgInfo = BeautifulJekyllJS.getImgInfo(); - var src = imgInfo.src; - var desc = imgInfo.desc; + const getNextImg = function() { + const imgInfo = BeautifulJekyllJS.getImgInfo(); + const src = imgInfo.src; + const desc = imgInfo.desc; - var prefetchImg = new Image(); + const prefetchImg = new Image(); prefetchImg.src = src; // if I want to do something once the image is ready: `prefetchImg.onload = function(){}` setTimeout(function(){ - var img = $("
    ").addClass("big-img-transition").css("background-image", 'url(' + src + ')'); + const img = $("
    ").addClass("big-img-transition").css("background-image", 'url(' + src + ')'); $(".intro-header.big-img").prepend(img); setTimeout(function(){ img.css("opacity", "1"); }, 50); @@ -91,9 +93,9 @@ var BeautifulJekyllJS = { }, getImgInfo : function() { - var randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1); - var src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum); - var desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum); + const randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1); + const src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum); + const desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum); return { src : src, @@ -108,6 +110,30 @@ 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(); + $("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(); + $("body").removeClass("overflow-hidden"); + } + }); } }; diff --git a/assets/js/staticman.js b/assets/js/staticman.js index b52708ff0161..9ecf188661f9 100644 --- a/assets/js/staticman.js +++ b/assets/js/staticman.js @@ -3,27 +3,25 @@ layout: null --- (function ($) { - var $comments = $('.js-comments'); - $('#new_comment').submit(function () { - var form = this; + const form = this; $(form).addClass('disabled'); {% assign sm = site.staticman -%} - var endpoint = '{{ sm.endpoint }}'; - var repository = '{{ sm.repository }}'; - var branch = '{{ sm.branch }}'; - let url = endpoint + repository + '/' + branch + '/comments'; - let data = $(this).serialize(); + const endpoint = '{{ sm.endpoint }}'; + const repository = '{{ sm.repository }}'; + const branch = '{{ sm.branch }}'; + const url = endpoint + repository + '/' + branch + '/comments'; + const data = $(this).serialize(); - var xhr = new XMLHttpRequest(); + const xhr = new XMLHttpRequest(); xhr.open("POST", url); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); xhr.onreadystatechange = function () { if(xhr.readyState === XMLHttpRequest.DONE) { - var status = xhr.status; + const status = xhr.status; if (status >= 200 && status < 400) { formSubmitted(); } else { diff --git a/beautiful-jekyll-theme.gemspec b/beautiful-jekyll-theme.gemspec index b7884d30c08d..9ce3530b26b0 100644 --- a/beautiful-jekyll-theme.gemspec +++ b/beautiful-jekyll-theme.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "beautiful-jekyll-theme" - spec.version = "5.0.0" + spec.version = "6.0.1" spec.authors = ["Dean Attali"] spec.email = ["daattali@gmail.com"] @@ -17,13 +17,15 @@ Gem::Specification.new do |spec| "documentation_uri" => "https://github.com/daattali/beautiful-jekyll#readme" } - spec.add_runtime_dependency "jekyll", "~> 3.8" + spec.add_runtime_dependency "jekyll", ">= 3.9.3" spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4" spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1" - spec.add_runtime_dependency "kramdown", "~> 2.3.0" + spec.add_runtime_dependency "kramdown", "~> 2.3" + spec.add_runtime_dependency "webrick", "~> 1.8" spec.add_runtime_dependency "jekyll-redirect-from", "~> 0.16" spec.add_development_dependency "bundler", ">= 1.16" spec.add_development_dependency "rake", "~> 12.0" + spec.add_development_dependency "appraisal", "~> 2.5" end diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 36babf857ba0..000000000000 --- a/docs/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - Beautiful Jekyll - - - - - - - diff --git a/feed.xml b/feed.xml index 57f7ad56359a..527816ea75fc 100644 --- a/feed.xml +++ b/feed.xml @@ -10,14 +10,14 @@ layout: null {% if site.rss-description %} {{ site.rss-description | xml_escape }} {% endif %} - {{ '' | absolute_url }} + {{ '/' | absolute_url }} {% assign excerpt_length = site.excerpt_length | default: 50 %} {% for post in site.posts limit:20 %} - {{ post.title | xml_escape }} + {{ post.title | strip_html | xml_escape }} - {% if post.subtitle %}{{ post.subtitle | xml_escape }} - {% endif %} + {% if post.subtitle %}{{ post.subtitle | strip_html | xml_escape }} - {% endif %} {{ post.content | strip_html | xml_escape | truncatewords: excerpt_length }} {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }} diff --git a/index.html b/index.html deleted file mode 100644 index 25c45c3ab1fa..000000000000 --- a/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Beautiful Jekyll - - - - - diff --git a/index.md b/index.md index 944c3eea3549..9f0a8576623a 100644 --- a/index.md +++ b/index.md @@ -20,7 +20,6 @@ hero: true
    -
    diff --git a/tags.html b/tags.html index 04c193908ec9..55a3c6d4cb66 100644 --- a/tags.html +++ b/tags.html @@ -25,7 +25,7 @@

    {%- for post in site.tags[tag] -%}
    - {{- post.title -}} + {{- post.title | strip_html -}}