From 028ed31a27a9e4559f0a090a1026a0601f38d78f Mon Sep 17 00:00:00 2001 From: Felicity Chapman Date: Fri, 20 Dec 2024 15:19:29 +0000 Subject: [PATCH] Apply suggestions from code review --- .../creating-and-highlighting-code-blocks.md | 6 ++---- .../about-github-pages-and-jekyll.md | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md index 5704bbd9a9bd..b7ed89d6679c 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md @@ -66,10 +66,8 @@ This will display the code block with syntax highlighting: ![Screenshot of three lines of Ruby code as displayed on {% data variables.product.prodname_dotcom %}. Elements of the code display in purple, blue, and red type for scannability.](/assets/images/help/writing/code-block-syntax-highlighting-rendered.png) -> [!NOTE] -> While both capitalized and lower-case language identifiers are allowed on GitHub, to -> have a fenced code block highlighted on GitHub Pages sites the same way they're -> highlighted on GitHub, you must use lower-case language identifiers. +> [!TIP] +> When you create a fenced code block that you also want to have syntax highlighting on a GitHub Pages site, use lower-case language identifiers. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#syntax-highlighting). We use [Linguist](https://github.com/github-linguist/linguist) to perform language detection and to select [third-party grammars](https://github.com/github-linguist/linguist/blob/main/vendor/README.md) for syntax highlighting. You can find out which keywords are valid in [the languages YAML file](https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml). diff --git a/content/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll.md b/content/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll.md index cff4bea02725..da923660e358 100644 --- a/content/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll.md +++ b/content/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll.md @@ -111,8 +111,7 @@ To make your site easier to read, code snippets are highlighted on {% data varia By default, code blocks on your site will be highlighted by Jekyll. Jekyll uses the [Rouge](https://github.com/rouge-ruby/rouge) highlighter (which is compatible with [Pygments](https://pygments.org/)). If you specify Pygments in your `_config.yml` file, Rouge will be used as the fallback instead. Jekyll cannot use any other syntax highlighter, and you'll get a page build warning if you specify another syntax highlighter in your `_config.yml` file. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-jekyll-build-errors-for-github-pages-sites). > [!NOTE] -> Rouge will only recognize lower-case language identifiers for a fenced code -> block. +> Rouge only recognizes lower-case language identifiers for fenced code blocks. For a list of supported languages, see [Languages](https://rouge-ruby.github.io/docs/file.Languages.html). If you want to use another highlighter, such as [highlight.js](https://github.com/highlightjs/highlight.js), you must disable Jekyll's syntax highlighting by updating your project's `_config.yml` file.