From a218f886d18bd3935b312134ec1e200111538a98 Mon Sep 17 00:00:00 2001 From: Gabriel Staples Date: Thu, 31 Dec 2020 00:04:12 -0800 Subject: [PATCH 1/5] Rakefile & README.md: make rake open jekyll at port 4001... ...instead of port 4000, since port 4000 interferes with programs such as [NoMachine](https://www.nomachine.com/). --- README.md | 2 +- Rakefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47ee70bcb073..5b10aac14935 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ Theme documentation and demo pages can be found in the [`/docs`](docs) if submit To set up your environment to develop this theme, run `bundle install`. -To test the theme, run `bundle exec rake preview` and open your browser at `http://localhost:4000/test/`. This starts a Jekyll server using content in the `test/` directory. As modifications are made to the theme and test site, it will regenerate and you should see the changes in the browser after a refresh. +To test the theme, run `bundle exec rake preview` and open your browser at [`http://localhost:4001/test/`](http://localhost:4001/test/). This starts a Jekyll server using content in the `test/` directory. As modifications are made to the theme and test site, it will regenerate and you should see the changes in the browser after a refresh. --- diff --git a/Rakefile b/Rakefile index 921330e6ab79..ada835606785 100644 --- a/Rakefile +++ b/Rakefile @@ -37,7 +37,8 @@ task :preview do "destination" => base.join('test/_site').to_s, "force_polling" => false, "serving" => true, - "theme" => "minimal-mistakes-jekyll" + "theme" => "minimal-mistakes-jekyll", + "port" => 4001, } options = Jekyll.configuration(options) From cd2726cc52ea9400c55537cc9b87820b37f4a12a Mon Sep 17 00:00:00 2001 From: Gabriel Staples Date: Thu, 31 Dec 2020 00:11:21 -0800 Subject: [PATCH 2/5] README.md: add Table of Contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...using the Sublime Text editor [MarkdownTOC](https://github.com/naokazuterada/MarkdownTOC) tool! Here are my user settings for it: ```json { "defaults": { "autoanchor": true, "autolink": true, "bracket": "round", "levels": [1,2,3,4,5,6], "indent": "\t", "remove_image": true, "link_prefix": "", "bullets": ["-"], "lowercase": "only_ascii", "style": "ordered", "uri_encoding": true, "markdown_preview": "" }, "id_replacements": [ { "pattern": "\\s+", "replacement": "-" }, { "pattern": "<|>|&|'|"|<|>|&|'|"|!|#|$|&|'|\\(|\\)|\\*|\\+|,|/|:|;|=|\\?|@|\\[|\\]|`|\"|\\.|\\\\|<|>|{|}|™|®|©|%", "replacement": "" } ], "logging": false } ``` --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index 5b10aac14935..ad87cf153a81 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,34 @@ Minimal Mistakes is a flexible two-column Jekyll theme, perfect for building per **Note:** The theme uses the [jekyll-include-cache](https://github.com/benbalter/jekyll-include-cache) plugin which will need to be installed in your `Gemfile` and added to the `plugins` array of `_config.yml`. Otherwise you'll encounter `Unknown tag 'include_cached'` errors at build. +## Table of Contents +
+(click to expand) + + +1. [Screenshots](#screenshots) +1. [Notable features](#notable-features) +1. [Skins \(color variations\)](#skins-color-variations) +1. [Demo pages](#demo-pages) +1. [Installation](#installation) + 1. [Gem-based method](#gem-based-method) + 1. [Remote theme method](#remote-theme-method) +1. [Usage](#usage) +1. [Contributing](#contributing) + 1. [Pull Requests](#pull-requests) +1. [Development](#development) +1. [Credits](#credits) + 1. [Creator](#creator) + 1. [Icons + Demo Images:](#icons--demo-images) + 1. [Other:](#other) +1. [License](#license) + + +
+ + +## Screenshots + [![Minimal Mistakes live preview][2]][1] [1]: https://mmistakes.github.io/minimal-mistakes/ @@ -22,6 +50,7 @@ Minimal Mistakes is a flexible two-column Jekyll theme, perfect for building per ![layout examples](screenshot-layouts.png) + ## Notable features - Bundled as a "theme gem" for easier installation/upgrading. @@ -35,6 +64,7 @@ Minimal Mistakes is a flexible two-column Jekyll theme, perfect for building per - [Google Analytics](https://www.google.com/analytics/) support. - UI localized text in English (default), Brazilian Portuguese (Português brasileiro), Catalan, Chinese, Danish, Dutch, Finnish, French (Français), German (Deutsch), Greek, Hindi (हिंदी), Hungarian, Indonesian, Irish (Gaeilge), Italian (Italiano), Japanese, Korean, Malayalam, Myanmar (Burmese), Nepali (Nepalese), Norwegian (Norsk), Persian (فارسی), Polish, Punjabi (ਪੰਜਾਬੀ), Romanian, Russian, Slovak, Spanish (Español), Swedish, Thai, Turkish (Türkçe), and Vietnamese. + ## Skins (color variations) This theme comes in nine different skins (in addition to the default one). @@ -51,6 +81,7 @@ This theme comes in nine different skins (in addition to the default one). | --- | --- | --- | | [![aqua skin](https://mmistakes.github.io/minimal-mistakes/assets/images/aqua-skin-archive.png)](https://mmistakes.github.io/minimal-mistakes/assets/images/aqua-skin-archive-large.png) | [![neon skin](https://mmistakes.github.io/minimal-mistakes/assets/images/neon-skin-archive.png)](https://mmistakes.github.io/minimal-mistakes/assets/images/neon-skin-archive-large.png) | [![plum skin](https://mmistakes.github.io/minimal-mistakes/assets/images/plum-skin-archive.png)](https://mmistakes.github.io/minimal-mistakes/assets/images/plum-skin-archive-large.png) | + ## Demo pages | Name | Description | @@ -74,10 +105,12 @@ Additional sample posts are available under [posts archive][year-archive] on the [tags-archive]: https://mmistakes.github.io/minimal-mistakes/tags/ [year-archive]: https://mmistakes.github.io/minimal-mistakes/year-archive/ + ## Installation There are three ways to install: as a [gem-based theme](https://jekyllrb.com/docs/themes/#understanding-gem-based-themes), as a [remote theme](https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/) (GitHub Pages compatible), or forking/directly copying all of the theme files into your project. + ### Gem-based method With Gem-based themes, directories such as the `assets`, `_layouts`, `_includes`, and `_sass` are stored in the theme’s gem, hidden from your immediate view. Yet all of the necessary directories will be read and processed during Jekyll’s build process. @@ -104,6 +137,7 @@ This allows for easier installation and updating as you don't have to manage any To update the theme run `bundle update`. + ### Remote theme method Remote themes are similar to Gem-based themes, but do not require `Gemfile` changes or whitelisting making them ideal for sites hosted with GitHub Pages. @@ -131,18 +165,21 @@ To install: **Looking for an example?** Use the [Minimal Mistakes remote theme starter](https://github.com/mmistakes/mm-github-pages-starter/generate) for the quickest method of getting a GitHub Pages hosted site up and running. Generate a new repository from the starter, replace sample content with your own, and configure as needed. + ## Usage For detailed instructions on how to configure, customize, add/migrate content, and more read the [theme's documentation](https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/). --- + ## Contributing Found a typo in the documentation or interested in [fixing a bug](https://github.com/mmistakes/minimal-mistakes/issues)? Then by all means [submit an issue](https://github.com/mmistakes/minimal-mistakes/issues/new) or [pull request](https://help.github.com/articles/using-pull-requests/). If this is your first pull request, it may be helpful to read up on the [GitHub Flow](https://guides.github.com/introduction/flow/) first. For help with using the theme or general Jekyll support questions, please use the [Jekyll Talk forums](https://talk.jekyllrb.com/). + ### Pull Requests When submitting a pull request: @@ -153,6 +190,7 @@ When submitting a pull request: Theme documentation and demo pages can be found in the [`/docs`](docs) if submitting improvements, typo corrections, etc. + ## Development To set up your environment to develop this theme, run `bundle install`. @@ -161,8 +199,10 @@ To test the theme, run `bundle exec rake preview` and open your browser at [`htt --- + ## Credits + ### Creator **Michael Rose** @@ -171,12 +211,14 @@ To test the theme, run `bundle exec rake preview` and open your browser at [`htt - - + ### Icons + Demo Images: - [The Noun Project](https://thenounproject.com) -- Garrett Knoll, Arthur Shlain, and [tracy tam](https://thenounproject.com/tracytam) - [Font Awesome](http://fontawesome.io/) - [Unsplash](https://unsplash.com/) + ### Other: - [Jekyll](http://jekyllrb.com/) @@ -193,6 +235,7 @@ To test the theme, run `bundle exec rake preview` and open your browser at [`htt --- + ## License The MIT License (MIT) From 2c483c2d26b342505745831c80a191a629e39a55 Mon Sep 17 00:00:00 2001 From: Gabriel Staples Date: Thu, 31 Dec 2020 00:45:35 -0800 Subject: [PATCH 3/5] _base.scss: apply code background color to all 6 HTML heading tags --- CHANGELOG.md | 1 + README.md | 2 +- _sass/minimal-mistakes/_base.scss | 9 +++++ _sass/minimal-mistakes/_variables.scss | 2 +- .../2013-08-16-markup-syntax-highlighting.md | 37 ++++++++++++++++++- 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b69f4eaac201..99a91c931dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Remove Google Search script from `404.md`. [#2597](https://github.com/mmistakes/minimal-mistakes/issues/2597) [#2737](https://github.com/mmistakes/minimal-mistakes/pull/2737) - Fix Font Awesome icon color in `contrast`, `dark`, `mint`, `neon`, `plum`, and `sunrise` skins. [#2724](https://github.com/mmistakes/minimal-mistakes/issues/2724) +- Apply background code highlighting for any code in all 6 HTML headings from `

` to `

`. ### Enhancements diff --git a/README.md b/README.md index ad87cf153a81..45e796e73bf1 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ Theme documentation and demo pages can be found in the [`/docs`](docs) if submit To set up your environment to develop this theme, run `bundle install`. -To test the theme, run `bundle exec rake preview` and open your browser at [`http://localhost:4001/test/`](http://localhost:4001/test/). This starts a Jekyll server using content in the `test/` directory. As modifications are made to the theme and test site, it will regenerate and you should see the changes in the browser after a refresh. +To test the theme, run `bundle exec rake preview` and open your browser at [`http://localhost:4001/test/`](http://localhost:4001/test/). This starts a Jekyll server using content in the `test/` directory. As modifications are made to the theme and test site, it will regenerate and you should see the changes in the browser after doing a manual page refresh. --- diff --git a/_sass/minimal-mistakes/_base.scss b/_sass/minimal-mistakes/_base.scss index 3796eb61302d..9e94bc78e590 100644 --- a/_sass/minimal-mistakes/_base.scss +++ b/_sass/minimal-mistakes/_base.scss @@ -178,6 +178,15 @@ td > code { } } +h1 > code, +h2 > code, +h3 > code, +h4 > code, +h5 > code, +h6 > code { + background: $code-background-color; +} + /* horizontal rule */ hr { diff --git a/_sass/minimal-mistakes/_variables.scss b/_sass/minimal-mistakes/_variables.scss index 4065a0ebca4c..5f1c8aebe6fa 100644 --- a/_sass/minimal-mistakes/_variables.scss +++ b/_sass/minimal-mistakes/_variables.scss @@ -62,7 +62,7 @@ $light-gray: mix(#fff, $gray, 50%) !default; $lighter-gray: mix(#fff, $gray, 90%) !default; $background-color: #fff !default; -$code-background-color: #fafafa !default; +$code-background-color: $lighter-gray !default; $code-background-color-dark: $light-gray !default; $text-color: $dark-gray !default; $muted-text-color: mix(#fff, $text-color, 20%) !default; diff --git a/test/_posts/2013-08-16-markup-syntax-highlighting.md b/test/_posts/2013-08-16-markup-syntax-highlighting.md index d18e7e1fd937..ad7730367878 100644 --- a/test/_posts/2013-08-16-markup-syntax-highlighting.md +++ b/test/_posts/2013-08-16-markup-syntax-highlighting.md @@ -14,6 +14,41 @@ Syntax highlighting is a feature that displays source code, in different colors [^1]: +**Code in headings:** + +# Heading 1 is the HTML equivalent of this: `

Heading 1

` +## Heading 2 is the HTML equivalent of this: `

Heading 2

` +### Heading 3 is the HTML equivalent of this: `

Heading 3

` +#### Heading 4 is the HTML equivalent of this: `

Heading 4

` +##### Heading 5 is the HTML equivalent of this: `
Heading 5
` +###### Heading 6 is the HTML equivalent of this: `
Heading 6
` + +This is regular text. + +**Code in unordered list:** + +- this is `code` + - this is `code` + - this is `code` +- this is `code` + - this is `code` + - this is `code` + +**Code in ordered list:** + +This is regular text. + +1. this is `code` + 1. this is `code` + 1. this is `code` +1. this is `code` + 1. this is `code` + 1. this is `code` + +**Code in a quote:** + +> this is `code` + ### GFM Code Blocks GitHub Flavored Markdown [fenced code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) are supported. To modify styling and highlight colors edit `/_sass/syntax.scss`. @@ -124,4 +159,4 @@ Module[{}, An example of a Gist embed below. - \ No newline at end of file + From 72e52b296a6fe0bff9156bfea848477bd8b25955 Mon Sep 17 00:00:00 2001 From: Gabriel Staples Date: Thu, 31 Dec 2020 01:00:02 -0800 Subject: [PATCH 4/5] Update changelog with PR link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a91c931dad..c7847faccd40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Remove Google Search script from `404.md`. [#2597](https://github.com/mmistakes/minimal-mistakes/issues/2597) [#2737](https://github.com/mmistakes/minimal-mistakes/pull/2737) - Fix Font Awesome icon color in `contrast`, `dark`, `mint`, `neon`, `plum`, and `sunrise` skins. [#2724](https://github.com/mmistakes/minimal-mistakes/issues/2724) -- Apply background code highlighting for any code in all 6 HTML headings from `

` to `

`. +- Apply background code highlighting for any code in all 6 HTML headings from `

` to `

`. [#2771](https://github.com/mmistakes/minimal-mistakes/pull/2771) ### Enhancements From 899eff8256ca0f372add1abf0b1708b1a9942104 Mon Sep 17 00:00:00 2001 From: Gabriel Staples Date: Thu, 31 Dec 2020 01:08:05 -0800 Subject: [PATCH 5/5] Do minor update for clarity in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45e796e73bf1..e9b698c2e7c8 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ Theme documentation and demo pages can be found in the [`/docs`](docs) if submit To set up your environment to develop this theme, run `bundle install`. -To test the theme, run `bundle exec rake preview` and open your browser at [`http://localhost:4001/test/`](http://localhost:4001/test/). This starts a Jekyll server using content in the `test/` directory. As modifications are made to the theme and test site, it will regenerate and you should see the changes in the browser after doing a manual page refresh. +To test the theme, run `bundle exec rake preview` and open your browser at [`http://localhost:4001/test/`](http://localhost:4001/test/). This starts a Jekyll server using content in the `test/` directory. As modifications are made to the theme and test site, it will regenerate. Note that you will see the changes in your browser only after doing a manual page refresh. ---