From 5ced1d820bfc98c74b66cc3a7fc4cea96a24329c Mon Sep 17 00:00:00 2001 From: Chen Chen Date: Tue, 9 Jul 2024 22:21:54 +0800 Subject: [PATCH] bump to al-folio upstream tag 0.12.0 (#22) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update README.md (#2493) Added Physics-Morris.github.io to the list of academics. Co-authored-by: Morris Huang * Fixed issue with vega * Fix code blocks not changing to plots and others (#2497) For some unknown reason, all the `document.onreadystatechange = () => {` checks stopped working. Thankfully, replacing them with `document.addEventListener("readystatechange", () => {` fixed the issues. --------- Signed-off-by: George Araujo * fix: remove 'index.html' in pagination (#2509) Currently, on the [blog](https://alshedivat.github.io/al-folio/blog/) page, clicking "older" and "newer" on the pagination at the bottom direct you forward to links like `/al-folio/blog/page/2/` and backward to `/al-folio/blog/`. However, if you click on the `1`, `2`.. etc buttons, there is a different behavior. The links now contain an `index.html`. For example, clicking `2` leads you to `/al-folio/blog/page/2/index.html`. It is the same content, just with a messier hyper link. Same with clicking `1`, you are brought to `/al-folio/blog/`. This fix creates a consistency among the hyper links in pagination. * Added SRaf.ir to README.md (#2510) Hi, I would be more than happy if I could add my personal website here. * Support pirsch.io for analytics (#2513) * Fixed external post symbol on search (#2515) Fixes #2471 Signed-off-by: George Araujo * fix: blog highlighted in nav for child pages (#2516) Currently, in all blog posts, or any child page under /blog, the "blog" in nav is not highlighted. In all other child pages for a parent in nav, the parent is highlighted. For example, in a sub page of projects, projects in nav is highlighted. This fix creates a consistent behavior for nav and highlights the blog in nav if in a blog post. BEFORE: image AFTER: image * Support superscripts in bibtex author names (#2512) Implements #2511 * Added support for a newsletter (#2517) In reference to idea: https://github.com/alshedivat/al-folio/discussions/2097 In reference to request: https://github.com/alshedivat/al-folio/issues/923#issuecomment-2171924663 Added support to integrate a [loops.so](https://loops.so/) mailing list into the site. To use, you need to enable `newsletter` in `_config.yml`. You also must specify a loops endpoint (although I think any mailing list endpoint can work), which you can get when you set up a mailing list on loops. More documentation on loops: [here](https://loops.so/docs/forms/custom-form). Once that is enabled, the behavior is different depending on how you specified your footer to behave in `_config.yml`. If `footer_fixed: true`, then the sign up will appear at the bottom of the about page, as well as at the bottom of blog posts, if you enable `related_posts`. If `footer_fixed: false`, then the newsletter signup will be in the footer (on every page), like it is in on [my website](https://asboyer.com). I'm not attached to the placement of the signup, and you can choose to include it wherever you want with `{% include scripts/newsletter.liquid %}`. Also if you include positional variables into that, you can choose how you center the signup. So `{% include scripts/newsletter.liquid left=true %}` positions the signup bar to the left. Here are some screenshots below: ## Dark version ![image](https://github.com/alshedivat/al-folio/assets/52665298/af7fdb81-6e5f-47a9-958b-4cb93bba9e8f) ## Light version ![image](https://github.com/alshedivat/al-folio/assets/52665298/927f8bc5-b481-448b-ae5e-6f5b1c613243) I think the input field color should probably change to maybe be light for both themes? What do you think? I think the dark background looks cool, but I don't usually see that done like that on other sites. ## Footer fixed ![image](https://github.com/alshedivat/al-folio/assets/52665298/c52f3dc1-0e45-400e-8b71-eeb00d00cb01) ![image](https://github.com/alshedivat/al-folio/assets/52665298/678a2d45-88ab-4d9a-b8cc-9fc6db26d744) ## Footer not fixed ![image](https://github.com/alshedivat/al-folio/assets/52665298/fd2c0228-2bce-4335-ac3c-5cb20a3307e2) ![image](https://github.com/alshedivat/al-folio/assets/52665298/f594b4f2-67e0-4f2b-a3e8-febd579aaf19) To clarify, if footer isn't fixed, the email signup will appear on every page. --------- Co-authored-by: George <31376482+george-gca@users.noreply.github.com> * Fixed docker-slim.yml issue * Add example use of annotation and superscripts in bibtex (#2520) ![image](https://github.com/alshedivat/al-folio/assets/33930674/e3018225-df99-4ebf-be18-5811f34fcf4b) ![image](https://github.com/alshedivat/al-folio/assets/33930674/afc6150e-0272-4180-bc5e-4ffbf5079239) ![image](https://github.com/alshedivat/al-folio/assets/33930674/40f88a17-4fba-4423-ab16-62fd37d7c574) ![image](https://github.com/alshedivat/al-folio/assets/33930674/c5cfe480-5df7-4f27-87c7-4883af1471ca) * Bib changes now trigger build action * Changes to docker-slim.yml now trigger action * Changes to deploy-image.yml now trigger action * Changes to deploy-docker-tag.yml now trigger action * Update CUSTOMIZE.md for Newsletter support (#2521) In reference to https://github.com/alshedivat/al-folio/pull/2517 and https://github.com/alshedivat/al-folio/pull/2517#issuecomment-2179244937 * Fix Altmetric badge not correctly set when Altmetric id is provided (#2522) To reproduce the bug: ```bibtex @inproceedings{Vaswani2017AttentionIA, title = {Attention is All you Need}, author = {Ashish Vaswani and Noam M. Shazeer and Niki Parmar and Jakob Uszkoreit and Llion Jones and Aidan N. Gomez and Lukasz Kaiser and Illia Polosukhin}, booktitle = {Neural Information Processing Systems}, year = {2017}, doi = {10.48550/arXiv.1706.03762}, altmetric = {21021191} } ``` The bug is 1. It seems to be some weird property of the liquid template that [line 252-254](https://github.com/alshedivat/al-folio/blob/8d82670ff170f98e7d7ea5434428234a8216d460/_layouts/bib.liquid#L252-L254) doesn't work at all. According to [this post](https://stackoverflow.com/questions/59887447/liquid-how-to-assign-the-output-of-an-operator-to-a-variable) and [this issue](https://github.com/Shopify/liquid/issues/236), liquid doesn't support assign the output of operator to a variable nor a ternary operator. So based on my console log, the value of `entry_has_altmetric_badge` is always a string value of `entry.altmetric` when altmetric is provided in bibtex. ```liquid {% assign entry_has_altmetric_badge = entry.altmetric or entry.doi or entry.eprint or entry.pmid or entry.isbn %} {% assign entry_has_dimensions_badge = entry.dimensions or entry.doi or entry.pmid %} {% assign entry_has_google_scholar_badge = entry.google_scholar_id %} {% if entry_has_altmetric_badge or entry_has_dimensions_badge or entry_has_google_scholar_badge %}
{% if site.enable_publication_badges.altmetric and entry_has_altmetric_badge %} doi > altmetric id > pmid > ISBN, and the badge doesn't work when an arxiv doi is provided. I think the expected behavior should be 1. as documented in CUSTOMIZE.md, only render the badge when the entry is set to either "true" or the altmetric id. (It could also implement to always render the badge whenever doi or other related attribute is set, and set altmetric to "false" to disable it) ```md - `altmetric`: Adds an [Altmetric](https://www.altmetric.com/) badge (Note: if DOI is provided just use `true`, otherwise only add the altmetric identifier here - the link is generated automatically) ``` 2. if the almetric id is set, use it first. * Fix repo card heigth for different repo descriptions (#2525) Hello! I had this minor issue on my website and I saw few other people using this template and having the same issue. **Brief** if two repo's in the same row has different number of lines for the descriptions, heights of the cards will not be the same if we don't force the number of lines to be displayed. **Solution** By looking at [This issue](https://github.com/anuraghazra/github-readme-stats/issues/2900) I could see that they solved it by adding an new option, `description_lines_count`. This was used on the API request in order to fix the issue. --- ## Issue reproduced: ![before](https://github.com/alshedivat/al-folio/assets/15076325/238931f5-8a0e-45c5-a9bb-e9c6e4c0f04b) --- ## Issue fixed after the commit: ![after](https://github.com/alshedivat/al-folio/assets/15076325/a0e79cdf-fd6a-4765-b21f-279540ae88fe) * Update README.md * Add linux x86-64 to Gemfile.lock (#2549) Fixes #2544 Generated via: ``` bundle lock --add-platform x86_64-linux ``` --------- Signed-off-by: George Araujo Co-authored-by: Morris Huang <53600226+Physics-Morris@users.noreply.github.com> Co-authored-by: Morris Huang Co-authored-by: George <31376482+george-gca@users.noreply.github.com> Co-authored-by: Andrew Boyer Co-authored-by: saeedrafieyan <61290778+saeedrafieyan@users.noreply.github.com> Co-authored-by: ariseus <33930674+garywei944@users.noreply.github.com> Co-authored-by: Tiago Lobão Co-authored-by: Maruan Co-authored-by: Amir Pourmand --- .github/workflows/deploy-docker-tag.yml | 2 + .github/workflows/deploy-image.yml | 1 + .github/workflows/deploy.yml | 2 + .github/workflows/docker-slim.yml | 8 +- CUSTOMIZE.md | 9 +- Gemfile | 1 + Gemfile.lock | 61 +++++--- README.md | 6 +- _config.yml | 13 ++ _data/repositories.yml | 6 +- _includes/footer.liquid | 4 + _includes/header.liquid | 3 +- _includes/pagination.liquid | 2 +- _includes/related_posts.liquid | 4 + _includes/repository/repo.liquid | 10 +- _includes/scripts/analytics.liquid | 8 ++ _includes/scripts/back_to_top.liquid | 10 +- _includes/scripts/diff2html.liquid | 8 +- _includes/scripts/echarts.liquid | 8 +- _includes/scripts/leaflet.liquid | 4 +- _includes/scripts/mermaid.liquid | 8 +- _includes/scripts/newsletter.liquid | 176 ++++++++++++++++++++++++ _includes/scripts/pseudocode.liquid | 4 +- _includes/scripts/search.liquid | 7 +- _includes/scripts/typograms.liquid | 4 +- _includes/scripts/vega.liquid | 8 +- _layouts/about.liquid | 4 + _layouts/bib.liquid | 53 +++++-- _plugins/hide-custom-bibtex.rb | 3 + _sass/_base.scss | 153 ++++++++++++++++++++ _sass/_themes.scss | 4 + assets/js/common.js | 9 +- assets/js/shortcut-key.js | 4 +- 33 files changed, 530 insertions(+), 77 deletions(-) create mode 100644 _includes/scripts/newsletter.liquid diff --git a/.github/workflows/deploy-docker-tag.yml b/.github/workflows/deploy-docker-tag.yml index fadfff66..d7710e26 100644 --- a/.github/workflows/deploy-docker-tag.yml +++ b/.github/workflows/deploy-docker-tag.yml @@ -5,6 +5,8 @@ on: tags: - "v*" paths: + - ".github/workflows/deploy-docker-tag.yml" + - ".github/workflows/deploy-image.yml" - "bin/entry_point.sh" - "Dockerfile" - "Gemfile" diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 133f22d7..7ddd8f65 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -6,6 +6,7 @@ on: - master - main paths: + - ".github/workflows/deploy-image.yml" - "bin/entry_point.sh" - "Dockerfile" - "Gemfile" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 046ee0de..85b7edff 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,7 @@ on: - main paths: - "assets/**" + - "**.bib" - "**.html" - "**.js" - "**.liquid" @@ -33,6 +34,7 @@ on: - main paths: - "assets/**" + - "**.bib" - "**.html" - "**.js" - "**.liquid" diff --git a/.github/workflows/docker-slim.yml b/.github/workflows/docker-slim.yml index 638114fe..3a67d32a 100644 --- a/.github/workflows/docker-slim.yml +++ b/.github/workflows/docker-slim.yml @@ -2,6 +2,12 @@ name: Docker Slim #Only trigger, when the build workflow succeeded on: + push: + branches: + - master + - main + paths: + - ".github/workflows/docker-slim.yml" workflow_run: workflows: ["Docker Image CI"] types: @@ -15,7 +21,7 @@ on: jobs: build: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow - if: ${{ github.event.workflow_run.conclusion == 'success' and github.repository_owner == 'alshedivat' }} + if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'alshedivat' }} runs-on: ubuntu-latest defaults: run: diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md index 7c635119..80bffffe 100644 --- a/CUSTOMIZE.md +++ b/CUSTOMIZE.md @@ -80,7 +80,7 @@ You can easily create your own collections, apps, short stories, courses, or wha To add publications create a new entry in the [\_bibliography/papers.bib](_bibliography/papers.bib) file. You can find the BibTeX entry of a publication in Google Scholar by clicking on the quotation marks below the publication title, then clicking on "BibTeX", or also in the conference page itself. By default, the publications will be sorted by year and the most recent will be displayed first. You can change this behavior and more in the `Jekyll Scholar` section in [\_config.yml](_config.yml) file. -You can add extra information to a publication, like a PDF file in the `assets/pdfs/` directory and add the path to the PDF file in the BibTeX entry with the `pdf` field. Some of the supported fields are: `abstract`, `altmetric`, `arxiv`, `bibtex_show`, `blog`, `code`, `dimensions`, `doi`, `eprint`, `html`, `isbn`, `pdf`, `pmid`, `poster`, `slides`, `supp`, `video`, and `website`. +You can add extra information to a publication, like a PDF file in the `assets/pdfs/` directory and add the path to the PDF file in the BibTeX entry with the `pdf` field. Some of the supported fields are: `abstract`, `altmetric`, `annotation`, `arxiv`, `bibtex_show`, `blog`, `code`, `dimensions`, `doi`, `eprint`, `html`, `isbn`, `pdf`, `pmid`, `poster`, `slides`, `supp`, `video`, and `website`. ### Author annotation @@ -124,6 +124,7 @@ There are several custom bibtex keywords that you can use to affect how the entr - `abbr`: Adds an abbreviation to the left of the entry. You can add links to these by creating a venue.yaml-file in the \_data folder and adding entries that match. - `abstract`: Adds an "Abs" button that expands a hidden text field when clicked to show the abstract text - `altmetric`: Adds an [Altmetric](https://www.altmetric.com/) badge (Note: if DOI is provided just use `true`, otherwise only add the altmetric identifier here - the link is generated automatically) +- `annotation`: Adds a popover info message to the end of the author list that can potentially be used to clarify superscripts. HTML is allowed. - `arxiv`: Adds a link to the Arxiv website (Note: only add the arxiv identifier here - the link is generated automatically) - `bibtex_show`: Adds a "Bib" button that expands a hidden text field with the full bibliography entry - `blog`: Adds a "Blog" button redirecting to the specified link @@ -145,3 +146,9 @@ A variety of beautiful theme colors have been selected for you to choose from. T ## Adding social media information You can add your social media links by adding the specified information at the `Social integration` section in the [\_config.yml](_config.yml) file. This information will appear at the bottom of the `About` page. + +## Adding a newsletter + +You can add a newsletter subscription form by adding the specified information at the `newsletter` section in the [\_config.yml](_config.yml) file. To set up a newsletter, you can use a service like [Loops.so](https://loops.so/), which is the current supported solution. Once you have set up your newsletter, you can add the form [endpoint](https://loops.so/docs/forms/custom-form) to the `endpoint` field in the `newsletter` section of the [\_config.yml](_config.yml) file. + +Depending on your specified footer behavior, the sign up form either will appear at the bottom of the `About` page and at the bottom of blogposts if `related_posts` are enabled, or in the footer at the bottom of each page. diff --git a/Gemfile b/Gemfile index 453c17ed..fa34c964 100644 --- a/Gemfile +++ b/Gemfile @@ -11,6 +11,7 @@ group :jekyll_plugins do gem 'jekyll-link-attributes' gem 'jekyll-minifier' gem 'jekyll-paginate-v2' + gem 'jekyll-regex-replace' gem 'jekyll-scholar' gem 'jekyll-sitemap' gem 'jekyll-tabs' diff --git a/Gemfile.lock b/Gemfile.lock index a2289d59..26c52fc6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.1.3.2) + activesupport (7.1.3.4) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -11,8 +11,8 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) base64 (0.2.0) bibtex-ruby (6.1.0) latex-decode (~> 0.0) @@ -50,12 +50,15 @@ GEM feedjira (3.2.3) loofah (>= 2.3.1, < 3) sax-machine (>= 1.0, < 2) - ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.0) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86_64-darwin) forwardable-extended (2.6.0) gemoji (4.1.0) - google-protobuf (4.27.1-x86_64-linux) - bigdecimal - rake (>= 13) + google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-arm64-darwin) + google-protobuf (3.25.3-x86_64-darwin) + google-protobuf (3.25.3-x86_64-linux) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) @@ -104,6 +107,7 @@ GEM uglifier (~> 4.1) jekyll-paginate-v2 (3.0.0) jekyll (>= 3.0, < 5.0) + jekyll-regex-replace (1.1.0) jekyll-sass-converter (3.0.0) sass-embedded (~> 1.54) jekyll-scholar (7.1.3) @@ -115,7 +119,7 @@ GEM jekyll (>= 3.7, < 5.0) jekyll-tabs (1.2.1) jekyll (>= 3.0, < 5.0) - jekyll-toc (0.18.0) + jekyll-toc (0.19.0) jekyll (>= 3.9) nokogiri (~> 1.12) jekyll-twitter-plugin (2.1.0) @@ -133,6 +137,9 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) latex-decode (0.4.0) + libv8-node (21.7.2.0-aarch64-linux) + libv8-node (21.7.2.0-arm64-darwin) + libv8-node (21.7.2.0-x86_64-darwin) libv8-node (21.7.2.0-x86_64-linux) liquid (4.0.4) listen (3.9.0) @@ -146,28 +153,40 @@ GEM mini_mime (1.1.5) mini_racer (0.12.0) libv8-node (~> 21.7.2.0) - minitest (5.22.3) - multi_xml (0.7.1) - bigdecimal (~> 3.1) + minitest (5.24.1) + multi_xml (0.6.0) mutex_m (0.2.0) namae (1.2.0) racc (~> 1.7) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.6-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.6-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-linux) racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (5.1.1) - racc (1.7.3) + public_suffix (6.0.0) + racc (1.8.0) rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.2.8) + rexml (3.3.1) + strscan rouge (4.3.0) safe_yaml (1.0.5) - sass-embedded (1.77.5-x86_64-linux-gnu) - google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.69.5) + google-protobuf (~> 3.23) + rake (>= 13.0.0) + sass-embedded (1.69.5-arm64-darwin) + google-protobuf (~> 3.23) + sass-embedded (1.69.5-x86_64-darwin) + google-protobuf (~> 3.23) sax-machine (1.3.2) + strscan (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) tzinfo (2.0.6) @@ -179,7 +198,10 @@ GEM webrick (1.8.1) PLATFORMS - x86_64-linux-gnu + aarch64-linux + arm64-darwin + x86_64-darwin + x86_64-linux DEPENDENCIES classifier-reborn @@ -196,6 +218,7 @@ DEPENDENCIES jekyll-link-attributes jekyll-minifier jekyll-paginate-v2 + jekyll-regex-replace jekyll-scholar jekyll-sitemap jekyll-tabs @@ -207,4 +230,4 @@ DEPENDENCIES webrick BUNDLED WITH - 2.5.13 + 2.5.7 \ No newline at end of file diff --git a/README.md b/README.md index 92fa41ae..8e8bb3f0 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,9 @@ Feel free to add your own page(s) by sending a PR. + + + @@ -179,7 +182,8 @@ Score Based Methods (NeurIPS: 2022)
Medical Robotics Junior Faculty Forum (ISMR: 2023)
Beyond Vision: Physics meets AI (ICIAP: 2023)
-Workshop on Diffusion Models (NeurIPS: 2023) +Workshop on Diffusion Models (NeurIPS: 2023)
+Workshop on Structured Probabilistic Inference & Generative Modeling (ICML: 2023, 2024) diff --git a/_config.yml b/_config.yml index ebfe6511..9ce2168c 100644 --- a/_config.yml +++ b/_config.yml @@ -120,6 +120,7 @@ contact_note: # and follow the instructions for Google Sites. You will need to create a Google Analytics property and copy the Google tag ID. google_analytics: # your Google Analytics measurement ID (format: G-XXXXXXXXXX) cronitor_analytics: # cronitor RUM analytics site ID (format: XXXXXXXXX) +pirsch_analytics: # your Pirsch analytics site ID (length 32 characters) # For Google Search Console, see https://support.google.com/webmasters/answer/9008080?hl=en#meta_tag_verification&zippy=%2Chtml-tag google_site_verification: # your google-site-verification ID (Google Search Console) @@ -172,6 +173,15 @@ external_sources: # - url: https://blog.google/technology/ai/google-gemini-update-flash-ai-assistant-io-2024/ # published_date: 2024-05-14 +# ----------------------------------------------------------------------------- +# Newsletter +# ----------------------------------------------------------------------------- + +newsletter: + enabled: false + endpoint: # your loops endpoint (e.g., https://app.loops.so/api/newsletter-form/YOUR-ENDPOINT) + # https://loops.so/docs/forms/custom-form + # ----------------------------------------------------------------------------- # Collections # ----------------------------------------------------------------------------- @@ -253,6 +263,7 @@ plugins: - jekyll-link-attributes - jekyll-minifier - jekyll-paginate-v2 + - jekyll-regex-replace - jekyll/scholar - jekyll-sitemap - jekyll-tabs @@ -339,6 +350,7 @@ filtered_bibtex_keywords: abstract, additional_info, altmetric, + annotation, arxiv, award, award_name, @@ -411,6 +423,7 @@ lazy_loading_images: true # enables lazy loading of images (recommended) enable_google_analytics: false # enables google analytics enable_cronitor_analytics: false # enables cronitor RUM analytics +enable_pirsch_analytics: false # enables Pirsch analytics (https://pirsch.io/) enable_google_verification: false # enables google site verification enable_bing_verification: false # enables bing site verification enable_masonry: true # enables automatic project cards arrangement diff --git a/_data/repositories.yml b/_data/repositories.yml index 5205c9f6..c2d7269e 100644 --- a/_data/repositories.yml +++ b/_data/repositories.yml @@ -2,11 +2,13 @@ github_users: - torvalds - alshedivat +repo_description_lines_max: 2 + github_repos: - alshedivat/al-folio - - twbs/bootstrap - jekyll/jekyll + - twbs/bootstrap - jquery/jquery - FortAwesome/Font-Awesome - - jpswalsh/academicons - mathjax/MathJax + - jpswalsh/academicons diff --git a/_includes/footer.liquid b/_includes/footer.liquid index 7541c96c..feecc1bb 100644 --- a/_includes/footer.liquid +++ b/_includes/footer.liquid @@ -15,6 +15,10 @@ {% else %}
+ {% if site.newsletter.enabled %} + {% include scripts/newsletter.liquid %} + {% endif %} +
© Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} diff --git a/_includes/header.liquid b/_includes/header.liquid index 92eae0c7..703b2517 100644 --- a/_includes/header.liquid +++ b/_includes/header.liquid @@ -96,7 +96,8 @@
{% else %} -
  • - {{ trail.num }} + {{ trail.num }}
  • {% endfor %} {% endif %} diff --git a/_includes/related_posts.liquid b/_includes/related_posts.liquid index 4cf4ffbd..08d1b885 100644 --- a/_includes/related_posts.liquid +++ b/_includes/related_posts.liquid @@ -16,3 +16,7 @@ {{ post.title }} {% endfor %} +{% if site.newsletter.enabled and site.footer_fixed %} +

    Subscribe to be notified of future articles:

    + {% include scripts/newsletter.liquid left=true %} +{% endif %} diff --git a/_includes/repository/repo.liquid b/_includes/repository/repo.liquid index 86aecc50..c9837bbc 100644 --- a/_includes/repository/repo.liquid +++ b/_includes/repository/repo.liquid @@ -5,17 +5,23 @@ {% assign show_owner = true %} {% endif %} +{% if site.data.repositories.repo_description_lines_max %} + {% assign max_lines = site.data.repositories.repo_description_lines_max %} +{% else %} + {% assign max_lines = 2 %} +{% endif %} + diff --git a/_includes/scripts/analytics.liquid b/_includes/scripts/analytics.liquid index 886cfd3a..4419a2ce 100644 --- a/_includes/scripts/analytics.liquid +++ b/_includes/scripts/analytics.liquid @@ -22,3 +22,11 @@ cronitor('config', { clientKey: '{{site.cronitor_analytics}}' }); {% endif %} +{% if site.enable_pirsch_analytics %} + +{% endif %} diff --git a/_includes/scripts/back_to_top.liquid b/_includes/scripts/back_to_top.liquid index c52765d9..0b74448b 100644 --- a/_includes/scripts/back_to_top.liquid +++ b/_includes/scripts/back_to_top.liquid @@ -1,6 +1,6 @@ - - + + +{% endif %} diff --git a/_includes/scripts/diff2html.liquid b/_includes/scripts/diff2html.liquid index 8b5211dd..0c9f0e0b 100644 --- a/_includes/scripts/diff2html.liquid +++ b/_includes/scripts/diff2html.liquid @@ -6,11 +6,11 @@ crossorigin="anonymous" > {% endif %} diff --git a/_includes/scripts/echarts.liquid b/_includes/scripts/echarts.liquid index 7030d688..fce103d5 100644 --- a/_includes/scripts/echarts.liquid +++ b/_includes/scripts/echarts.liquid @@ -12,11 +12,11 @@ > {% endif %} {% endif %} diff --git a/_includes/scripts/leaflet.liquid b/_includes/scripts/leaflet.liquid index 13181185..393fdf48 100644 --- a/_includes/scripts/leaflet.liquid +++ b/_includes/scripts/leaflet.liquid @@ -6,7 +6,7 @@ > {% endif %} diff --git a/_includes/scripts/mermaid.liquid b/_includes/scripts/mermaid.liquid index 4a22fa58..8edab72f 100644 --- a/_includes/scripts/mermaid.liquid +++ b/_includes/scripts/mermaid.liquid @@ -14,11 +14,11 @@ > {% endif %} {% endif %} diff --git a/_includes/scripts/newsletter.liquid b/_includes/scripts/newsletter.liquid new file mode 100644 index 00000000..0204ffa9 --- /dev/null +++ b/_includes/scripts/newsletter.liquid @@ -0,0 +1,176 @@ + + + + + diff --git a/_includes/scripts/pseudocode.liquid b/_includes/scripts/pseudocode.liquid index 5e9458b2..be942ed3 100644 --- a/_includes/scripts/pseudocode.liquid +++ b/_includes/scripts/pseudocode.liquid @@ -30,7 +30,7 @@ crossorigin="anonymous" > {% endif %} diff --git a/_includes/scripts/search.liquid b/_includes/scripts/search.liquid index 7fb30397..550e3b0e 100644 --- a/_includes/scripts/search.liquid +++ b/_includes/scripts/search.liquid @@ -2,10 +2,10 @@ {% endif %} diff --git a/_includes/scripts/vega.liquid b/_includes/scripts/vega.liquid index c3c13755..49f12360 100644 --- a/_includes/scripts/vega.liquid +++ b/_includes/scripts/vega.liquid @@ -19,11 +19,11 @@ > {% endif %} diff --git a/_layouts/about.liquid b/_layouts/about.liquid index 48cc108c..59aef42e 100644 --- a/_layouts/about.liquid +++ b/_layouts/about.liquid @@ -83,5 +83,9 @@ layout: default
    + + {% if site.newsletter.enabled and site.footer_fixed %} + {% include scripts/newsletter.liquid center=true %} + {% endif %} diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index 2b194b84..63a06ab8 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -59,7 +59,8 @@ {%- for author in entry.author_array limit: author_array_limit -%} {% assign author_is_self = false %} - {%- assign author_last_name = author.last | remove: '¶' | remove: '&' | remove: '*' | remove: '†' | remove: '^' -%} + {%- assign author_last_name = author.last | regex_replace: '[*∗†‡§¶‖&^]', '' -%} + {%- assign author_last_html = author.last | regex_replace: '([*∗†‡§¶‖&^]+)', '\1' -%} {% if site.scholar.last_name contains author_last_name %} {% if site.scholar.first_name contains author.first %} {% assign author_is_self = true %} @@ -83,17 +84,17 @@ {%- if author_is_self -%} {{- author.first }} - {{ author.last -}} + {{ author_last_html -}} {%- else -%} {%- if coauthor_url -%} {{- author.first }} - {{ author.last -}} + {{ author_last_html -}} {%- else -%} {{- author.first }} - {{ author.last -}} + {{ author_last_html -}} {% endif %} {%- endif -%} {% endfor %} @@ -111,6 +112,7 @@ {% assign more_authors_show = more_authors_show | append: ', ' %} {% endunless %} {%- endfor -%} + {% assign more_authors_show = more_authors_show | regex_replace: '([*∗†‡§¶‖&^]+)', '\1' %} , and {% endif %} + {% if entry.annotation %} + + + {% endif %} @@ -237,9 +249,20 @@ {% endif %} {% if site.enable_publication_badges %} - {% assign entry_has_altmetric_badge = entry.altmetric or entry.doi or entry.eprint or entry.pmid or entry.isbn %} - {% assign entry_has_dimensions_badge = entry.dimensions or entry.doi or entry.pmid %} - {% assign entry_has_google_scholar_badge = entry.google_scholar_id %} + {% assign entry_has_altmetric_badge = false %} + {% if entry.altmetric and entry.altmetric != 'false' %} + {% assign entry_has_altmetric_badge = true %} + {% endif %} + + {% assign entry_has_dimensions_badge = false %} + {% if entry.dimensions and entry.dimensions != 'false' %} + {% assign entry_has_dimensions_badge = true %} + {% endif %} + + {% assign entry_has_google_scholar_badge = false %} + {% if entry.google_scholar_id %} + {% assign entry_has_google_scholar_badge = true %} + {% endif %} {% if entry_has_altmetric_badge or entry_has_dimensions_badge or entry_has_google_scholar_badge %}
    {% if site.enable_publication_badges.altmetric and entry_has_altmetric_badge %} @@ -249,12 +272,14 @@ data-hide-less-than="15" data-badge-type="2" data-badge-popover="right" - {% if entry.eprint %} + {% if entry.altmetric != blank and entry.altmetric != 'true' %} + data-altmetric-id="{{ entry.altmetric }}" + {% elsif entry.arxiv %} + data-arxiv-id="{{ entry.arxiv }}" + {% elsif entry.eprint %} data-arxiv-id="{{ entry.eprint }}" {% elsif entry.doi %} data-doi="{{ entry.doi }}" - {% elsif entry.altmetric %} - data-altmetric-id="{{ entry.altmetric }}" {% elsif entry.pmid %} data-pmid="{{ entry.pmid }}" {% elsif entry.isbn %} @@ -265,12 +290,12 @@ {% if site.enable_publication_badges.dimensions and entry_has_dimensions_badge %} { +document.addEventListener("readystatechange", () => { if (document.readyState === "interactive") { let isMac = navigator.platform.toUpperCase().indexOf("MAC") >= 0; let shortcutKeyElement = document.querySelector("#search-toggle .nav-link"); @@ -8,4 +8,4 @@ document.onreadystatechange = () => { shortcutKeyElement.innerHTML = '⌘ k '; } } -}; +});