diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a7b945925..0dd545f26 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,20 +4,18 @@ name: "Jekyll CI" - # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [ master ] + branches: [master] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [master] # Triggers the workflow on push or pull request events but only for the main branch schedule: # Runs at 6am UTC every Monday - - cron: '0 6 * * 1' - + - cron: "0 6 * * 1" jobs: # Check the Jekyll itself for errors and syntax @@ -28,7 +26,7 @@ jobs: # Check that the Jekyll can actually build steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build the site in the jekyll/builder container run: | docker run \ @@ -43,13 +41,13 @@ jobs: # Check markdown files are markdown-lint compliant steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Lint markdown files with markdown-lint uses: articulate/actions-markdownlint@v1.1.0 with: # Includes some specific rules to ignore config: .github/workflows/markdownlint-config.json - files: '_posts/**/*.md' + files: "_posts/**/*.md" # Ignore the built website, might have some funky files ignore: _site/ # Try to fix basic errors diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 59b376190..38c3adac4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Deploy Site on: push: - branches: [ master ] + branches: [master] workflow_dispatch: jobs: @@ -11,7 +11,7 @@ jobs: outputs: target: ${{ steps.set-output.outputs.target }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: get deployment target run: | @@ -44,14 +44,14 @@ jobs: if: needs.set-deploy-type.outputs.target == 'gh-pages' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Deploy Jekyll Site - uses: sujaykundu777/jekyll-deploy-action@1.0.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} + - name: Deploy Jekyll Site + uses: sujaykundu777/jekyll-deploy-action@1.0.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} + GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} deploy-firebase: runs-on: ubuntu-latest @@ -59,22 +59,22 @@ jobs: if: needs.set-deploy-type.outputs.target == 'firebase' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: setup ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true + - name: setup ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - - name: build jekyll - run: | - bundle install - bundle exec jekyll build + - name: build jekyll + run: | + bundle install + bundle exec jekyll build - - name: deploy to firebase - uses: w9jds/firebase-action@master - with: - args: deploy --only hosting - env: - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} - PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} + - name: deploy to firebase + uses: w9jds/firebase-action@master + with: + args: deploy --only hosting + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} diff --git a/.ruby-version b/.ruby-version index 7bde84d06..6d5369b96 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.1.2 +ruby-3.3.4 diff --git a/DEPLOY_STRATEGY b/DEPLOY_STRATEGY index 621e94f0e..714238f39 100644 --- a/DEPLOY_STRATEGY +++ b/DEPLOY_STRATEGY @@ -1 +1 @@ -none +gh-pages diff --git a/Gemfile b/Gemfile index c0233fca2..2de203b02 100644 --- a/Gemfile +++ b/Gemfile @@ -1,27 +1,32 @@ source "https://rubygems.org" -gem 'jekyll', '~> 4.3.2' -gem 'bundler', '~> 2.3.7' +gem 'jekyll', '~> 4.3.3' +gem 'bundler', '~> 2.5.15' gem 'faraday-retry' -gem 'backports', '~> 3.23' +gem 'backports', '~> 3.25.0' gem 'kramdown' gem 'puma' - +gem 'csv' +gem 'base64' # 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 +# you can read more about it here +# https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll +# https://pages.github.com/versions/ # Plugins group :jekyll_plugins do # gem 'devlopr', '~> 0.4.5' - gem 'jgd', '~> 1.12' + gem 'jgd', '~> 1.14.0' gem 'jekyll-feed', '~> 0.17.0' gem 'jekyll-paginate', '~> 1.1.0' gem 'jekyll-gist', '~> 1.5.0' gem 'jekyll-seo-tag', '~> 2.8.0' gem 'jekyll-sitemap', '~> 1.4.0' - gem 'jekyll-admin', '~> 0.11.1' + + # gem 'jekyll-admin', '~> 0.11.1' end @@ -34,4 +39,5 @@ end # Performance-booster for watching directories on Windows gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? -gem "webrick", "~> 1.7" \ No newline at end of file +gem "webrick", "~> 1.7" +gem "ffi", "~> 1.16.3" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 53f796dbb..d6de87ac6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,37 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) - backports (3.23.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + backports (3.25.0) + base64 (0.2.0) + bigdecimal (3.1.8) colorator (1.1.0) - concurrent-ruby (1.2.0) + concurrent-ruby (1.3.3) + csv (3.3.0) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) - faraday (2.7.4) - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - faraday-retry (2.0.0) + faraday (2.10.0) + faraday-net_http (>= 2.0, < 3.2) + logger + faraday-net_http (3.1.0) + net-http + faraday-retry (2.2.1) faraday (~> 2.0) - ffi (1.15.5) + ffi (1.16.3) forwardable-extended (2.6.0) - google-protobuf (3.21.12-x86_64-darwin) - google-protobuf (3.21.12-x86_64-linux) + google-protobuf (4.27.2-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.27.2-x86_64-linux) + bigdecimal + rake (>= 13) http_parser.rb (0.8.0) - i18n (1.12.0) + i18n (1.14.5) concurrent-ruby (~> 1.0) - jekyll (4.3.2) + jekyll (4.3.3) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -39,10 +47,6 @@ GEM safe_yaml (~> 1.0) terminal-table (>= 1.8, < 4.0) webrick (~> 1.7) - jekyll-admin (0.11.1) - jekyll (>= 3.7, < 5.0) - sinatra (>= 1.4) - sinatra-contrib (>= 1.4) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) @@ -56,86 +60,82 @@ GEM jekyll (>= 3.7, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - jgd (1.12) - jekyll (>= 1.5.1) - trollop (= 2.9.9) + jgd (1.14.0) + jekyll (>= 1) + trollop (>= 2) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.4) - listen (3.8.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.0) mercenary (0.4.0) - multi_json (1.15.0) - mustermann (3.0.0) - ruby2_keywords (~> 0.0.1) - nio4r (2.5.8) + net-http (0.4.1) + uri + nio4r (2.7.3) octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (5.0.1) - puma (6.0.2) + public_suffix (6.0.0) + puma (6.4.2) nio4r (~> 2.0) - rack (2.2.6.2) - rack-protection (3.0.5) - rack - rake (13.0.6) + rake (13.2.1) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.2.5) - rouge (4.0.1) - ruby2_keywords (0.0.5) + rexml (3.3.1) + strscan + rouge (4.3.0) safe_yaml (1.0.5) - sass-embedded (1.58.0) - google-protobuf (~> 3.21) - rake (>= 10.0.0) + sass-embedded (1.77.5-arm64-darwin) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.77.5-x86_64-darwin) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.77.5-x86_64-linux-gnu) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.77.5-x86_64-linux-musl) + google-protobuf (>= 3.25, < 5.0) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - sinatra (3.0.5) - mustermann (~> 3.0) - rack (~> 2.2, >= 2.2.4) - rack-protection (= 3.0.5) - tilt (~> 2.0) - sinatra-contrib (3.0.5) - multi_json - mustermann (~> 3.0) - rack-protection (= 3.0.5) - sinatra (= 3.0.5) - tilt (~> 2.0) + strscan (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - tilt (2.0.11) - trollop (2.9.9) + trollop (2.9.10) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2022.7) + tzinfo-data (1.2024.1) tzinfo (>= 1.0.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) + uri (0.13.0) wdm (0.1.1) webrick (1.8.1) PLATFORMS + arm64-darwin-23 universal-darwin-21 x86_64-linux + x86_64-linux-musl DEPENDENCIES - backports (~> 3.23) - bundler (~> 2.3.7) + backports (~> 3.25.0) + base64 + bundler (~> 2.5.15) + csv faraday-retry - jekyll (~> 4.3.2) - jekyll-admin (~> 0.11.1) + ffi (~> 1.16.3) + jekyll (~> 4.3.3) jekyll-feed (~> 0.17.0) jekyll-gist (~> 1.5.0) jekyll-paginate (~> 1.1.0) jekyll-seo-tag (~> 2.8.0) jekyll-sitemap (~> 1.4.0) - jgd (~> 1.12) + jgd (~> 1.14.0) kramdown puma tzinfo (~> 2.0) @@ -144,4 +144,4 @@ DEPENDENCIES webrick (~> 1.7) BUNDLED WITH - 2.3.7 + 2.5.15 diff --git a/README.md b/README.md index 53990e8fa..8aa90e27a 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,17 @@ or if you want to try fast : ## Local Development Steps : -### Clone Locally: +Step 1: Fork this repo with your github username. + +Step 2: Clone Locally ```s $ git clone https://github.com/your_github_username/your_github_username.github.io.git $ cd your_github_username ``` + +Step 3: Now follow the below guides based on your OS. + ### For Linux : (Ubuntu 20.04) To work locally with ubuntu, follow this commands. @@ -96,51 +101,100 @@ $ bundle exec jekyll serve Start the server locally at http://127.0.0.1:4000/ or http://localhost:4000/ ### For MacOS : + Run the following in your terminal : -1. Install Homebrew +#### Option 1. Install ruby using Homebrew `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` +`brew install ruby` + +Add the below in ~/.zshrc file: + +Edit either the ~/.zshrc and ~/.zprofile files: + +`$ open -e ~/.zshrc` + +### For Mac M1, M2, M3 + +```sh +# override system ruby with homebrew-installed ruby +if [ -d "/opt/homebrew/opt/ruby/bin" ]; then + export PATH=/opt/homebrew/opt/ruby/bin:$PATH + export PATH=`gem environment gemdir`/bin:$PATH +``` + +### For Mac Intel + +On Mac Intel, add this at the end of your ~/.zshrc or ~/.zprofile file. + +```sh +if [ -d "/usr/local/opt/ruby/bin" ]; then + export PATH=/usr/local/opt/ruby/bin:$PATH + export PATH=`gem environment gemdir`/bin:$PATH +fi +``` +Save the file. This sets the Homebrew-installed Ruby to a higher priority than the system Ruby and adds the directory used for Ruby gems. + +### Reset the shell session +Close and reopen the Terminal window to pick up the changes to the configuration file. Or enter source ~/.zshrc or source ~/.zprofile to reset the shell environment without closing the Terminal window. + +```sh +$ source ~/.zprofile +$ source ~/.zshrc +``` +The source command reads and executes a shell script file, resetting the shell environment. + +You should be able to see this : +```sh +$ ruby -v +ruby 3.3.4 (2024-07-09 revision be1089c8ec) [arm64-darwin23] +``` + 2. Install churby and ruby-install with Homebrew -`brew install chruby ruby-install` +We will be using [ruby-install](https://github.com/postmodern/ruby-install) to install ruby and [chruby](https://github.com/postmodern/chruby) to change the current ruby version. -3. Install latest ruby version +`brew install chruby ruby-install` + Install latest ruby version `ruby-install ruby` -4. This will take a few minutes, and once it’s done, configure your shell to automatically use chruby: +This will take a few minutes, and once it’s done, configure your shell to automatically use chruby: ```sh echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc -echo "chruby ruby-3.1.2" >> ~/.zshrc +echo "chruby ruby-3.3.4" >> ~/.zshrc ``` +If you are facing any problems not getting the version that you just now installed, here is a amazing guide : +[how to uninstall ruby on mac](https://mac.install.guide/ruby/9) + If you’re using Bash, replace *.zshrc* with *.bash_profile*. Quit and relaunch Terminal, then check that everything is working: `$ ruby -v` -ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21] +ruby 3.3.4 (2024-07-09 revision be1089c8ec) [arm64-darwin23] 5. Install latest gems -```s +```sh $ gem install jekyll bundler +$ gem update --system 3.5.15 $ bundler -v -Bundler version 2.3.23 +Bundler version 2.5.15 $ bundle update $ bundle exec jekyll -v -jekyll 4.2.2 +jekyll 4.3.3 $ bundle exec jekyll serve --livereload ``` - ### Security We use codeQL and dependabot alerts for vulnerabality analysis & fixes. diff --git a/_config.yml b/_config.yml index bb04485a4..2d9847a0c 100644 --- a/_config.yml +++ b/_config.yml @@ -71,16 +71,16 @@ author_project_details: visibility: true # social links -twitter_username: johndoe +twitter_username: xplor4r github_username: sujaykundu777 -facebook_username: johndoe -linkedin_username: johndoe -behance_username: johndoe -instagram_username: johndoe -medium_username: johndoe -telegram_username: johndoe -dribbble_username: johndoe -flickr_username: johndoe +instagram_username: xplor4r +# facebook_username: johndoe +# linkedin_username: johndoe +# behance_username: johndoe +# medium_username: johndoe +# telegram_username: johndoe +# dribbble_username: johndoe +# flickr_username: johndoe #for comments ( we got Disqus and Hyvor Commenting, uncomment the one you want to use ) @@ -163,17 +163,20 @@ plugins: - jekyll-gist - jekyll-seo-tag - jekyll-sitemap - - jekyll-admin + - jekyll-feed + + # jekyll admin is causing issues with github pages, so it's disabled by default + # - jekyll-admin # Jekyll Admin Config -jekyll_admin: +# jekyll_admin: # hidden_links: # - posts # - pages # - staticfiles # - datafiles # - configuration - homepage: "posts" + # homepage: "posts" # Exclude from processing. diff --git a/devlopr.gemspec b/devlopr.gemspec index 6194f4da1..505c3bc2e 100644 --- a/devlopr.gemspec +++ b/devlopr.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "devlopr" - spec.version = "0.4.9" + spec.version = "0.5.0" spec.authors = ["Sujay Kundu"] spec.email = ["sujaykundu777@gmail.com"] @@ -22,8 +22,8 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "jekyll-seo-tag", '~> 2.6.1' spec.add_runtime_dependency "jekyll-paginate", '~> 1.1.0' spec.add_runtime_dependency "jekyll-gist", '~> 1.5.0' - spec.add_runtime_dependency "jekyll-admin", '~> 0.11.0' + # spec.add_runtime_dependency "jekyll-admin", '~> 0.11.0' - spec.add_development_dependency "bundler", "~> 2.3.15" - spec.add_development_dependency "rake", "~> 13.0" + spec.add_development_dependency "bundler", "~> 2.5.15" + spec.add_development_dependency "rake", "~> 13.2.1" end \ No newline at end of file