Compare commits

...

86 commits

Author SHA1 Message Date
20e3c059d7
forgejo: upload generated site
All checks were successful
/ build (push) Successful in 37s
2025-05-26 02:51:58 -04:00
564ad9fd41
forgejo: build but do not deploy on branch
All checks were successful
/ build (push) Successful in 48s
2025-05-26 02:40:47 -04:00
a6fe22b283
Merge tag '6.0.1' 2025-05-26 02:35:01 -04:00
Dean Attali
05f56a8bb5 bump hotfix version to allow gems to use any jekyll version and to use webrick in runtime rather than only in dev 2023-06-08 06:39:18 +00:00
Dean Attali
a87de507a3 Merge branch 'master' of https://github.com/daattali/beautiful-jekyll 2023-06-08 06:14:33 +00:00
Dean Attali
5d86c59455 update gemspec to version 6 2023-06-08 06:14:28 +00:00
Dean Attali
8e2379128e
Update CHANGELOG.md 2023-06-08 02:04:40 -04:00
Dean Attali
9297882f4c format changelog for v6 2023-06-08 06:01:09 +00:00
Dean Attali
20103f7b85 Merge branch 'master' of https://github.com/daattali/beautiful-jekyll 2023-06-08 05:52:54 +00:00
Dean Attali
edb40733d3 show warning message if old Universal Analytics is used 2023-06-08 05:52:36 +00:00
Dean Attali
bbbf0e2833
Update README.md 2023-06-07 15:42:40 -04:00
Dean Attali
621edf8df2
Update README.md 2023-06-07 15:41:58 -04:00
Dean Attali
3dd511a0b0
Update README.md 2023-06-07 15:41:08 -04:00
Dean Attali
534c907822 add webrick to gemspec because it isnt included in ruby3 anymore 2023-06-07 17:59:06 +00:00
Dean Attali
76509fe90f
Update beautifuljekyll.js 2023-06-07 13:44:28 -04:00
Dean Attali
737e7f8f34
Update base.html 2023-06-07 13:42:29 -04:00
Dean Attali
f13fc8b200
Update LICENSE 2023-06-07 13:41:17 -04:00
Dean Attali
ea0abf54b1 update gem versions to what GitHub Pages uses 2023-06-07 17:34:04 +00:00
Dean Attali
179c3c1ea5 update readme 2023-06-07 17:22:54 +00:00
Dean Attali
47e87ef720 replace var with let or const in javascript; fixes #1048 2023-06-07 17:13:42 +00:00
Dean Attali
3e6689f0af
Update README.md 2023-06-07 09:59:03 -04:00
Dean Attali
c4d5186404
Update README.md 2023-06-07 01:33:04 -04:00
Dean Attali
25d21173b6
Update README.md 2023-06-07 01:30:57 -04:00
Dean Attali
5c42a4f570
Update README.md 2023-06-07 01:29:58 -04:00
Dean Attali
ba6869cf48
Update README.md 2023-06-07 01:28:09 -04:00
Dean Attali
b0343b65e2
Update README.md 2023-06-05 18:35:32 -04:00
Dean Attali
95a40026c4
Update README.md 2023-06-05 17:15:24 -04:00
Dean Attali
1bf5e2d580
remove sponsor 2023-06-05 14:36:58 -04:00
Dean Attali
2ab9d0ce76
Add files via upload 2023-06-05 12:00:26 -04:00
Dean Attali
add3a9100d
Update README.md 2023-06-05 11:58:36 -04:00
Dean Attali
f8627d6680
new github workflow instructions 2023-06-05 11:56:46 -04:00
Dean Attali
85bee90334
Update README.md 2023-06-05 11:09:18 -04:00
Dean Attali
56c364d553
Delete index.html 2023-06-04 19:16:22 -04:00
Dean Attali
44539867e7
remove cover image 2023-06-04 18:16:42 -04:00
Nico is LOST
8c1493387a
Discord supports old and new invite code styles (#1135) 2023-05-15 01:16:48 -04:00
Dean Attali
cdfd011f1a
google analytics config setting: encourage gtag, discourage google_analytics (fixes #1096) 2023-04-30 11:54:03 -04:00
Dean Attali
e1facea35a
update actions/checkout to v3 because of node deprecation warning; fixes #1099 2023-02-27 02:53:21 -05:00
Dean Attali
848d04c90a
trigger GH actions 2023-01-06 16:56:10 -05:00
Vincent Tam
6ad1fcd87b
replaced var with const (#1049) 2022-10-16 02:37:33 -04:00
Dean Attali
685cf73c9d
Add navbar-var-length config parameter (#1011)
* add navbar-var-length config option

* fix endif -> endunless
2022-07-20 22:53:17 -04:00
Dean Attali
0859158885
more readable format for config file 2022-07-20 18:27:47 -04:00
Dean Attali
e613426d33
Update CHANGELOG.md 2022-07-20 01:25:03 -04:00
Arnaud Dagnelies
d609efe427
Fixes #765 (#1010)
* Fixes #765

* Update beautifuljekyll.css

* Update beautifuljekyll.css

Co-authored-by: Dean Attali <dean@attalitech.com>
2022-07-20 01:23:09 -04:00
Dean Attali
33032c4895 add 'edit this page' button; closes #1004 2022-07-07 18:00:37 +00:00
Dean Attali
f2c2a4b810
Update CHANGELOG.md 2022-07-04 11:53:29 -04:00
Jefferson Bledsoe
5253e3866c
Markup home page content lists and tags as lists (#950)
* Markup home page content lists and tags as lists

* Fix styling after markup changes

* Fix typo

* fix a couple visual issues

* make sure the divider line between posts shows up

Co-authored-by: Dean Attali <dean@attalitech.com>
2022-07-04 11:51:19 -04:00
Dean Attali
5420dbd899
add news item for hacerrank 2022-05-02 01:22:00 -04:00
tanersekmen
99d1a12a73
added hackerrank social media network (#978) 2022-05-02 01:21:07 -04:00
Dean Attali
8df19d9bb1
add news item for kaggle social media 2022-04-03 18:26:43 -04:00
洪健翔 Hung, Chien-Hsiang
5af88cf0e3
adding kaggle social link (#961)
* Update social-networks-links.html

* Update _config.yml
2022-04-03 18:25:18 -04:00
Dean Attali
cdd260f08c
add commentbox to readme 2022-04-01 20:02:09 -04:00
Dean Attali
5bec6a6177
add commentbox to readme 2022-04-01 19:59:50 -04:00
Karsten Ng
ff07d468a5
Add New Comment options (#960)
* Init dev branch

* Fix dev branch

* Forgot to add commentbox.html

* Testing discussbot integration

* forgot comments.html

* remove my credentials

* Update _config.yml

Change comments to offer unambiguous descriptions of variables.

* remove discussbot

* Update CHANGELOG.md

Co-authored-by: Karsten Ng <7u9nazbc7@mozmail.com>
2022-04-01 19:57:03 -04:00
Stefan Leibfarth
a29203e260
Add Mastodon profile verification (#933)
See https://docs.joinmastodon.org/user/profile/#fields
2022-02-08 15:14:45 -05:00
Dean Attali
4201212002
Update CHANGELOG.md 2021-11-29 18:06:08 -05:00
Emhl
f31898b8d0
Add discord to supported social networks (#907)
* add discord to social-networks-links.html

* Update _config.yml

* Update Discord entry
2021-11-29 18:05:09 -05:00
Dean Attali
71824e5268
Update README.md 2021-11-04 12:21:08 -04:00
Dean Attali
5180092c45
Update README.md 2021-10-11 03:32:17 -04:00
Dean Attali
a817aff2e9
Update README.md 2021-10-11 03:30:09 -04:00
Dean Attali
f62dd5c8f9
Update README.md 2021-10-11 03:22:19 -04:00
Dean Attali
e63bab6e6b
Update README.md 2021-10-11 02:08:37 -04:00
Dean Attali
e1f8ff5546
Update README.md 2021-10-11 02:08:02 -04:00
Patrick Garziglia
b44c048cba
add giscus support (#888) 2021-10-10 12:26:30 -04:00
DoctorD90
757044f6ef
Added feature to customize hover links color in footer (#848) 2021-10-10 03:22:47 -04:00
Dean Attali
d0928cb455 breaking change: rss feed only generated if rss-description config exists; rss icon only shows if social-network-links.rss is true; closes #814 2021-10-10 07:12:58 +00:00
Dean Attali
ffb27515fe revert testing changes in posts 2021-10-10 06:36:40 +00:00
Dean Attali
505305ebe7 correctly escape titles subtitles and excerpts in all contexts; fixes #856 2021-10-10 06:20:54 +00:00
Dean Attali
24e182b90e make long strings wrap lines instad of go offscreen; fix #787 2021-10-10 02:22:37 +00:00
Dean Attali
f6dd3dca5e
Update CHANGELOG.md 2021-10-09 22:04:32 -04:00
Vincent Tam
452f1e025e
IE & jQuery slim compatible Staticman JS (#782) 2021-10-09 22:02:32 -04:00
Dean Attali
85444cbac5
add loadview sponsor 2021-09-15 13:26:08 -07:00
Dean Attali
0fe5fabc9a
Update README.md 2021-08-25 15:32:29 -04:00
Dean Attali
419ade4a35
Update README.md 2021-08-25 15:20:56 -04:00
Dean Attali
30a757de47 search feature: make sure page scrollbar disappears when searching but a scrollbar for search items shows if needed 2021-05-30 20:19:44 +00:00
Dean Attali
fd1e03ae06
ui: make sure search results dont have underline until hovered 2021-05-30 16:06:02 -04:00
Dean Attali
711dd39059
Update CHANGELOG.md 2021-05-30 16:01:56 -04:00
Dean Attali
950c341739 add search to the navbar using 'post_search' config param 2021-05-30 19:54:17 +00:00
Leedan
99fdbbd593
Include Reddit in share options of posts (#815) 2021-05-17 03:00:46 -04:00
Ari Kalfus
a531737107
Add support for Cloudflare analytics (#798) 2021-04-20 00:52:34 -04:00
Dean Attali
d1806ad223
Update CHANGELOG.md 2021-03-11 17:34:41 -05:00
Emaleth
7248ed9911
Itch.io social link (#788) 2021-03-11 17:33:59 -05:00
Diksha Verma
76cd649799
Adding option for Medium Social Link at footer (#784) 2021-02-24 11:39:39 -05:00
Dean Attali
a0cf83da4a
Update CHANGELOG.md 2021-02-04 11:30:56 -05:00
Vincent Tam
1765677587
Remove references to any public Staticman API instance (#775) 2021-02-04 11:28:36 -05:00
Dean Attali
fe0a48eea0
Update README.md 2021-01-17 22:19:17 -05:00
Dean Attali
f731a90a09
Update README.md 2021-01-17 20:33:33 -05:00
26 changed files with 605 additions and 162 deletions

View file

@ -1,7 +1,5 @@
on:
push:
branches:
- main
push
jobs:
build:
@ -18,6 +16,7 @@ jobs:
- name: Build site
run: jekyll build --future --config _config.yml
- name: Deploy site
if: github.ref == 'refs/heads/main'
run: |
echo "${{ secrets.SERVER_SSH_KEY }}" >> /tmp/id_ecdsa
chmod 600 /tmp/id_ecdsa
@ -27,3 +26,7 @@ jobs:
_site/ \
deploy@${{ secrets.SERVER_NAME }}:/
rm -f /tmp/id_ecdsa
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: yamatotoma.to.zip
path: _site/

View file

@ -1,13 +1,44 @@
## Unreleased version
## v6.0.1 (2023-06-08)
- 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
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.
#### 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)
@ -54,7 +85,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

View file

@ -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

View file

@ -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: YameteTomete Translation Cooperative
@ -11,7 +15,9 @@ title: YameteTomete Translation Cooperative
# Your name to show in the footer
author: YameteTomete
###############################################
# --- List of links in the navigation bar --- #
###############################################
url: https://yamatotoma.to
@ -23,7 +29,9 @@ navbar-links:
- Good Job! Media: "https://www.goodjobmedia.com/"
Discord: "https://discord.gg/fpQZQ8g"
################
# --- 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
@ -37,7 +45,9 @@ round-avatar: true
#title-img: /path/to/image
#####################################
# --- Footer social media links --- #
#####################################
# Select the social network links that you want to show in the footer.
# Uncomment the links you want to show and add your information to each one.
@ -48,6 +58,9 @@ social-network-links:
twitter: YameteTomete
# patreon: DeanAttali
# youtube: c/daattali
# email: "someone@example.com"
# rss: true # remove this line if you don't want to show an RSS link at the bottom
# medium: yourname
# reddit: yourname
# linkedin: daattali
# xing: yourname
@ -65,12 +78,17 @@ social-network-links:
bluesky: yametetomete.bsky.social
# ORCID: your ORCID ID
# google-scholar: your google scholar
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# kaggle: yourname
# hackerrank: yourname
# If you want to show a link to an RSS in the footer, add the site description here.
# If you don't want to show an RSS link, remove the following line.
# If you want your website to generate an RSS feed, provide a description
# The URL for the feed will be https://<your_website>/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:
@ -95,10 +113,23 @@ excerpt_separator: <!-- excerpt-end -->
# Whether or not to show a list of tags below each post preview in the feed page
feed_show_tags: false
# Add a search button to the navbar
post_search: true
# Add a button in the footer to edit the current page. Only works if your website is hosted on GitHub
edit_page_button: true
# Allow sub-menu items (second-level navigation menu items) to be longer than the top-level menu
# If this setting is off, then long sub-menu words might get cut off
# See https://github.com/daattali/beautiful-jekyll/issues/765 to understand the issue this setting can solve
navbar-var-length: false
# 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
@ -112,6 +143,7 @@ hover-col: "#0085A1"
footer-col: "#EAEAEA"
footer-text-col: "#777777"
footer-link-col: "#404040"
footer-hover-col: "#0085A1"
# Alternatively, the navbar, footer, and page background can be set to an image
# instead of colour
@ -131,13 +163,15 @@ footer-link-col: "#404040"
#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: ""
# Google Tag Manager ID
#gtm: ""
@ -150,7 +184,14 @@ footer-link-col: "#404040"
# 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: ""
@ -158,6 +199,9 @@ footer-link-col: "#404040"
# 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
@ -168,21 +212,39 @@ 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/<username>/<repo-name>`.
# 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://<your-api>/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/<your-site-secret>
# endpoint : # URL of your deployment, with a trailing slash eg. "https://<your-api>/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://<your-own-api>/v3/encrypt/<your-site-secret>
# To use giscus comments:
# (0) Uncomment the following giscus section, (1) Enable Discussions in your GitHub repository,
# (2) Install the giscus app in your repository (details at https://giscus.app),
# (3) Fill in *all* the parameters below
# See more details about giscus and each of the following parameters at https://giscus.app
#giscus:
# hostname: giscus.app # Replace with your giscus instance's hostname if self-hosting
# repository: # GitHub username/repository eg. "daattali/beautiful-jekyll"
# repository-id: # ID of your repository, retrieve this info from https://giscus.app
# category: Announcements # Category name of your GitHub Discussion posts
# category-id: # ID of your category, retrieve this info from https://giscus.app
# mapping: pathname
# reactions-enabled: 1
# emit-metadata: 0
# theme: light
################
# --- Misc --- #
################
# Ruby Date Format to show dates of posts
date_format: "%B %-d, %Y"
@ -190,7 +252,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: "Etc/UTC"

View file

@ -0,0 +1,8 @@
{% if site.cloudflare_analytics %}
<!-- Cloudflare Web Analytics -->
<script defer
src='https://static.cloudflareinsights.com/beacon.min.js'
data-cf-beacon='{"token": "{{ site.cloudflare_analytics}}"}'>
</script>
<!-- End Cloudflare Web Analytics -->
{% endif %}

View file

@ -0,0 +1,7 @@
{% if site.commentbox %}
<div class="commentbox"></div>
<script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>
<script>commentBox('{{ site.commentbox }}')</script>
{% endif %}

View file

@ -3,4 +3,6 @@
{% include fb-comment.html %}
{% include staticman-comments.html %}
{% include utterances-comment.html %}
{% include giscus-comment.html %}
{% include commentbox.html %}
{% endif %}

View file

@ -30,6 +30,12 @@
<a href="http://{{- site.matomo.uri -}}/index.php?module=CoreAdminHome&action=optOut" target="_blank" class="text_muted">Do-not-Track</a>
{% endif %}
{% endif%}
{% if site.edit_page_button and site.github.repository_url %}
&nbsp;&bull;&nbsp;
<a title="Edit this page on GitHub" href="{{ site.github.repository_url }}/edit/{{ site.github.source.branch }}/{{ page.path }}" class="text_muted">Edit page</a>
{% endif%}
</p>
{% unless site.remove-ads %}<p class="theme-by text-muted">
Powered by

View file

@ -0,0 +1,16 @@
{% if site.giscus.repository and site.giscus.hostname %}
<script src="https://{{ site.giscus.hostname }}/client.js"
data-repo="{{ site.giscus.repository }}"
data-repo-id="{{ site.giscus.repository-id }}"
data-category="{{ site.giscus.category }}"
data-category-id="{{ site.giscus.category-id }}"
data-mapping="{{ site.giscus.mapping }}"
data-reactions-enabled="{{ site.giscus.reactions-enabled }}"
data-emit-metadata="{{ site.giscus.emit-metadata }}"
data-theme="{{ site.giscus.theme }}"
crossorigin="anonymous"
async>
</script>
{% endif %}

View file

@ -1,5 +1,17 @@
{% if site.google_analytics %}
<!-- Google Analytics -->
{% unless site.gtag %}
<div id="bj-ganalytics-deprecated-msg" style="position: fixed; background: #b90404; bottom: 0; width: 100%; z-index: 10000; color: #f0f0f0; text-align: center;">
<div title="Close" onclick="$(this).parent().remove()" style="position: absolute; right: 5px; top: 0; font-size: 1.5em; line-height: 1; cursor: pointer;">&times;</div>
<div style="max-width: 800px; margin: auto; font-size: 1.1em">
This website is using outdated Google Analytics
<details style="font-size: 0.8em; margin-bottom: 5px;">
<summary>More info</summary>
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 <code>google_analytics</code> property in the website's config file, and optionally replace it with the new <code>gtag</code> property.
</details>
</div>
</div>
{% endunless %}
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {

View file

@ -39,11 +39,14 @@
<meta name="keywords" content="{{ site.keywords }}">
{% endif %}
{% if site.rss-description %}
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | absolute_url }}">
{% endif %}
{% 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 %}

View file

@ -27,13 +27,13 @@
<div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<div class="{{ include.type }}-heading">
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
<h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1>
{% if page.subtitle %}
{% if include.type == "page" %}
<hr class="small">
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
{% else %}
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
{% endif %}
{% endif %}
@ -61,13 +61,13 @@
<div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<div class="{{ include.type }}-heading">
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
<h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1>
{% if page.subtitle %}
{% if include.type == "page" %}
<hr class="small">
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
{% else %}
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
{% endif %}
{% endif %}

View file

@ -16,7 +16,7 @@
{%- if link[1].first %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ link[0] }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
{%- for childlink in link[1] -%}
{%- for linkparts in childlink %}
<a class="dropdown-item" href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
@ -30,6 +30,14 @@
</li>
{%- endif -%}
{%- endfor -%}
{% if site.post_search %}
<li class="nav-item">
<a class="nav-link" id="nav-search-link" href="#" title="Search">
<span id="nav-search-icon" class="fa fa-search"></span>
<span id="nav-search-text">Search</span>
</a>
</li>
{%- endif -%}
</ul>
</div>
@ -50,3 +58,5 @@
{% endif %}
</nav>
{% include search.html %}

39
_includes/search.html Normal file
View file

@ -0,0 +1,39 @@
{% if site.post_search %}
<div id="beautifuljekyll-search-overlay">
<div id="nav-search-exit" title="Exit search"></div>
<input type="text" id="nav-search-input" placeholder="Search">
<ul id="search-results-container"></ul>
<script src="https://unpkg.com/simple-jekyll-search@latest/dest/simple-jekyll-search.min.js"></script>
<script>
var searchjson = '[ \
{% for post in site.posts %} \
{ \
"title" : "{% 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 }}", \
"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 %}", \
"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 %} \
]';
searchjson = JSON.parse(searchjson);
var sjs = SimpleJekyllSearch({
searchInput: document.getElementById('nav-search-input'),
resultsContainer: document.getElementById('search-results-container'),
json: searchjson
});
</script>
</div>
{% endif %}

View file

@ -1,6 +1,6 @@
<ul class="list-inline text-center footer-links">
{%- if site.rss-description -%}
{%- if site.social-network-links.rss and site.rss-description -%}
<li class="list-inline-item">
<a href="{{ '/feed.xml' | relative_url }}" title="RSS">
<span class="fa-stack fa-lg" aria-hidden="true">
@ -230,7 +230,7 @@
{%- if site.social-network-links.mastodon -%}
<li class="list-inline-item">
<a href="https://{{ site.social-network-links.mastodon }}" title="Mastodon">
<a rel="me" href="https://{{ site.social-network-links.mastodon }}" title="Mastodon">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-mastodon fa-stack-1x fa-inverse"></i>
@ -287,5 +287,69 @@
</a>
</li>
{%- endif -%}
{%- if site.social-network-links.medium -%}
<li class="list-inline-item">
<a href="https://medium.com/@{{ site.social-network-links.medium }}" title="Medium">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-medium fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Medium</span>
</a>
</li>
{%- endif -%}
{%- if site.social-network-links.itchio -%}
<li class="list-inline-item">
<a href="https://{{ site.social-network-links.itchio }}.itch.io/" title="Itchio">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-itch-io fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Itchio</span>
</a>
</li>
{%- endif -%}
{%- if site.social-network-links.discord -%}
{% assign discord_start = site.social-network-links.discord | split: "/" | first -%}
{% unless discord_start == 'users' or discord_start == 'invite' -%}
{% assign discord_url_prefix = 'invite/' -%}
{% endunless -%}
<li class="list-inline-item">
<a href="https://discord.com/{{discord_url_prefix}}{{site.social-network-links.discord}}" title="Discord">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-discord fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Discord</span>
</a>
</li>
{%- endif -%}
{%- if site.social-network-links.kaggle -%}
<li class="list-inline-item">
<a href="https://www.kaggle.com/{{ site.social-network-links.kaggle }}" title="Kaggle">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-kaggle fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Kaggle</span>
</a>
</li>
{%- endif -%}
{%- if site.social-network-links.hackerrank -%}
<li class="list-inline-item">
<a href="https://www.hackerrank.com/{{ site.social-network-links.hackerrank }}" title="Hackerrank">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-hackerrank fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Hackerrank</span>
</a>
</li>
{%- endif -%}
</ul>

View file

@ -11,7 +11,7 @@
<span class="sr-only">Share: </span>
{% if site.share-links-active.twitter %}
<a href="https://twitter.com/intent/tweet?text={{ page.title | url_encode }}&url={{ page.url | absolute_url | url_encode }}"
<a href="https://twitter.com/intent/tweet?text={{ page.title | strip_html | url_encode }}&url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-twitter" title="Share on Twitter">
<span class="fab fa-fw fa-twitter" aria-hidden="true"></span>
<span class="sr-only">Twitter</span>
@ -42,6 +42,14 @@
</a>
{% endif %}
{% if site.share-links-active.reddit %}
<a href="https://www.reddit.com/submit?url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-reddit" title="Share on Reddit">
<span class="fab fa-fw fa-reddit" aria-hidden="true"></span>
<span class="sr-only">Reddit</span>
</a>
{% endif %}
</section>
{% endif %}

View file

@ -21,7 +21,7 @@ common-js:
<!DOCTYPE html>
<html lang="{{ page.language | default: site.language | default: 'en' }}">
<!-- Beautiful Jekyll 5.0.0 | Copyright Dean Attali 2020 -->
<!-- Beautiful Jekyll 6.0.1 | Copyright Dean Attali 2023 -->
{% include head.html %}
<body>

View file

@ -6,88 +6,96 @@ layout: page
{% assign posts = paginator.posts | default: site.posts %}
<div class="posts-list">
<!-- role="list" needed so that `list-style: none` in Safari doesn't remove the list semantics -->
<ul class="posts-list list-unstyled" role="list">
{% for post in posts %}
<article class="post-preview">
<li class="post-preview">
<article>
{%- 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 != "" %}
<div class="post-image post-image-normal">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
{% endcapture %}
{% assign thumbnail=thumbnail | strip %}
{% if site.feed_show_excerpt == false %}
{% if thumbnail != "" %}
<div class="post-image post-image-normal">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
{% endif %}
<a href="{{ post.url | absolute_url }}">
<h2 class="post-title">{{ post.title }}</h2>
{% if post.subtitle %}
<h3 class="post-subtitle">
{{ post.subtitle }}
</h3>
{% endif %}
</a>
<p class="post-meta">
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
Posted on {{ post.date | date: date_format }}
</p>
<a href="{{ post.url | absolute_url }}">
<h2 class="post-title">{{ post.title | strip_html }}</h2>
{% if thumbnail != "" %}
<div class="post-image post-image-small">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
{% if post.subtitle %}
<h3 class="post-subtitle">
{{ post.subtitle | strip_html }}
</h3>
{% endif %}
</a>
</div>
{% endif %}
{% unless site.feed_show_excerpt == false %}
{% if thumbnail != "" %}
<div class="post-image post-image-short">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
<p class="post-meta">
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
Posted on {{ post.date | date: date_format }}
</p>
<div class="post-entry">
{% 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 %}
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read&nbsp;More]</a>
{% if thumbnail != "" %}
<div class="post-image post-image-small">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
</div>
{% endunless %}
{% if site.feed_show_tags != false and post.tags.size > 0 %}
<div class="blog-tags">
<span>Tags:</span>
{% for tag in post.tags %}
<a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
{% endfor %}
</div>
{% endif %}
{% unless site.feed_show_excerpt == false %}
{% if thumbnail != "" %}
<div class="post-image post-image-short">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
</article>
<div class="post-entry">
{% 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 %}
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read&nbsp;More]</a>
{% endif %}
</div>
{% endunless %}
{% if site.feed_show_tags != false and post.tags.size > 0 %}
<div class="blog-tags">
<span>Tags:</span>
<!-- role="list" needed so that `list-style: none` in Safari doesn't remove the list semantics -->
<ul class="d-inline list-inline" role="list">
{% for tag in post.tags %}
<li class="list-inline-item">
<a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</article>
</li>
{% endfor %}
</div>
</ul>
{% if paginator.total_pages > 1 %}
<ul class="pagination main-pager">

View file

@ -67,12 +67,12 @@ layout: base
<ul class="pagination blog-pager">
{% if page.previous.url %}
<li class="page-item previous">
<a class="page-link" href="{{ page.previous.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">&larr; Previous Post</a>
<a class="page-link" href="{{ page.previous.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title | strip_html | xml_escape}}">&larr; Previous Post</a>
</li>
{% endif %}
{% if page.next.url %}
<li class="page-item next">
<a class="page-link" href="{{ page.next.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">Next Post &rarr;</a>
<a class="page-link" href="{{ page.next.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title | strip_html | xml_escape}}">Next Post &rarr;</a>
</li>
{% endif %}
</ul>

View file

@ -20,6 +20,7 @@ body {
background-image: url({{ site.page-img | relative_url }});
background-attachment: fixed;
{% endif %}
overflow-wrap: break-word;
}
p {
line-height: 1.5;
@ -246,22 +247,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: {{ site.navbar-col | default: "#EAEAEA" }};
text-decoration: none !important;
border-width: 0 1px 1px 1px;
font-weight: normal;
color: {{ site.navbar-text-col | default: "#404040" }};
{% unless site.navbar-var-length %}
white-space: normal;
{% endunless %}
}
@media (min-width: 1200px) {
@ -274,6 +281,10 @@ img {
border: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }};
border-width: 0 1px 1px;
}
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item:first-child {
border-top-width: 1px;
}
}
@media (max-width: 1199px) {
@ -388,6 +399,11 @@ footer a {
color: {{ site.footer-link-col | default: "#404040" }};
}
footer a:hover,
footer a:focus {
color: {{ site.footer-hover-col | default: "#0085A1" }};
}
footer .list-inline {
margin: 0;
padding: 0;
@ -426,6 +442,10 @@ footer .footer-custom-content {
/* --- Post preview (feed) --- */
.posts-list {
margin: 0;
}
.post-preview {
padding: 1.25rem 0;
border-bottom: 1px solid #eee;
@ -556,6 +576,10 @@ footer .footer-custom-content {
opacity: 0.8;
}
.blog-tags .list-inline-item {
margin-right: 0;
}
.blog-tags a {
color: {{ site.text-col | default: "#404040" }};
text-decoration: none;
@ -993,3 +1017,104 @@ 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;
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;
}
}

View file

@ -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 = $("<div></div>").addClass("big-img-transition").css("background-image", 'url(' + src + ')');
const img = $("<div></div>").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");
}
});
}
};

View file

@ -3,40 +3,51 @@ 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 | default: "https://staticman3.herokuapp.com/v3/entry/github/" }}';
var repository = '{{ sm.repository }}';
var branch = '{{ sm.branch }}';
const endpoint = '{{ sm.endpoint }}';
const repository = '{{ sm.repository }}';
const branch = '{{ sm.branch }}';
const url = endpoint + repository + '/' + branch + '/comments';
const data = $(this).serialize();
$.ajax({
type: $(this).attr('method'),
url: endpoint + repository + '/' + branch + '/comments',
data: $(this).serialize(),
contentType: 'application/x-www-form-urlencoded',
success: function (data) {
$('#comment-form-submit').addClass('d-none');
$('#comment-form-submitted').removeClass('d-none');
$('.page__comments-form .js-notice').removeClass('alert-danger');
$('.page__comments-form .js-notice').addClass('alert-success');
showAlert('success');
},
error: function (err) {
console.log(err);
$('#comment-form-submitted').addClass('d-none');
$('#comment-form-submit').removeClass('d-none');
$('.page__comments-form .js-notice').removeClass('alert-success');
$('.page__comments-form .js-notice').addClass('alert-danger');
showAlert('failure');
$(form).removeClass('disabled');
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) {
const status = xhr.status;
if (status >= 200 && status < 400) {
formSubmitted();
} else {
formError();
}
}
});
};
function formSubmitted() {
$('#comment-form-submit').addClass('d-none');
$('#comment-form-submitted').removeClass('d-none');
$('.page__comments-form .js-notice').removeClass('alert-danger');
$('.page__comments-form .js-notice').addClass('alert-success');
showAlert('success');
}
function formError() {
$('#comment-form-submitted').addClass('d-none');
$('#comment-form-submit').removeClass('d-none');
$('.page__comments-form .js-notice').removeClass('alert-success');
$('.page__comments-form .js-notice').addClass('alert-danger');
showAlert('failure');
$(form).removeClass('disabled');
}
xhr.send(data);
return false;
});

View file

@ -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,11 +17,12 @@ 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.2"
spec.add_runtime_dependency "webrick", "~> 1.8"
spec.add_development_dependency "bundler", ">= 1.16"
spec.add_development_dependency "rake", "~> 12.0"

View file

@ -15,9 +15,9 @@ layout: null
{% assign excerpt_length = site.excerpt_length | default: 50 %}
{% for post in site.posts limit:20 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<title>{{ post.title | strip_html | xml_escape }}</title>
<description>
{% 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 }}
</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>

View file

@ -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

View file

@ -25,7 +25,7 @@ title: 'Tag Index'
<div class="post-list">
{%- for post in site.tags[tag] -%}
<div class="tag-entry">
<a href="{{ post.url | relative_url }}">{{- post.title -}}</a>
<a href="{{ post.url | relative_url }}">{{- post.title | strip_html -}}</a>
<div class="entry-date">
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: date_format -}}</time>
</div>