From 597b1405d99b1500783fa217871d1ee37fa62a3b Mon Sep 17 00:00:00 2001 From: Hubot Date: Wed, 5 Aug 2020 13:57:04 -0500 Subject: [PATCH 1/3] Update jekyll to :gem: v3.9.0 --- lib/github-pages/dependencies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github-pages/dependencies.rb b/lib/github-pages/dependencies.rb index 932f4cf6..aa26a088 100644 --- a/lib/github-pages/dependencies.rb +++ b/lib/github-pages/dependencies.rb @@ -7,7 +7,7 @@ module GitHubPages class Dependencies VERSIONS = { # Jekyll - "jekyll" => "3.8.7", + "jekyll" => "3.9.0", "jekyll-sass-converter" => "1.5.2", # Converters From aaf0227d2c0cf216177a778bcf804a550e850a02 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 5 Aug 2020 15:38:47 -0400 Subject: [PATCH 2/3] Upgrade to kramdown v2 and add kramdown-parser-gfm to allow GFM input --- lib/github-pages/dependencies.rb | 3 ++- spec/fixtures/kramdown-parser-gfm.md | 6 ++++++ spec/github-pages/dependencies_spec.rb | 2 +- spec/github-pages/integration_spec.rb | 6 ++++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 spec/fixtures/kramdown-parser-gfm.md diff --git a/lib/github-pages/dependencies.rb b/lib/github-pages/dependencies.rb index aa26a088..a97c879c 100644 --- a/lib/github-pages/dependencies.rb +++ b/lib/github-pages/dependencies.rb @@ -11,7 +11,8 @@ class Dependencies "jekyll-sass-converter" => "1.5.2", # Converters - "kramdown" => "1.17.0", + "kramdown" => "2.3.0", + "kramdown-parser-gfm" => "1.1.0", "jekyll-commonmark-ghpages" => "0.1.6", # Misc diff --git a/spec/fixtures/kramdown-parser-gfm.md b/spec/fixtures/kramdown-parser-gfm.md new file mode 100644 index 00000000..fa8c7e25 --- /dev/null +++ b/spec/fixtures/kramdown-parser-gfm.md @@ -0,0 +1,6 @@ +--- +--- + +# Test + +~~Nope~~Yes diff --git a/spec/github-pages/dependencies_spec.rb b/spec/github-pages/dependencies_spec.rb index 1e592eb0..619e9739 100644 --- a/spec/github-pages/dependencies_spec.rb +++ b/spec/github-pages/dependencies_spec.rb @@ -4,7 +4,7 @@ describe(GitHubPages::Dependencies) do CORE_DEPENDENCIES = %w( - jekyll kramdown liquid rouge jekyll-sass-converter + jekyll kramdown kramdown-parser-gfm liquid rouge jekyll-sass-converter github-pages-health-check ).freeze PLUGINS = described_class::VERSIONS.keys - CORE_DEPENDENCIES diff --git a/spec/github-pages/integration_spec.rb b/spec/github-pages/integration_spec.rb index 0e7c097d..034e2790 100644 --- a/spec/github-pages/integration_spec.rb +++ b/spec/github-pages/integration_spec.rb @@ -95,6 +95,12 @@ def rm_destination end end + context "kramdown-parser-gfm" do + it "converts GFM to HTML" do + expect(contents).to match("NopeYes") + end + end + context "liquid" do it "renders liquid templates" do expect(contents).to match("Value of foo: bar") From 044a9e1d4e8b94d7007125c895b0c9f5f4072e93 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 6 Aug 2020 14:50:10 -0400 Subject: [PATCH 3/3] Add test to ensure TeX is properly converted by kramdown --- spec/fixtures/kramdown.md | 4 ++++ spec/github-pages/integration_spec.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/spec/fixtures/kramdown.md b/spec/fixtures/kramdown.md index ef355dc0..6ab7ec60 100644 --- a/spec/fixtures/kramdown.md +++ b/spec/fixtures/kramdown.md @@ -2,3 +2,7 @@ --- # Test + +### Math + +$$a^2 + b^2 = c^2$$ diff --git a/spec/github-pages/integration_spec.rb b/spec/github-pages/integration_spec.rb index 034e2790..339277bd 100644 --- a/spec/github-pages/integration_spec.rb +++ b/spec/github-pages/integration_spec.rb @@ -93,6 +93,10 @@ def rm_destination it "converts markdown to HTML" do expect(contents).to match('

Test

') end + + it "converts math to mathjax" do + expect(contents).to include('\[a^2 + b^2 = c^2\]') + end end context "kramdown-parser-gfm" do