From 9bc5971e3de5248c7a4148e4f5b79bdac32c4912 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:38:47 -0800 Subject: [PATCH 01/11] Bump commonmarker to the latest --- .github/CODEOWNERS | 2 ++ .gitignore | 1 + README.md | 4 +++- jekyll-commonmark-ghpages.gemspec | 9 +++++---- spec/test_spec.rb | 4 ++-- 5 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..9529e05 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Automatically add our team to each pull request in this repo +* @github/pages-reviewers diff --git a/.gitignore b/.gitignore index a9ab0c7..99b312d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ Gemfile.lock spec/dest .bundle +vendor/ diff --git a/README.md b/README.md index ee2242e..bfaed24 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ To specify extensions and options for use in converting Markdown to HTML, supply ```yaml commonmark: - options: ["SMART", "FOOTNOTES"] + options: ["UNSAFE", "SMART", "FOOTNOTES"] extensions: ["strikethrough", "autolink", "table", "tagfilter"] ``` + +⚠ The `UNSAFE` option is required for HTML rendering. diff --git a/jekyll-commonmark-ghpages.gemspec b/jekyll-commonmark-ghpages.gemspec index f40c60b..fbc6e75 100644 --- a/jekyll-commonmark-ghpages.gemspec +++ b/jekyll-commonmark-ghpages.gemspec @@ -3,9 +3,9 @@ Gem::Specification.new do |spec| spec.name = "jekyll-commonmark-ghpages" spec.summary = "CommonMark generator for Jekyll" - spec.version = "0.1.6" - spec.authors = ["Ashe Connor"] - spec.email = "kivikakk@github.com" + spec.version = "0.2.0" + spec.authors = ["GitHub, Inc."] + spec.email = "support@github.com" spec.homepage = "https://github.com/github/jekyll-commonmark-ghpages" spec.licenses = ["MIT"] @@ -14,8 +14,9 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.add_runtime_dependency "jekyll", "~> 3.9.0" spec.add_runtime_dependency "jekyll-commonmark", "~> 1.2" - spec.add_runtime_dependency "commonmarker", "~> 0.17.6" + spec.add_runtime_dependency "commonmarker", "~> 0.23.4" spec.add_runtime_dependency "rouge", ">= 2.0", "< 4.0" spec.add_development_dependency "rspec", "~> 3.0" diff --git a/spec/test_spec.rb b/spec/test_spec.rb index 2391876..52892e1 100644 --- a/spec/test_spec.rb +++ b/spec/test_spec.rb @@ -21,7 +21,7 @@ let(:converter) { Jekyll::Converters::Markdown::CommonMarkGhPages.new(config) } let(:config) { {"commonmark" => { - "options" => ["SMART", "FOOTNOTES"], + "options" => ["UNSAFE", "SMART", "FOOTNOTES"], "extensions" => ["tagfilter"], }} } @@ -32,7 +32,7 @@ describe Jekyll::Renderer do it "should not re-process markdown in a liquid tag" do - site = Jekyll::Site.new(Jekyll.configuration("markdown" => "CommonMarkGhPages")) + site = Jekyll::Site.new(Jekyll.configuration("markdown" => "CommonMarkGhPages", "commonmark" => { "options" => ["UNSAFE"] })) collection = Jekyll::Collection.new(site, "pages") document = Jekyll::Document.new("hello.md", site: site, collection: collection) document.content = "**Hi**\n" \ From 19abd8e0fe26c564ef8fe8578c7c49bbceb008fe Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:43:51 -0800 Subject: [PATCH 02/11] Add draft ci --- .github/workflows/ci.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..753444f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,17 @@ +on: push +name: ci +jobs: + build: + name: Test + strategy: + matrix: + ruby: [2.5, 2.6, 2.7] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@master + - uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: script/cibuild + run: script/cibuild From 9d8362c5b7110ea8ae4bc7e787f4212ae2318c25 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:45:37 -0800 Subject: [PATCH 03/11] Install dependencies --- script/cibuild | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/cibuild b/script/cibuild index 45d681a..440cc4a 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,3 +1,7 @@ #!/bin/bash +# Install dependencies +bundle install + +# Run tests bundle exec rspec From b267c1c521f5ac3bb05891c2c4455dc202a5474c Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:47:51 -0800 Subject: [PATCH 04/11] Install bundler in the ci --- .github/workflows/ci.yaml | 2 ++ script/cibuild | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 753444f..e82451e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,5 +13,7 @@ jobs: - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} + - name: install bundler + run: gem install bundler - name: script/cibuild run: script/cibuild diff --git a/script/cibuild b/script/cibuild index 440cc4a..d4d4d37 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,7 +1,4 @@ #!/bin/bash -# Install dependencies -bundle install - # Run tests bundle exec rspec From ff47b16dce632f65aa929ae3b0e718ae29d912c9 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:50:16 -0800 Subject: [PATCH 05/11] More tweaks --- .github/workflows/ci.yaml | 19 ------------------- script/cibuild | 6 ++++++ 2 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index e82451e..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,19 +0,0 @@ -on: push -name: ci -jobs: - build: - name: Test - strategy: - matrix: - ruby: [2.5, 2.6, 2.7] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@master - - uses: actions/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: install bundler - run: gem install bundler - - name: script/cibuild - run: script/cibuild diff --git a/script/cibuild b/script/cibuild index d4d4d37..f6de452 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,4 +1,10 @@ #!/bin/bash +# Install bundler +gem install bundler + +# Install dependencies +bundle install + # Run tests bundle exec rspec From da7384e059a0c7897bc20906237bc2dc2af09d73 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:50:53 -0800 Subject: [PATCH 06/11] Add file --- .github/workflows/cibuild.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/cibuild.yaml diff --git a/.github/workflows/cibuild.yaml b/.github/workflows/cibuild.yaml new file mode 100644 index 0000000..31ca302 --- /dev/null +++ b/.github/workflows/cibuild.yaml @@ -0,0 +1,17 @@ +on: push +name: cibuild +jobs: + build: + name: Test + strategy: + matrix: + ruby: [2.5, 2.6, 2.7] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@master + - uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: script/cibuild + run: script/cibuild From 58ff409254e518649e27cac90d8a6f4d6b5d69ef Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:52:51 -0800 Subject: [PATCH 07/11] Remove Ruby 2.5 --- .github/workflows/cibuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cibuild.yaml b/.github/workflows/cibuild.yaml index 31ca302..2d0630f 100644 --- a/.github/workflows/cibuild.yaml +++ b/.github/workflows/cibuild.yaml @@ -5,7 +5,7 @@ jobs: name: Test strategy: matrix: - ruby: [2.5, 2.6, 2.7] + ruby: [2.6, 2.7] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: From db27c319d7a15e7bb6ad2b24015fb08f507c40da Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:55:57 -0800 Subject: [PATCH 08/11] Update actions --- .github/workflows/cibuild.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cibuild.yaml b/.github/workflows/cibuild.yaml index 2d0630f..e024933 100644 --- a/.github/workflows/cibuild.yaml +++ b/.github/workflows/cibuild.yaml @@ -5,12 +5,12 @@ jobs: name: Test strategy: matrix: - ruby: [2.6, 2.7] + ruby: [2.5, 2.6, 2.7] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@master - - uses: actions/setup-ruby@v1 + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: script/cibuild From 795728c1fdc58bdcb835f13fcc6fe3b246c1a97d Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 14:59:26 -0800 Subject: [PATCH 09/11] Drop 2.5 and update rubygems --- .github/workflows/cibuild.yaml | 2 +- script/cibuild | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cibuild.yaml b/.github/workflows/cibuild.yaml index e024933..bd81017 100644 --- a/.github/workflows/cibuild.yaml +++ b/.github/workflows/cibuild.yaml @@ -5,7 +5,7 @@ jobs: name: Test strategy: matrix: - ruby: [2.5, 2.6, 2.7] + ruby: [2.6, 2.7] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/script/cibuild b/script/cibuild index f6de452..c785b3f 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,5 +1,8 @@ #!/bin/bash +# Update gems +gem update --system 3.2.3 + # Install bundler gem install bundler From f0317295b03da1fbc850a9cc2ed1a842d5a2bacf Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 15:03:01 -0800 Subject: [PATCH 10/11] Remove old CI --- .travis.yml | 22 ---------------------- README.md | 3 +-- appveyor.yml | 23 ----------------------- 3 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a538dc5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: ruby -cache: bundler -rvm: - - 2.4 - - 2.3 -git: - depth: 1 - -sudo: false - -addons: - apt: - sources: - - kalakris-cmake - packages: - - cmake - -before_install: - - gem install bundler - -before_script: bundle update -script: script/cibuild diff --git a/README.md b/README.md index bfaed24..9145f77 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ *GitHub Flavored Markdown converter for Jekyll, based on [`jekyll-commonmark`](https://github.com/jekyll/jekyll-commonmark)* [![Gem Version](https://img.shields.io/gem/v/jekyll-commonmark-ghpages.svg)](https://rubygems.org/gems/jekyll-commonmark-ghpages) -[![Build Status](https://img.shields.io/travis/github/jekyll-commonmark-ghpages/master.svg)](https://travis-ci.org/github/jekyll-commonmark-ghpages) -[![Windows Build status](https://img.shields.io/appveyor/ci/github/jekyll-commonmark-ghpages/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/github/jekyll-commonmark-ghpages) +[![Build Status](https://github.com/github/jekyll-commonmark-ghpages/actions/workflows/cibuild.yaml/badge.svg)](https://github.com/github/jekyll-commonmark-ghpages/actions/workflows/cibuild.yaml) Jekyll Markdown converter that uses [libcmark-gfm](https://github.com/github/cmark), GitHub's fork of [cmark](https://github.com/commonmark/cmark), the reference parser for CommonMark, with some additions to ensure compatibility with existing Kramdown-based sites. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ad534c8..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: "{build}" -clone_depth: 5 -build: off - -install: - - SET PATH=C:\Ruby%RUBY_FOLDER_VER%\bin;%PATH% - - bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle - -environment: - matrix: - - RUBY_FOLDER_VER: "24" - - RUBY_FOLDER_VER: "24-x64" - - RUBY_FOLDER_VER: "23" - - RUBY_FOLDER_VER: "22" - -test_script: - - ruby --version - - gem --version - - bundler --version - - bash script/cibuild - -cache: - - 'vendor\bundle -> appveyor.yml,Gemfile,jekyll-commonmark-ghpages.gemspec' From 8097a8878b74b5bf2a43f041f926b4713ed2687a Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Thu, 3 Mar 2022 15:11:18 -0800 Subject: [PATCH 11/11] Also bump jekyll-commonmark --- jekyll-commonmark-ghpages.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll-commonmark-ghpages.gemspec b/jekyll-commonmark-ghpages.gemspec index fbc6e75..5fe9df0 100644 --- a/jekyll-commonmark-ghpages.gemspec +++ b/jekyll-commonmark-ghpages.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_runtime_dependency "jekyll", "~> 3.9.0" - spec.add_runtime_dependency "jekyll-commonmark", "~> 1.2" + spec.add_runtime_dependency "jekyll-commonmark", "~> 1.4.0" spec.add_runtime_dependency "commonmarker", "~> 0.23.4" spec.add_runtime_dependency "rouge", ">= 2.0", "< 4.0"