From 6b0bf878460d966d5e8f4f0425ce8aa9ce1c78da Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Mon, 4 Oct 2021 04:46:05 +0330 Subject: [PATCH] add jekyll target blank plugin (#404) * add jekyll target blank * Remove manual target blank from everywhere * Update README.md * Set ruby version to 3.0.2 in the deploy script Co-authored-by: Maruan Al-Shedivat --- .github/workflows/deploy.yml | 2 +- Gemfile | 3 +- README.md | 5 ++- _config.yml | 13 +++---- _includes/projects.html | 4 +-- _includes/projects_horizontal.html | 4 +-- _includes/social.html | 35 +++++++++---------- _layouts/bib.html | 32 ++++++++--------- _news/announcement_2.md | 2 +- _pages/about.md | 4 +-- _pages/projects.md | 2 +- _posts/2015-03-15-formatting-and-links.md | 2 +- _posts/2015-10-20-math.md | 4 +-- _posts/2018-12-22-distill.md | 4 +-- _posts/2020-09-28-github-metadata.md | 2 +- _posts/2020-09-28-twitter.md | 2 +- .../{1_project.markdown => 1_project.md} | 2 +- .../{2_project.markdown => 2_project.md} | 2 +- .../{3_project.markdown => 3_project.md} | 2 +- .../{4_project.markdown => 4_project.md} | 2 +- .../{5_project.markdown => 5_project.md} | 2 +- .../{6_project.markdown => 6_project.md} | 2 +- 22 files changed, 68 insertions(+), 64 deletions(-) rename _projects/{1_project.markdown => 1_project.md} (97%) rename _projects/{2_project.markdown => 2_project.md} (97%) rename _projects/{3_project.markdown => 3_project.md} (97%) rename _projects/{4_project.markdown => 4_project.md} (97%) rename _projects/{5_project.markdown => 5_project.md} (97%) rename _projects/{6_project.markdown => 6_project.md} (97%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2ecc295..effb9ad 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Ruby uses: actions/setup-ruby@v1 with: - ruby-version: '2.7' + ruby-version: '3.0.2' - name: Enable bundler cache uses: actions/cache@v2 with: diff --git a/Gemfile b/Gemfile index d87f96d..8fd4241 100644 --- a/Gemfile +++ b/Gemfile @@ -6,8 +6,9 @@ group :jekyll_plugins do gem 'jekyll-github-metadata' gem 'jekyll-paginate-v2' gem 'jekyll-scholar' - gem 'jekyll-twitter-plugin' gem 'jekyll-sitemap' + gem 'jekyll-target-blank' + gem 'jekyll-twitter-plugin' gem 'jemoji' gem 'unicode_utils' gem 'webrick' diff --git a/README.md b/README.md index d8c86f2..128eeb3 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,10 @@ $ bundle exec jekyll serve ``` Now, feel free to customize the theme however you like (don't forget to change the name!). -After you are done, **commit** your final changes. + +**Important:** +- Make sure to change `url` field in `_config.yml` to `.github.io`. +- After you are done, **commit** your final changes. #### Deployment diff --git a/_config.yml b/_config.yml index 4d83f24..5db77ea 100644 --- a/_config.yml +++ b/_config.yml @@ -15,7 +15,7 @@ footer_text: > Photos from Unsplash. icon: 🔥 # the emoji used as the favicon -url: # the base hostname & protocol for your site +url: https://alshedivat.github.io # the base hostname & protocol for your site baseurl: /al-folio # the subpath of your site, e.g. /blog/ last_updated: false # set to true if you want to display last updated in the footer impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR @@ -136,13 +136,14 @@ keep_files: # Plug-ins plugins: - - jekyll-email-protect - - jekyll-github-metadata - - jekyll-feed - - jekyll-paginate-v2 - jekyll/scholar - - jekyll-twitter-plugin + - jekyll-email-protect + - jekyll-feed + - jekyll-github-metadata + - jekyll-paginate-v2 - jekyll-sitemap + - jekyll-target-blank + - jekyll-twitter-plugin - jemoji # Extras diff --git a/_includes/projects.html b/_includes/projects.html index 55a1461..1af5547 100644 --- a/_includes/projects.html +++ b/_includes/projects.html @@ -1,6 +1,6 @@
{% if project.redirect %} - + {% else %} {% endif %} @@ -15,7 +15,7 @@ {% if project.github %}
- +
{% if project.github_stars %} diff --git a/_includes/projects_horizontal.html b/_includes/projects_horizontal.html index edecb9b..d1d7924 100644 --- a/_includes/projects_horizontal.html +++ b/_includes/projects_horizontal.html @@ -1,6 +1,6 @@
{% if project.redirect %} - + {% else %} {% endif %} @@ -21,7 +21,7 @@ {% if project.github %}
- +
{% if project.github_stars %} diff --git a/_includes/social.html b/_includes/social.html index 027fcc9..eda6865 100644 --- a/_includes/social.html +++ b/_includes/social.html @@ -1,19 +1,18 @@ {% if site.email %}{% endif %} -{% if site.orcid_id %}{% endif %} -{% if site.scholar_userid %}{% endif %} -{% if site.publons_id %}{% endif %} -{% if site.research_gate_profile %}{% endif %} -{% if site.github_username %}{% endif %} -{% if site.linkedin_username %}{% endif %} -{% if site.twitter_username %}{% endif %} -{% if site.medium_username %}{% endif %} -{% if site.quora_username %}{% endif %} -{% if site.blogger_url %}{% endif %} -{% if site.work_url %}{% endif %} -{% if site.wikidata_id %}{% endif %} -{% if site.strava_userid %}{% endif %} -{% if site.keybase_username %}{% endif %} -{% if site.gitlab_username %}{% endif %} -{% if site.dblp_url %}{% endif %} -{% if site.stackoverflow_id %}{% endif %} - +{% if site.orcid_id %}{% endif %} +{% if site.scholar_userid %}{% endif %} +{% if site.publons_id %}{% endif %} +{% if site.research_gate_profile %}{% endif %} +{% if site.github_username %}{% endif %} +{% if site.linkedin_username %}{% endif %} +{% if site.twitter_username %}{% endif %} +{% if site.medium_username %}{% endif %} +{% if site.quora_username %}{% endif %} +{% if site.blogger_url %}{% endif %} +{% if site.work_url %}{% endif %} +{% if site.wikidata_id %}{% endif %} +{% if site.strava_userid %}{% endif %} +{% if site.keybase_username %}{% endif %} +{% if site.gitlab_username %}{% endif %} +{% if site.dblp_url %}{% endif %} +{% if site.stackoverflow_id %}{% endif %} diff --git a/_layouts/bib.html b/_layouts/bib.html index 2d00989..ac4ee3f 100644 --- a/_layouts/bib.html +++ b/_layouts/bib.html @@ -5,7 +5,7 @@
{% if entry.abbr %} {% if site.data.venues[entry.abbr] %} - {{entry.abbr}} + {{entry.abbr}} {% else %} {{entry.abbr}} {% endif %} @@ -47,7 +47,7 @@ {{author.last}}, {{author.first}}, {% else %} {% if coauthor_url %} - {{author.last}}, {{author.first}}, + {{author.last}}, {{author.first}}, {% else %} {{author.last}}, {{author.first}}, {% endif %} @@ -57,7 +57,7 @@ and {{author.last}}, {{author.first}} {% else %} {% if coauthor_url %} - and {{author.last}}, {{author.first}} + and {{author.last}}, {{author.first}} {% else %} and {{author.last}}, {{author.first}} {% endif %} @@ -84,50 +84,50 @@ Abs {% endif %} {% if entry.arxiv %} - arXiv + arXiv {% endif %} {% if entry.bibtex_show %} Bib {% endif %} {% if entry.html %} - HTML + HTML {% endif %} {% if entry.pdf %} {% if entry.pdf contains '://' %} - PDF + PDF {% else %} - PDF + PDF {% endif %} {% endif %} {% if entry.supp %} {% if entry.supp contains '://' %} - Supp + Supp {% else %} - Supp + Supp {% endif %} {% endif %} {% if entry.blog %} - Blog + Blog {% endif %} {% if entry.code %} - Code + Code {% endif %} {% if entry.poster %} {% if entry.poster contains '://' %} - Poster + Poster {% else %} - Poster + Poster {% endif %} {% endif %} {% if entry.slides %} {% if entry.slides contains '://' %} - Slides + Slides {% else %} - Slides + Slides {% endif %} {% endif %} {% if entry.website %} - Website + Website {% endif %}
diff --git a/_news/announcement_2.md b/_news/announcement_2.md index b086a49..dbd4b4d 100644 --- a/_news/announcement_2.md +++ b/_news/announcement_2.md @@ -9,7 +9,7 @@ Announcements and news can be much longer than just quick inline posts. In fact, *** -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. #### Hipster list
    diff --git a/_pages/about.md b/_pages/about.md index 3ea7593..2008d41 100644 --- a/_pages/about.md +++ b/_pages/about.md @@ -17,8 +17,8 @@ selected_papers: true # includes a list of papers marked as "selected={true}" social: true # includes social icons at the bottom of the page --- -Write your biography here. Tell the world about yourself. Link to your favorite [subreddit](http://reddit.com){:target="\_blank"}. You can put a picture in, too. The code is already in, just name your picture `prof_pic.jpg` and put it in the `img/` folder. +Write your biography here. Tell the world about yourself. Link to your favorite [subreddit](http://reddit.com). You can put a picture in, too. The code is already in, just name your picture `prof_pic.jpg` and put it in the `img/` folder. Put your address / P.O. box / other info right below your picture. You can also disable any these elements by editing `profile` property of the YAML header of your `_pages/about.md`. Edit `_bibliography/papers.bib` and Jekyll will render your [publications page](/al-folio/publications/) automatically. -Link to your social media connections, too. This theme is set up to use [Font Awesome icons](http://fortawesome.github.io/Font-Awesome/){:target="\_blank"} and [Academicons](https://jpswalsh.github.io/academicons/){:target="\_blank"}, like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them. +Link to your social media connections, too. This theme is set up to use [Font Awesome icons](http://fortawesome.github.io/Font-Awesome/) and [Academicons](https://jpswalsh.github.io/academicons/), like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them. diff --git a/_pages/projects.md b/_pages/projects.md index 9308732..f3ca555 100644 --- a/_pages/projects.md +++ b/_pages/projects.md @@ -11,7 +11,7 @@ horizontal: false {% if site.enable_project_categories and page.display_categories %} {% for category in page.display_categories %} -

    {{category}}

    +

    {{ category }}

    {% assign categorized_projects = site.projects | where: "category", category %} {% assign sorted_projects = categorized_projects | sort: "importance" %} diff --git a/_posts/2015-03-15-formatting-and-links.md b/_posts/2015-03-15-formatting-and-links.md index 82a989a..8edeba6 100644 --- a/_posts/2015-03-15-formatting-and-links.md +++ b/_posts/2015-03-15-formatting-and-links.md @@ -4,7 +4,7 @@ title: a post with formatting and links date: 2015-03-15 16:40:16 description: march & april, looking forward to summer --- -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. #### Hipster list
      diff --git a/_posts/2015-10-20-math.md b/_posts/2015-10-20-math.md index 803b28a..c7c2fa2 100644 --- a/_posts/2015-10-20-math.md +++ b/_posts/2015-10-20-math.md @@ -4,7 +4,7 @@ title: a post with math date: 2015-10-20 11:12:00-0400 description: an example of a blog post with some math --- -This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/){:target="\_blank"} engine. You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. +This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/) engine. You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. To use display mode, again surround your expression with `$$` and place it as a separate paragraph. Here is an example: @@ -22,4 +22,4 @@ MathJax will automatically number equations: and by adding `\label{...}` inside the equation environment, we can now refer to the equation using `\eqref`. -Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html){:target="\_blank"} that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php){:target="\_blank"}. +Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html) that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php). diff --git a/_posts/2018-12-22-distill.md b/_posts/2018-12-22-distill.md index 9e7efd4..bc19df7 100644 --- a/_posts/2018-12-22-distill.md +++ b/_posts/2018-12-22-distill.md @@ -47,7 +47,7 @@ If you are interested in correctly adding dark mode support for distill, please ## Equations -This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/){:target="\_blank"} engine. +This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/) engine. You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. @@ -58,7 +58,7 @@ $$ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) $$ -Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html){:target="\_blank"} that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php){:target="\_blank"}. +Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html) that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php). *** diff --git a/_posts/2020-09-28-github-metadata.md b/_posts/2020-09-28-github-metadata.md index 02c5072..3f40631 100644 --- a/_posts/2020-09-28-github-metadata.md +++ b/_posts/2020-09-28-github-metadata.md @@ -19,7 +19,7 @@ A sample blog page that demonstrates the accessing of github meta data. ## Additional Reading * If you're recieving incorrect/missing data, you may need to perform a Github API authentication. -* Go through this README for more details on the topic. +* Go through this README for more details on the topic. * This page highlights all the feilds you can access with github-metadata.
      diff --git a/_posts/2020-09-28-twitter.md b/_posts/2020-09-28-twitter.md index edba12e..f67b191 100644 --- a/_posts/2020-09-28-twitter.md +++ b/_posts/2020-09-28-twitter.md @@ -15,4 +15,4 @@ An example of pulling from a timeline: {% twitter https://twitter.com/jekyllrb maxwidth=500 limit=3 %} # Additional Details -For more details on using the plugin visit: [jekyll-twitter-plugin](https://github.com/rob-murray/jekyll-twitter-plugin){:target="\_blank"} +For more details on using the plugin visit: [jekyll-twitter-plugin](https://github.com/rob-murray/jekyll-twitter-plugin) diff --git a/_projects/1_project.markdown b/_projects/1_project.md similarity index 97% rename from _projects/1_project.markdown rename to _projects/1_project.md index e48dc40..ea09a99 100644 --- a/_projects/1_project.markdown +++ b/_projects/1_project.md @@ -62,7 +62,7 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r The code is simple. -Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). +Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. Here's the code for the last row of images above: diff --git a/_projects/2_project.markdown b/_projects/2_project.md similarity index 97% rename from _projects/2_project.markdown rename to _projects/2_project.md index 1bfceda..7a7de4b 100644 --- a/_projects/2_project.markdown +++ b/_projects/2_project.md @@ -62,7 +62,7 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r The code is simple. -Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). +Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. Here's the code for the last row of images above: diff --git a/_projects/3_project.markdown b/_projects/3_project.md similarity index 97% rename from _projects/3_project.markdown rename to _projects/3_project.md index 2be585d..db5ad61 100644 --- a/_projects/3_project.markdown +++ b/_projects/3_project.md @@ -63,7 +63,7 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r The code is simple. -Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). +Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. Here's the code for the last row of images above: diff --git a/_projects/4_project.markdown b/_projects/4_project.md similarity index 97% rename from _projects/4_project.markdown rename to _projects/4_project.md index f2cefee..bb19465 100644 --- a/_projects/4_project.markdown +++ b/_projects/4_project.md @@ -62,7 +62,7 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r The code is simple. -Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). +Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. Here's the code for the last row of images above: diff --git a/_projects/5_project.markdown b/_projects/5_project.md similarity index 97% rename from _projects/5_project.markdown rename to _projects/5_project.md index 506248e..0e07044 100644 --- a/_projects/5_project.markdown +++ b/_projects/5_project.md @@ -62,7 +62,7 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r The code is simple. -Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). +Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. Here's the code for the last row of images above: diff --git a/_projects/6_project.markdown b/_projects/6_project.md similarity index 97% rename from _projects/6_project.markdown rename to _projects/6_project.md index 2c5f1ac..e3fa046 100644 --- a/_projects/6_project.markdown +++ b/_projects/6_project.md @@ -62,7 +62,7 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r The code is simple. -Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). +Just wrap your images with `
      ` and place them inside `
      ` (read more about the Bootstrap Grid system). To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. Here's the code for the last row of images above: