Skip to content

Add sidenote examples, related posts and giscus to distill posts #3103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2025

Conversation

abhilesh
Copy link
Contributor

This PR adds a few stylistic improvements to the distill-style blog posts:

a-distill-style-blog-post-You-R-Name.mp4

Fix JQuery loading for footnotes and citations formatting on distill posts
Fix parity between al-folio post and distill post
- Add related posts to distill post
- Fix formatting for giscus widgets on distill post
Copy link

netlify bot commented Mar 30, 2025

Deploy Preview for relaxed-lollipop-b6bc17 ready!

Name Link
🔨 Latest commit 18d1b3e
🔍 Latest deploy log https://app.netlify.com/sites/relaxed-lollipop-b6bc17/deploys/67eb7d3ba6aa8a0008db02cf
😎 Deploy Preview https://deploy-preview-3103--relaxed-lollipop-b6bc17.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -3170,7 +3170,7 @@
var def = {};
def[tagName] = {
pattern: RegExp(
/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () {
/(<__[^<]*?>)(?:<!\[CDATA\[[^<]*?\]\]>\s*|[^<])*?(?=<\/__>)/.source.replace(/__/g, function () {

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '<__><!\[cdata\[' and containing many repetitions of '\]\]>\]\]><!\[cdata\['.
@@ -3170,7 +3170,7 @@
var def = {};
def[tagName] = {
pattern: RegExp(
/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () {
/(<__[^<]*?>)(?:<!\[CDATA\[[^<]*?\]\]>\s*|[^<])*?(?=<\/__>)/.source.replace(/__/g, function () {

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '<__><!\[cdata\[\]\]>' and containing many repetitions of ' <!\[cdata\[\]\]>'.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds stylistic improvements and examples for distill-style blog posts. Key changes include:

  • Adding an overrides.js script to update footnote and citation styles via shadow DOM manipulation.
  • Introducing a new “Sidenotes” section in a sample blog post demonstrating two methods (using the tag and the l-gutter class) for displaying sidenotes.
  • Updating content to showcase equations in sidenotes.

Reviewed Changes

Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.

File Description
assets/js/distillpub/overrides.js Introduces JavaScript to override styles for footnotes and citations in alignment with the global theme.
_posts/2018-12-22-distill.md Adds a Sidenotes section with HTML examples to illustrate alternative styling options.
Files not reviewed (4)
  • _includes/distill_scripts.liquid: Language not supported
  • _includes/giscus.liquid: Language not supported
  • _includes/related_posts.liquid: Language not supported
  • _layouts/distill.liquid: Language not supported

@george-gca
Copy link
Collaborator

Just saw that there was the possibility to ask copilot for review and tried, but you can ignore it. I was just testing. I am kind with my hands full now, but I will try to review this on the weekend.

Copy link

stale bot commented May 31, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 31, 2025
@abhilesh
Copy link
Contributor Author

abhilesh commented Jun 2, 2025

Is this still useful @george-gca?

@stale stale bot removed the wontfix label Jun 2, 2025
@george-gca
Copy link
Collaborator

Sorry, I've been under a really tight constraint, so I haven't had the time to properly review PRs with more code changes. I will try to do this weekend without failure.

@george-gca george-gca merged commit 47b982b into alshedivat:main Jul 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

distill: equations in footnote or a pop-up window
2 participants