From f18ffd1904c88ac36dbd45b5a5c6287550933676 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 | 7 ++-- _includes/projects.html | 4 +-- _includes/projects_horizontal.html | 4 +-- _includes/social.html | 35 +++++++++---------- _layouts/bib.html | 32 ++++++++--------- _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 +- 20 files changed, 62 insertions(+), 58 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 2ecc29536258..effb9ad9f570 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 d87f96d290e5..8fd4241d6e0f 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 d8c86f2c76f5..128eeb3717ac 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 ce98957e3c54..488bfbf0e8bd 100644 --- a/_config.yml +++ b/_config.yml @@ -135,13 +135,14 @@ keep_files: # Plug-ins plugins: + - jekyll/scholar - jekyll-email-protect - - jekyll-github-metadata - jekyll-feed + - jekyll-github-metadata - jekyll-paginate-v2 - - jekyll/scholar - - jekyll-twitter-plugin - jekyll-sitemap + - jekyll-target-blank + - jekyll-twitter-plugin - jemoji # Extras diff --git a/_includes/projects.html b/_includes/projects.html index 55a146105ccb..1af5547d30ba 100644 --- a/_includes/projects.html +++ b/_includes/projects.html @@ -1,6 +1,6 @@
{% if project.redirect %} - + {% else %} {% endif %} @@ -15,7 +15,7 @@

{{ project.title }}

{% if project.github %}
- +
{% if project.github_stars %} diff --git a/_includes/projects_horizontal.html b/_includes/projects_horizontal.html index edecb9bfd811..d1d7924fa6c2 100644 --- a/_includes/projects_horizontal.html +++ b/_includes/projects_horizontal.html @@ -1,6 +1,6 @@
{% if project.redirect %} - + {% else %} {% endif %} @@ -21,7 +21,7 @@

{{ project.title }}

{% if project.github %}
- +
{% if project.github_stars %} diff --git a/_includes/social.html b/_includes/social.html index 027fcc9fe0b9..eda6865e0f80 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 2d009896193a..ac4ee3f64aeb 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/_pages/projects.md b/_pages/projects.md index 2884e7f51eb1..b0781c4bad76 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 82a989ac974d..8edeba65e70c 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 803b28a5d0cb..c7c2fa2a4f51 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 9e7efd4c178f..bc19df7843ef 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 02c5072de66d..3f406310f295 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 edba12e79357..f67b191f3e2f 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 e48dc40d5b5c..ea09a99b1fdf 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 1bfcedac4bbe..7a7de4bb3759 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 2be585df59d6..db5ad61d8855 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 f2cefee55f24..bb19465b18ed 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 506248eda698..0e07044327ff 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 2c5f1ac11585..e3fa046b72f9 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: