From c43989d1c8a5520ae52d41f04e83e0c4759fc1a1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 22 Mar 2024 06:28:00 +0100 Subject: [PATCH 1/3] Added Whatsapp to social network (#1299) --- _config.yml | 1 + _includes/social-networks-links.html | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 192ea6adb9ca..8df4e97c85f1 100644 --- a/_config.yml +++ b/_config.yml @@ -57,6 +57,7 @@ social-network-links: twitter: daattali patreon: DeanAttali youtube: "@daattali" + whatsapp: 15551212 # medium: yourname # reddit: yourname # linkedin: daattali diff --git a/_includes/social-networks-links.html b/_includes/social-networks-links.html index 41fda50971df..ba5ff2324a3e 100644 --- a/_includes/social-networks-links.html +++ b/_includes/social-networks-links.html @@ -63,6 +63,18 @@ {%- endif -%} + {%- if network[0] == "whatsapp" -%} +
  • + + + Whatsapp + +
  • + {%- endif -%} + {%- if network[0] == "github" -%}
  • @@ -370,4 +382,4 @@ {%- endfor -%} -{% endif %} \ No newline at end of file +{% endif %} From fca5813a8901f7b5f7bc29d3ce5eb232df6ac451 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Fri, 22 Mar 2024 01:29:00 -0400 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f229cab3547..c415f9081ed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - 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 hovering over search results showed the text "{desc}" (#1156) -- Added social network links for GitLab, Bluesky (#1168, #1218) +- Added social network links for GitLab, Bluesky, Whatsapp (#1168, #1218, #1299) - 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) From 49b2d8b7a0a110b40f11679f5a26bc299660ec90 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Fri, 29 Mar 2024 21:53:28 +0000 Subject: [PATCH 3/3] add mathjax YAML parameter to support mathjax expressions; closes #195 --- CHANGELOG.md | 1 + README.md | 5 +++-- _includes/head.html | 1 + _includes/mathjax.html | 12 ++++++++++++ _posts/2020-02-28-sample-markdown.md | 4 ++++ 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 _includes/mathjax.html diff --git a/CHANGELOG.md b/CHANGELOG.md index c415f9081ed3..600a4ffd77fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 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) diff --git a/README.md b/README.md index 11623b35f06d..1ecc6e559785 100644 --- a/README.md +++ b/README.md @@ -132,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 @@ -146,6 +146,7 @@ tags | List of tags to categorize the post. Separate the tags with commas 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, 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 @@ -210,7 +211,7 @@ Congratulations on making it this far! You now have all the tools to easily buil - 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. +- 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. diff --git a/_includes/head.html b/_includes/head.html index 55a3190398e2..fa0cfd14dd38 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -62,6 +62,7 @@ {% include gtm_head.html %} {% include google_analytics.html %} {% include cloudflare_analytics.html %} + {% include mathjax.html %} {% if layout.common-ext-css %} {% for css in layout.common-ext-css %} 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/_posts/2020-02-28-sample-markdown.md b/_posts/2020-02-28-sample-markdown.md index d46f9ba58c60..6a59d6a14aac 100644 --- a/_posts/2020-02-28-sample-markdown.md +++ b/_posts/2020-02-28-sample-markdown.md @@ -6,6 +6,7 @@ gh-repo: daattali/beautiful-jekyll gh-badge: [star, fork, follow] tags: [test] comments: true +mathjax: true author: Bill Smith --- @@ -27,6 +28,9 @@ Here's a table: | Seven | Eight | Six | | Two | Three | One | +You can use [MathJax](https://www.mathjax.org/) to write LaTeX expressions. For example: +When \\(a \ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ + How about a yummy crepe? ![Crepe](https://beautifuljekyll.com/assets/img/crepe.jpg)