diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..13f8434 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + pull_request: + branches: + - master + workflow_dispatch: + +permissions: + contents: read + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up Ruby + uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0 + with: + ruby-version: "3.2.0" + bundler-cache: true + + - name: Security audit (bundler-audit) + run: bundle exec bundler-audit check --update + + - name: Build and check links + run: ./scripts/test diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..1f77944 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,50 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up Ruby + uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0 + with: + ruby-version: "3.2.0" + bundler-cache: true + + - name: Build site + env: + JEKYLL_ENV: production + run: bundle exec jekyll build --config _config.yml,_config_production.yml + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + path: ./_site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 diff --git a/.gitignore b/.gitignore index d59ac74..87fe7c0 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ tags ## Environment normalization: /.bundle/ /vendor/bundle + +# Sensitive key material — never commit +keypair.pem +keypair.pem.enc diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..944880f --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.0 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5b1b26b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: ruby -rvm: -- 2.5 -install: - - bundle install --jobs=3 --retry=3 --full-index --deployment -script: -- "./scripts/build" -- "./scripts/test" -branches: - only: - - master - - "/master-(.*)/" -before_deploy: -- openssl aes-256-cbc -K $encrypted_550be8be9cea_key -iv $encrypted_550be8be9cea_iv - -in keypair.pem.enc -out keypair.pem -d -- bundle exec jekyll build --config _config_production.yml,_config.yml -- export JEKYLL_ENV=production -- chmod 600 ./keypair.pem -deploy: - skip_cleanup: true - provider: script - script: scripts/deploy - on: - branch: master -after_deploy: - - rm ./keypair.pem diff --git a/CNAME b/CNAME deleted file mode 100644 index 95a442d..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -blog.jaysinh.com \ No newline at end of file diff --git a/Gemfile b/Gemfile index 78243e7..2b5579b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,28 +1,20 @@ source "https://rubygems.org" -ruby RUBY_VERSION -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! -gem "jekyll" +# Jekyll version +gem "jekyll", "~> 4.4" -# This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima", "~> 2.0" -gem "html-proofer" +# Theme +gem "minima", "~> 2.5" -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -# gem "github-pages", group: :jekyll_plugins +# Development/testing +gem "html-proofer" +gem "bundler-audit" -# If you have any plugins, put them here! +# Jekyll plugins group :jekyll_plugins do - gem "jekyll-feed", "~> 0.6" - gem "jekyll-minifier" - gem "jekyll-sitemap" - gem "jekyll-seo-tag" + gem "jekyll-feed", "~> 0.17" + gem "jekyll-sitemap", "~> 1.4" + gem "jekyll-seo-tag", "~> 2.8" + # Minifies HTML/CSS/JS output; only runs when JEKYLL_ENV=production. + gem "jekyll-minifier", "~> 0.2" end diff --git a/Gemfile.lock b/Gemfile.lock index cf1ef2f..3fffd3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,120 +1,176 @@ GEM remote: https://rubygems.org/ specs: - activesupport (5.2.2) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + Ascii85 (2.0.1) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) + afm (1.0.0) + async (2.37.0) + console (~> 1.29) + fiber-annotation + io-event (~> 1.11) + metrics (~> 0.12) + traces (~> 0.18) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (3.3.1) + bundler-audit (0.9.3) + bundler (>= 1.2.0) + thor (~> 1.0) colorator (1.1.0) - colorize (0.8.1) - concurrent-ruby (1.1.4) - cssminify2 (2.0.1) - em-websocket (0.5.1) + concurrent-ruby (1.3.8) + console (1.34.3) + fiber-annotation + fiber-local (~> 1.1) + json + cssminify2 (2.1.0) + csv (3.3.5) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) - ethon (0.11.0) - ffi (>= 1.3.0) + http_parser.rb (~> 0) + ethon (0.18.0) + ffi (>= 1.15.0) + logger eventmachine (1.2.7) - execjs (2.7.0) - ffi (1.10.0) + execjs (2.10.1) + ffi (1.17.4-arm64-darwin) + ffi (1.17.4-x86_64-linux-gnu) + fiber-annotation (0.2.0) + fiber-local (1.1.0) + fiber-storage + fiber-storage (1.0.1) forwardable-extended (2.6.0) - html-proofer (3.10.0) - activesupport (>= 4.2, < 6.0) + google-protobuf (4.35.1-arm64-darwin) + bigdecimal + rake (~> 13.3) + google-protobuf (4.35.1-x86_64-linux-gnu) + bigdecimal + rake (~> 13.3) + hashery (2.1.2) + html-proofer (5.2.1) addressable (~> 2.3) - colorize (~> 0.8) - mercenary (~> 0.3.2) - nokogiri (~> 1.9) - parallel (~> 1.3) + async (~> 2.1) + benchmark (~> 0.5) + nokogiri (~> 1.13) + pdf-reader (~> 2.11) + rainbow (~> 3.0) typhoeus (~> 1.3) yell (~> 2.0) + zeitwerk (~> 2.5) htmlcompressor (0.4.0) - http_parser.rb (0.6.0) - i18n (0.9.5) + http_parser.rb (0.8.1) + i18n (1.15.2) concurrent-ruby (~> 1.0) - jekyll (3.8.5) + io-event (1.11.2) + jekyll (4.4.1) addressable (~> 2.4) + base64 (~> 0.2) colorator (~> 1.0) + csv (~> 3.0) em-websocket (~> 0.5) - i18n (~> 0.7) - jekyll-sass-converter (~> 1.0) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) jekyll-watch (~> 2.0) - kramdown (~> 1.14) + json (~> 2.6) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.3.3) + mercenary (~> 0.3, >= 0.3.6) pathutil (~> 0.9) - rouge (>= 1.7, < 4) + rouge (>= 3.0, < 5.0) safe_yaml (~> 1.0) - jekyll-feed (0.11.0) - jekyll (~> 3.3) - jekyll-minifier (0.1.9) - cssminify2 (~> 2.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-minifier (0.2.2) + cssminify2 (~> 2.1.0) htmlcompressor (~> 0.4) - jekyll (>= 3.5) - uglifier (~> 4.1) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.5.0) - jekyll (~> 3.3) - jekyll-sitemap (1.2.0) - jekyll (~> 3.3) - jekyll-watch (2.1.2) + jekyll (~> 4.0) + json-minify (~> 0.0.3) + terser (~> 1.2.3) + jekyll-sass-converter (3.1.0) + sass-embedded (~> 1.75) + jekyll-seo-tag (2.9.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-watch (2.2.1) listen (~> 3.0) - kramdown (1.17.0) - liquid (4.0.1) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - mercenary (0.3.6) - mini_portile2 (2.4.0) - minima (2.5.0) - jekyll (~> 3.5) + json (2.21.1) + json-minify (0.0.3) + json (> 0) + kramdown (2.5.2) + rexml (>= 3.4.4) + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.10.0) + logger + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + logger (1.7.0) + mercenary (0.4.0) + metrics (0.15.0) + minima (2.5.2) + jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.11.3) - nokogiri (1.10.0) - mini_portile2 (~> 2.4.0) - parallel (1.12.1) + nokogiri (1.19.4-arm64-darwin) + racc (~> 1.4) + nokogiri (1.19.4-x86_64-linux-gnu) + racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (3.0.3) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + pdf-reader (2.15.1) + Ascii85 (>= 1.0, < 3.0, != 2.0.0) + afm (>= 0.2.1, < 2) + hashery (~> 2.0) + ruby-rc4 + ttfunk + public_suffix (7.0.5) + racc (1.8.1) + rainbow (3.1.1) + rake (13.4.2) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rouge (3.3.0) - ruby_dep (1.5.0) - safe_yaml (1.0.4) - sass (3.7.3) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - thread_safe (0.3.6) - typhoeus (1.3.1) - ethon (>= 0.9.0) - tzinfo (1.2.5) - thread_safe (~> 0.1) - uglifier (4.1.20) + rexml (3.4.4) + rouge (4.7.0) + ruby-rc4 (0.1.5) + safe_yaml (1.0.5) + sass-embedded (1.102.0-arm64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.102.0-x86_64-linux-gnu) + google-protobuf (~> 4.31) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + terser (1.2.8) execjs (>= 0.3.0, < 3) - yell (2.0.7) + thor (1.5.0) + traces (0.18.2) + ttfunk (1.8.0) + bigdecimal (~> 3.1) + typhoeus (1.6.0) + ethon (>= 0.18.0) + unicode-display_width (2.6.0) + webrick (1.9.2) + yell (2.2.2) + zeitwerk (2.8.2) PLATFORMS - ruby + arm64-darwin-25 + x86_64-linux DEPENDENCIES + bundler-audit html-proofer - jekyll - jekyll-feed (~> 0.6) - jekyll-minifier - jekyll-seo-tag - jekyll-sitemap - minima (~> 2.0) - -RUBY VERSION - ruby 2.4.5p335 + jekyll (~> 4.4) + jekyll-feed (~> 0.17) + jekyll-minifier (~> 0.2) + jekyll-seo-tag (~> 2.8) + jekyll-sitemap (~> 1.4) + minima (~> 2.5) BUNDLED WITH - 2.0.1 + 2.4.1 diff --git a/README.md b/README.md index a6c527f..4e4b746 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ -![Travis build](https://travis-ci.org/ultimatecoder/Blog.svg?branch=master) - -# Blog - [Jaysinh's own heed](http://blog.jaysinh.com) +# Blog - [Jaysinh's own heed](https://ultimatecoder.github.io/Blog/) This repository contains backend tool I use to write and publish my blog. Since begining, I have invested more time in identifying proper flow than writing blog post. * Framework: Jekyll -* URL: http://blog.jaysinh.com +* URL: https://ultimatecoder.github.io/Blog/ +* Build/deploy: GitHub Actions ([`.github/workflows/`](.github/workflows)) — every pull request runs a build + link-check ([`ci.yml`](.github/workflows/ci.yml)), and pushes to `master` build and publish to GitHub Pages ([`pages.yml`](.github/workflows/pages.yml)). diff --git a/_config.yml b/_config.yml index 4cb194f..0a554cc 100644 --- a/_config.yml +++ b/_config.yml @@ -20,7 +20,9 @@ description: > # this means to ignore newlines until "baseurl:" and an Actor by gene. I write mostly on programming topics. Browse through my blog posts to identify my taste of writing. -baseurl: "" # the subpath of your site, e.g. /blog +# GitHub Pages project site path. Keep in sync with the "^/Blog" prefix +# in scripts/test's --swap-urls, which strips it for local link-checking. +baseurl: "/Blog" # the subpath of your site, e.g. /blog twitter_username: jaysinhp github_username: ultimatecoder @@ -29,7 +31,6 @@ markdown: kramdown theme: minima plugins: - jekyll-feed - - jekyll-minifier - jekyll-sitemap - jekyll-seo-tag exclude: @@ -37,7 +38,6 @@ exclude: - Gemfile.lock - vendor -google_analytics: UA-57792488-6 defaults: - scope: diff --git a/_config_production.yml b/_config_production.yml index f39f88f..88e7a08 100644 --- a/_config_production.yml +++ b/_config_production.yml @@ -1 +1 @@ -url: "http://blog.jaysinh.com" # the base hostname & protocol for your site, e.g. http://example.com +url: "https://ultimatecoder.github.io" # the base hostname & protocol for your site, e.g. https://example.com diff --git a/_posts/2016-12-30-book-review-i-want-2-do-project-tell-me-wat-2-do.md b/_posts/2016-12-30-book-review-i-want-2-do-project-tell-me-wat-2-do.md index 1b78ac7..440ef9e 100644 --- a/_posts/2016-12-30-book-review-i-want-2-do-project-tell-me-wat-2-do.md +++ b/_posts/2016-12-30-book-review-i-want-2-do-project-tell-me-wat-2-do.md @@ -6,7 +6,7 @@ tag: books excerpt: Inspirational book for students who are at a fresher level. --- -![i_want_2_do_project_tell_me_wat_2_do]({{ site.url}}/assets/images/book_image_i_want_2_do_project_tell_me_wat_2_do.jpg) +![i_want_2_do_project_tell_me_wat_2_do]({{ site.url}}{{ site.baseurl }}/assets/images/book_image_i_want_2_do_project_tell_me_wat_2_do.jpg) ## tl;dr diff --git a/_posts/2017-01-08-2016-a-year-dedicated-to-python-workshops.md b/_posts/2017-01-08-2016-a-year-dedicated-to-python-workshops.md index f57e1bc..c10db20 100644 --- a/_posts/2017-01-08-2016-a-year-dedicated-to-python-workshops.md +++ b/_posts/2017-01-08-2016-a-year-dedicated-to-python-workshops.md @@ -21,7 +21,7 @@ glance with a guess of getting less invitations. But the estimate went wrong. Below is the summary of yearly progress highlight with word of experience. ![Python workshop -piechart]({{site.url}}/assets/images/python_workshop_piechart.png) +piechart]({{site.url}}{{ site.baseurl }}/assets/images/python_workshop_piechart.png) During my last year I conducted 13 workshops at various colleges of state Gujarat and Rajasthan. 10 workshops were conducted targeting college @@ -66,7 +66,7 @@ living nearby Ahmedabad and want to contribute to this movement, please get in touch over email. -![Python Express Ahmedabad]({{site.url}}/assets/images/python_express_ahmedabad.jpg) +![Python Express Ahmedabad]({{site.url}}{{ site.baseurl }}/assets/images/python_express_ahmedabad.jpg) **"Teaching is the best way to learn."** @@ -87,7 +87,7 @@ You can download [Slides here](https://goo.gl/vTBhTh) and Photos ----------------- -![PG GTU Gandhinagar]({{site.url}}/assets/images/pg_gtu.jpg) +![PG GTU Gandhinagar]({{site.url}}{{ site.baseurl }}/assets/images/pg_gtu.jpg)

At PG GTU Gandhinagar @@ -95,7 +95,7 @@ Photos **- - -** -![kskv_kachchh_university]({{site.url}}/assets/images/kskvku_photo.jpg) +![kskv_kachchh_university]({{site.url}}{{ site.baseurl }}/assets/images/kskvku_photo.jpg)

At K.S.K.V. Kachchh University @@ -103,7 +103,7 @@ Photos **- - -** -![Polytechnic Gandhinagar]({{site.url}}/assets/images/polytechnic_gandhinagar.jpg) +![Polytechnic Gandhinagar]({{site.url}}{{ site.baseurl }}/assets/images/polytechnic_gandhinagar.jpg)

At Gujarat Polytechnic College, Gandhinagar @@ -111,7 +111,7 @@ Photos **- - -** -![Parul University]({{site.url}}/assets/images/parul_university.jpg) +![Parul University]({{site.url}}{{ site.baseurl }}/assets/images/parul_university.jpg)

At Parul University, Waghodia, Vadodara @@ -119,7 +119,7 @@ Photos **- - -** -![Nirma University]({{site.url}}/assets/images/nirma_university.jpg) +![Nirma University]({{site.url}}{{ site.baseurl }}/assets/images/nirma_university.jpg)

At Nirma Technology University, Ahmedabad @@ -127,7 +127,7 @@ Photos **- - -** -![Startup Gujarat]({{site.url}}/assets/images/startup_gujarat.jpg) +![Startup Gujarat]({{site.url}}{{ site.baseurl }}/assets/images/startup_gujarat.jpg)

At Startup Gujarat, Gandhinagar @@ -135,7 +135,7 @@ Photos **- - -** -![Ahmedabad Meetup]({{site.url}}/assets/images/ahmedabad_meetup.jpg) +![Ahmedabad Meetup]({{site.url}}{{ site.baseurl }}/assets/images/ahmedabad_meetup.jpg)

At @@ -146,7 +146,7 @@ Photos **- - -** -![DAIICT]({{site.url}}/assets/images/daiict.jpg) +![DAIICT]({{site.url}}{{ site.baseurl }}/assets/images/daiict.jpg)

At Dhirubhai Ambani Institute of Information and Communication Technology @@ -155,7 +155,7 @@ Photos **- - -** -![Engineering college Ajmer]({{site.url}}/assets/images/engineering_college_ajmer.jpg) +![Engineering college Ajmer]({{site.url}}{{ site.baseurl }}/assets/images/engineering_college_ajmer.jpg)

At Government Women Engineering College Ajmer @@ -163,7 +163,7 @@ Photos **- - -** -![Ahmedabad University]({{site.url}}/assets/images/aeg_ahmedabad.jpg) +![Ahmedabad University]({{site.url}}{{ site.baseurl }}/assets/images/aeg_ahmedabad.jpg)

At Ahmedabad University @@ -171,7 +171,7 @@ Photos **- - -** -![Pycon India]({{site.url}}/assets/images/pycon_india.jpg) +![Pycon India]({{site.url}}{{ site.baseurl }}/assets/images/pycon_india.jpg)

At PyCon India, New Delhi @@ -179,7 +179,7 @@ Photos **- - -** -![Macker Party]({{site.url}}/assets/images/macker_party.jpg) +![Macker Party]({{site.url}}{{ site.baseurl }}/assets/images/macker_party.jpg)

At Mozilla Maker Party Ahmedabad diff --git a/_posts/2017-01-22-visit-to-linux-user-group-chennai.md b/_posts/2017-01-22-visit-to-linux-user-group-chennai.md index 18d8559..de71038 100644 --- a/_posts/2017-01-22-visit-to-linux-user-group-chennai.md +++ b/_posts/2017-01-22-visit-to-linux-user-group-chennai.md @@ -7,7 +7,7 @@ excerpt: > meeting Mr. Shakthi Kannan. While travelling to Chennai I dropped a mail --- -![Indian Linux User Group Chennai]({{site.url}}/assets/images/ilugc.jpg) +![Indian Linux User Group Chennai]({{site.url}}{{ site.baseurl }}/assets/images/ilugc.jpg) Lately I was travelling to [Chennai](https://en.wikipedia.org/wiki/Chennai) for some personal work. I was very clear on meeting [Mr. Shakthi diff --git a/_posts/2017-02-28-book-review-introduction-to-the-commandline.md b/_posts/2017-02-28-book-review-introduction-to-the-commandline.md index ebaa456..8309243 100644 --- a/_posts/2017-02-28-book-review-introduction-to-the-commandline.md +++ b/_posts/2017-02-28-book-review-introduction-to-the-commandline.md @@ -13,7 +13,7 @@ excerpt: > programming language. The chapters are independent of each other. --- ![introduction_to_command_line]({{ site.url -}}/assets/images/book_image_introduction_to_the_commandline.jpg) +}}{{ site.baseurl }}/assets/images/book_image_introduction_to_the_commandline.jpg) ## tl;dr diff --git a/_posts/2017-03-14-pycon-pune-2017-a-wonderful-python-conference.md b/_posts/2017-03-14-pycon-pune-2017-a-wonderful-python-conference.md index dc5304e..9a9a651 100644 --- a/_posts/2017-03-14-pycon-pune-2017-a-wonderful-python-conference.md +++ b/_posts/2017-03-14-pycon-pune-2017-a-wonderful-python-conference.md @@ -13,7 +13,7 @@ excerpt: > --- ![pycon_pune_group_photo]({{ -site.url}}/assets/images/pycon_pune_group_photo.jpg) +site.url}}{{ site.baseurl }}/assets/images/pycon_pune_group_photo.jpg) ## tl;dr @@ -103,7 +103,7 @@ his experience of programming. He is authoring few books written in the Japanese language. Stephen is [Emacsite](https://www.gnu.org/s/emacs/). ![stephen_turnbull]({{ -site.url}}/assets/images/stephen_turnbull.jpg) +site.url}}{{ site.baseurl }}/assets/images/stephen_turnbull.jpg) #### [Terri Oda](https://twitter.com/terriko) @@ -123,7 +123,7 @@ discussing various authentication mechanisms for ReST API with him. He is a Red Hatter. ![gnu_mailman_team]({{ -site.url}}/assets/images/gnu_mailman_team.jpg) +site.url}}{{ site.baseurl }}/assets/images/gnu_mailman_team.jpg) #### [Nick Coghlan](https://twitter.com/ncoghlan_dev) @@ -153,7 +153,7 @@ conference days. ![pycon_pune_2017_keynote_speakers]({{ -site.url}}/assets/images/pycon_pune_2017_keynote_speakers.jpg) +site.url}}{{ site.baseurl }}/assets/images/pycon_pune_2017_keynote_speakers.jpg) #### Volunteer Party @@ -181,7 +181,7 @@ Turnbull and Florian Fuchs mentored for ![cpython_devsprint]({{ -site.url}}/assets/images/cpython_devsprint.jpg) +site.url}}{{ site.baseurl }}/assets/images/cpython_devsprint.jpg) #### Why attend this conference? diff --git a/_posts/2017-04-10-goyo-doc-vim-helpfile-for-goyo-plugin.md b/_posts/2017-04-10-goyo-doc-vim-helpfile-for-goyo-plugin.md index 1bcabcf..a4107d6 100644 --- a/_posts/2017-04-10-goyo-doc-vim-helpfile-for-goyo-plugin.md +++ b/_posts/2017-04-10-goyo-doc-vim-helpfile-for-goyo-plugin.md @@ -11,7 +11,7 @@ excerpt: > not useful at the time of using vim for writing. It provides certain --- -![goyo_doc_plugin]({{site.url}}/assets/images/goyo_doc_plugin.png) +![goyo_doc_plugin]({{site.url}}{{ site.baseurl }}/assets/images/goyo_doc_plugin.png) ### What is Goyo? diff --git a/_posts/2017-07-21-pydelhi-conf-2017-a-beautiful-conference-happend-at-new-delhi-india.md b/_posts/2017-07-21-pydelhi-conf-2017-a-beautiful-conference-happend-at-new-delhi-india.md index b4c5e25..242effd 100644 --- a/_posts/2017-07-21-pydelhi-conf-2017-a-beautiful-conference-happend-at-new-delhi-india.md +++ b/_posts/2017-07-21-pydelhi-conf-2017-a-beautiful-conference-happend-at-new-delhi-india.md @@ -13,7 +13,7 @@ excerpts: > --- ![PyDelhi Conf -2017]({{site.url}}/assets/images/pydelhi_conf_2017/group_photo.jpg) +2017]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/group_photo.jpg) ## TL;DR @@ -32,7 +32,7 @@ framework. ![PyDelhi -Community]({{site.url}}/assets/images/pydelhi_conf_2017/pydelhi_community.jpg) +Community]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/pydelhi_community.jpg)

PyDelhi conf 2017 volunteers

@@ -52,7 +52,7 @@ to mentor. ### [PyDelhi conf 2017][pydelhi_conf_2017] -![Conference T-shirt]({{site.url}}/assets/images/pydelhi_conf_2017/t_shirt.jpg) +![Conference T-shirt]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/t_shirt.jpg)

Conference T-shirt

@@ -70,15 +70,15 @@ early slot was given to workshops for both the days. One large conference hall was located on a 2nd floor of the building and two halls at the ground floor. Food and beverages were served on the base floor. -![Panel discussion]({{site.url}}/assets/images/pydelhi_conf_2017/pannel_disussion.jpg) +![Panel discussion]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/pannel_disussion.jpg)

Panel Discussion

-![Desk]({{site.url}}/assets/images/pydelhi_conf_2017/desk.jpg) +![Desk]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/desk.jpg)

Registration desk

-![Lunch]({{site.url}}/assets/images/pydelhi_conf_2017/lunch.jpg) +![Lunch]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/lunch.jpg)

Tea break

@@ -86,7 +86,7 @@ Food and beverages were served on the base floor. ### Keynote speakers -![Mr. Richardo Rocha]({{site.url}}/assets/images/pydelhi_conf_2017/ricardo.jpg) +![Mr. Richardo Rocha]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/ricardo.jpg) * [**Mr. Ricardo Rocha:**]( https://www.linkedin.com/in/ricardo-rocha-739aa718/?ppe=1) Mr. Rocha is a @@ -98,7 +98,7 @@ Food and beverages were served on the base floor. keep an eye on various Summer Internship Programs which are very similar to Google Summer of Code program. -![Mr. Chris Stucchio]({{site.url}}/assets/images/pydelhi_conf_2017/chris.jpg) +![Mr. Chris Stucchio]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/chris.jpg) * [**Mr. Chris Stucchio:**](https://www.chrisstucchio.com/) Mr. Stucchio is director of Data Science at [Wingify/ VWO](https://vwo.com/). I found him @@ -154,7 +154,7 @@ home and improve the slides. I heard from friends that the party was awesome! ### My workshop session -![Tango with Django]({{site.url}}/assets/images/pydelhi_conf_2017/talk_2.jpg) +![Tango with Django]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/talk_2.jpg)

Me conducting workshop

@@ -170,7 +170,7 @@ already a name of famous book solving the same purpose. ### Dev sprints -![Dev sprints]({{site.url}}/assets/images/pydelhi_conf_2017/devsprint.jpg) +![Dev sprints]({{site.url}}{{ site.baseurl }}/assets/images/pydelhi_conf_2017/devsprint.jpg)

Me hacking at dev sprints section

diff --git a/_posts/2017-08-28-how_to_repair_a_broken_grub_in_ubuntu.md b/_posts/2017-08-28-how_to_repair_a_broken_grub_in_ubuntu.md index 8611075..dd081d0 100644 --- a/_posts/2017-08-28-how_to_repair_a_broken_grub_in_ubuntu.md +++ b/_posts/2017-08-28-how_to_repair_a_broken_grub_in_ubuntu.md @@ -10,7 +10,7 @@ excerpt: Steps to restore your GRUB if you have formatted boot partition mistake --- ![How to repair a broken GRUB]({{ -site.url}}/assets/images/how_to_fix_broken_grub/grub_title.png) +site.url}}{{ site.baseurl }}/assets/images/how_to_fix_broken_grub/grub_title.png) ## Background story @@ -62,7 +62,7 @@ post might not work for you. To identify which type your system has booted with, first partition of the drive you are using for booting your operating system. ![Identify boot partition using gparted]({{ - site.url}}/assets/images/how_to_fix_broken_grub/gparted_identification_parition.png) + site.url}}{{ site.baseurl }}/assets/images/how_to_fix_broken_grub/gparted_identification_parition.png) In my case, it is `/dev/sda1`. This partition should be either [FAT32][fat32] or [FAT16][fat16]. If it is anything other than that you should format it to @@ -105,7 +105,7 @@ file. Use below command to get the latest **UUID** of your boot partition. ```sudo blkid /dev/sda1``` ![Identifying UUID of boot efi]({{ - site.url}}/assets/images/how_to_fix_broken_grub/uuid_blkid_shell.png) + site.url}}{{ site.baseurl }}/assets/images/how_to_fix_broken_grub/uuid_blkid_shell.png) Copy the value of **UUID** which is between the double quotes. @@ -116,7 +116,7 @@ file. Use below command to get the latest **UUID** of your boot partition. ```sudo vim /etc/fstab``` ![Updating the UUID to the etc fstab file]({{ - site.url}}/assets/images/how_to_fix_broken_grub/vim_etc_fstab.png) + site.url}}{{ site.baseurl }}/assets/images/how_to_fix_broken_grub/vim_etc_fstab.png) You will require the root privileges for writing to this file. diff --git a/_posts/2017-11-14-django-girls-bangalore-2017.md b/_posts/2017-11-14-django-girls-bangalore-2017.md index d7a3391..88d1e95 100644 --- a/_posts/2017-11-14-django-girls-bangalore-2017.md +++ b/_posts/2017-11-14-django-girls-bangalore-2017.md @@ -9,7 +9,7 @@ tag: --- ![group_photo]({{ -site.url}}/assets/images/django_girls_blr_2018/group_photo.jpg) +site.url}}{{ site.baseurl }}/assets/images/django_girls_blr_2018/group_photo.jpg) ## TL;DR diff --git a/_posts/2017-12-05-book-review-docker-up-running.md b/_posts/2017-12-05-book-review-docker-up-running.md index 27ee304..dd6db9b 100644 --- a/_posts/2017-12-05-book-review-docker-up-running.md +++ b/_posts/2017-12-05-book-review-docker-up-running.md @@ -10,7 +10,7 @@ tags: ![book image docker up and running]({{ -site.url}}/assets/images/book_review_docker_up_and_running/main.jpg) +site.url}}{{ site.baseurl }}/assets/images/book_review_docker_up_and_running/main.jpg) In the modern era of software engineering, terms are coined with a new wrapper. Such wrappers are required to make bread-and-butter out of it. Sometimes good diff --git a/_posts/2018-09-29-analyzing-the-behaviour-of-python-function-splice.md b/_posts/2018-09-29-analyzing-the-behaviour-of-python-function-splice.md index 9614233..ce24610 100644 --- a/_posts/2018-09-29-analyzing-the-behaviour-of-python-function-splice.md +++ b/_posts/2018-09-29-analyzing-the-behaviour-of-python-function-splice.md @@ -9,7 +9,7 @@ tag: --- -![Title Image](/assets/images/python_slice_function/title_image.jpg) +![Title Image]({{ site.baseurl }}/assets/images/python_slice_function/title_image.jpg) Last Friday, I was sitting in one of the good coffee shops in Bangalore with my friend. Coffee and discussion is the best combination to release stress. It was diff --git a/_posts/2019-01-13-python-3-7-feature-walkthrough.md b/_posts/2019-01-13-python-3-7-feature-walkthrough.md index 6abf340..5b0a265 100644 --- a/_posts/2019-01-13-python-3-7-feature-walkthrough.md +++ b/_posts/2019-01-13-python-3-7-feature-walkthrough.md @@ -31,7 +31,7 @@ in a built-in scope, you don't have to import it from any module. You can call this function to put breakpoints in your code. This approach is handier than importing ```pdb.set_trace()```. -![Breakpoint function in Python 3.7](/assets/images/walkthrough_python_3_7/breakpoint_example.gif) +![Breakpoint function in Python 3.7]({{ site.baseurl }}/assets/images/walkthrough_python_3_7/breakpoint_example.gif) Code used in above example @@ -52,7 +52,7 @@ single flag. But with this release, you can certainly reduce your pain by using your code by setting the environment variable ```PYTHONBREAKPOINT``` to ```0```. -![Breakpoint environment variable in Python 3.7](/assets/images/walkthrough_python_3_7/breakpoint_environment_variable_example.gif) +![Breakpoint environment variable in Python 3.7]({{ site.baseurl }}/assets/images/walkthrough_python_3_7/breakpoint_environment_variable_example.gif) ##### I advise putting "PYTHONBREAKPOINT=0" in your production environment to avoid unwanted pausing at forgotten breakpoints @@ -63,7 +63,7 @@ You can pipe the output of Standard Output Stream (stdout) and Standard Error Stream (stderr) by enabling ```capture_output``` parameter of ```subprocess.run()``` function. -![subprocess.run got capture_output parameter](/assets/images/walkthrough_python_3_7/subprocess_run_capture_output.gif) +![subprocess.run got capture_output parameter]({{ site.baseurl }}/assets/images/walkthrough_python_3_7/subprocess_run_capture_output.gif) You should note that it is an improvement over piping the stream manually. For example, ```subprocess.run(["ls", "-l", "/var"], stdout=subprocess.PIPE, @@ -84,7 +84,7 @@ put obvious constructor code for you. Additionally, it defines a behaviour for dander methods ```__repr__()```, ```__eq__()``` and ```__hash__()```. -![Dataclasses.dataclass](/assets/images/walkthrough_python_3_7/dataclasses_dataclass.gif) +![Dataclasses.dataclass]({{ site.baseurl }}/assets/images/walkthrough_python_3_7/dataclasses_dataclass.gif) Below is the code before introducing a ```dataclasses.dataclass``` decorator. @@ -116,7 +116,7 @@ The namedtuples are a very helpful data structure, yet I found it is less known amongst developers. With this release, you can set default values to argument variables. -![Namedtuples with default arguments](/assets/images/walkthrough_python_3_7/namedtuple_example.gif) +![Namedtuples with default arguments]({{ site.baseurl }}/assets/images/walkthrough_python_3_7/namedtuple_example.gif) ##### Note: Default arguments will be assigned from left to right. In the above example, default value ``2`` will be assigned to variable ``y`` diff --git a/about.md b/about.md index 08e8a9c..e1f092f 100644 --- a/about.md +++ b/about.md @@ -4,7 +4,7 @@ title: About permalink: /about/ --- -![my_image]({{ site.url}}/assets/images/my_profile_picture.jpg) +![my_image]({{ site.url}}{{ site.baseurl }}/assets/images/my_profile_picture.jpg) Hi, I am Full-stack developer by profession, Computer scientist by heart and diff --git a/keypair.pem.enc b/keypair.pem.enc deleted file mode 100644 index f3e407d..0000000 Binary files a/keypair.pem.enc and /dev/null differ diff --git a/scripts/build b/scripts/build index 82f8038..6125c05 100755 --- a/scripts/build +++ b/scripts/build @@ -1,3 +1,4 @@ #!/bin/bash +set -euo pipefail bundle exec jekyll build diff --git a/scripts/deploy b/scripts/deploy deleted file mode 100755 index 16c8224..0000000 --- a/scripts/deploy +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rsync -avr --rsh="ssh -i keypair.pem -o StrictHostKeyChecking=no" --delete-after --delete-excluded _site/ travis_ftp@jaysinh.com:/blog/ || exit diff --git a/scripts/test b/scripts/test index 6523fd2..534cbaf 100755 --- a/scripts/test +++ b/scripts/test @@ -1,2 +1,30 @@ +#!/usr/bin/env bash +set -euo pipefail + +export LANG=en_US.UTF-8 + ./scripts/build -bundle exec htmlproofer ./_site/ --only-4xx + +# External URLs htmlproofer should not fail on. Two reasons appear here: +# dead — confirmed 404/gone, unrelated to this repo +# ci-block — live (200 from a browser) but returns 403 to GitHub Actions' +# shared runner IPs, i.e. bot/WAF blocking, not a broken link +ignore_urls=( + "https://drive.google.com/file/d/0B_TmiicGbqjHb2ZGcE5QYmtXRHc/view?usp=sharing" # dead + "https://reps.mozilla.org/e/maker-party-gujarat/" # dead + "https://sayanchowdhury.dgplug.org/" # dead + "https://github.com/moby/moby/blob/master/CHANGELOG.md#180-2015-08-11" # dead + "https://www.ahduni.edu.in/" # ci-block + "https://pythonexpress.in/" # ci-block + "https://www.hackerearth.com" # ci-block +) +# htmlproofer wants a single comma-separated string. +ignore_urls_csv=$(IFS=,; echo "${ignore_urls[*]}") + +# _site/ is the site root on disk, but pages link internally with the +# "/Blog" baseurl (this is a GitHub Pages project site, not a custom +# domain) — strip it so internal-link checks resolve against ./_site/. +# Keep this "^/Blog" prefix in sync with baseurl in _config.yml. +bundle exec htmlproofer ./_site/ --only-4xx --no-enforce-https \ + --swap-urls "^/Blog:" \ + --ignore-urls "$ignore_urls_csv"