From 700e1b6ec17332c84025f04ca0e5d1ab293f4d35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 25 Aug 2025 21:46:00 +0000 Subject: [PATCH 1/5] Initial plan From b0493203b45ca4585a264fdbb6b4deaaaa9f6562 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 25 Aug 2025 21:52:47 +0000 Subject: [PATCH 2/5] Replace monokai with GitHub Rouge syntax highlighting Co-authored-by: solrevdev <374863+solrevdev@users.noreply.github.com> --- _includes/head.html | 9 +- public/css/github-syntax.css | 213 +++++++++++++++++++++++++++++++++++ 2 files changed, 215 insertions(+), 7 deletions(-) create mode 100644 public/css/github-syntax.css diff --git a/_includes/head.html b/_includes/head.html index f87cd519..797f341f 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -4,13 +4,8 @@ - - + + diff --git a/public/css/github-syntax.css b/public/css/github-syntax.css new file mode 100644 index 00000000..2af5601a --- /dev/null +++ b/public/css/github-syntax.css @@ -0,0 +1,213 @@ +.highlight table td { padding: 5px; } +.highlight table pre { margin: 0; } +.highlight .cm { + color: #999988; + font-style: italic; +} +.highlight .cp { + color: #999999; + font-weight: bold; +} +.highlight .c1 { + color: #999988; + font-style: italic; +} +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; +} +.highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf { + color: #999988; + font-style: italic; +} +.highlight .err { + color: #a61717; + background-color: #e3d2d2; +} +.highlight .gd { + color: #000000; + background-color: #ffdddd; +} +.highlight .ge { + color: #000000; + font-style: italic; +} +.highlight .gr { + color: #aa0000; +} +.highlight .gh { + color: #999999; +} +.highlight .gi { + color: #000000; + background-color: #ddffdd; +} +.highlight .go { + color: #888888; +} +.highlight .gp { + color: #555555; +} +.highlight .gs { + font-weight: bold; +} +.highlight .gu { + color: #aaaaaa; +} +.highlight .gt { + color: #aa0000; +} +.highlight .kc { + color: #000000; + font-weight: bold; +} +.highlight .kd { + color: #000000; + font-weight: bold; +} +.highlight .kn { + color: #000000; + font-weight: bold; +} +.highlight .kp { + color: #000000; + font-weight: bold; +} +.highlight .kr { + color: #000000; + font-weight: bold; +} +.highlight .kt { + color: #445588; + font-weight: bold; +} +.highlight .k, .highlight .kv { + color: #000000; + font-weight: bold; +} +.highlight .mf { + color: #009999; +} +.highlight .mh { + color: #009999; +} +.highlight .il { + color: #009999; +} +.highlight .mi { + color: #009999; +} +.highlight .mo { + color: #009999; +} +.highlight .m, .highlight .mb, .highlight .mx { + color: #009999; +} +.highlight .sa { + color: #000000; + font-weight: bold; +} +.highlight .sb { + color: #d14; +} +.highlight .sc { + color: #d14; +} +.highlight .sd { + color: #d14; +} +.highlight .s2 { + color: #d14; +} +.highlight .se { + color: #d14; +} +.highlight .sh { + color: #d14; +} +.highlight .si { + color: #d14; +} +.highlight .sx { + color: #d14; +} +.highlight .sr { + color: #009926; +} +.highlight .s1 { + color: #d14; +} +.highlight .ss { + color: #990073; +} +.highlight .s, .highlight .dl { + color: #d14; +} +.highlight .na { + color: #008080; +} +.highlight .bp { + color: #999999; +} +.highlight .nb { + color: #0086B3; +} +.highlight .nc { + color: #445588; + font-weight: bold; +} +.highlight .no { + color: #008080; +} +.highlight .nd { + color: #3c5d5d; + font-weight: bold; +} +.highlight .ni { + color: #800080; +} +.highlight .ne { + color: #990000; + font-weight: bold; +} +.highlight .nf, .highlight .fm { + color: #990000; + font-weight: bold; +} +.highlight .nl { + color: #990000; + font-weight: bold; +} +.highlight .nn { + color: #555555; +} +.highlight .nt { + color: #000080; +} +.highlight .vc { + color: #008080; +} +.highlight .vg { + color: #008080; +} +.highlight .vi { + color: #008080; +} +.highlight .nv, .highlight .vm { + color: #008080; +} +.highlight .ow { + color: #000000; + font-weight: bold; +} +.highlight .o { + color: #000000; + font-weight: bold; +} +.highlight .w { + color: #bbbbbb; +} +.highlight { + background-color: #f8f8f8; +} From 42f3003b6512f28cd81f18f46f4f4660682bfe49 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 25 Aug 2025 21:56:09 +0000 Subject: [PATCH 3/5] Add test post for syntax highlighting verification Co-authored-by: solrevdev <374863+solrevdev@users.noreply.github.com> --- ...5-08-25-test-github-syntax-highlighting.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 _posts/2025-08-25-test-github-syntax-highlighting.md diff --git a/_posts/2025-08-25-test-github-syntax-highlighting.md b/_posts/2025-08-25-test-github-syntax-highlighting.md new file mode 100644 index 00000000..796ff8dd --- /dev/null +++ b/_posts/2025-08-25-test-github-syntax-highlighting.md @@ -0,0 +1,73 @@ +--- +layout: post +title: Test GitHub Syntax Highlighting +author: Test Author +tags: + - test + - syntax-highlighting + - github +--- + +Testing the new GitHub-like syntax highlighting across different languages to ensure consistency. + +## Bash Example + +```bash +#!/bin/bash +echo "Testing bash syntax highlighting" +for file in *.txt; do + if [[ -f "$file" ]]; then + echo "Processing: $file" + wc -l "$file" + fi +done +``` + +## PowerShell Example + +```powershell +Write-Host "Testing PowerShell syntax highlighting" +Get-ChildItem -Path "*.txt" | ForEach-Object { + if (Test-Path $_.FullName) { + Write-Output "Processing: $($_.Name)" + (Get-Content $_.FullName).Count + } +} +``` + +## JSON Configuration + +```json +{ + "name": "test-project", + "version": "1.0.0", + "scripts": { + "build": "webpack --mode production", + "test": "jest --coverage" + }, + "dependencies": { + "express": "^4.18.0", + "lodash": "^4.17.21" + } +} +``` + +## YAML Configuration + +```yaml +name: Build and Test +on: + push: + branches: [main, develop] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' +``` + +This should demonstrate consistent highlighting across different code languages. \ No newline at end of file From 7b99f6c968f36cac07c096fe6c7bdba6bc1ad95c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 25 Aug 2025 21:59:33 +0000 Subject: [PATCH 4/5] Remove test post after successful verification Co-authored-by: solrevdev <374863+solrevdev@users.noreply.github.com> --- ...5-08-25-test-github-syntax-highlighting.md | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 _posts/2025-08-25-test-github-syntax-highlighting.md diff --git a/_posts/2025-08-25-test-github-syntax-highlighting.md b/_posts/2025-08-25-test-github-syntax-highlighting.md deleted file mode 100644 index 796ff8dd..00000000 --- a/_posts/2025-08-25-test-github-syntax-highlighting.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -layout: post -title: Test GitHub Syntax Highlighting -author: Test Author -tags: - - test - - syntax-highlighting - - github ---- - -Testing the new GitHub-like syntax highlighting across different languages to ensure consistency. - -## Bash Example - -```bash -#!/bin/bash -echo "Testing bash syntax highlighting" -for file in *.txt; do - if [[ -f "$file" ]]; then - echo "Processing: $file" - wc -l "$file" - fi -done -``` - -## PowerShell Example - -```powershell -Write-Host "Testing PowerShell syntax highlighting" -Get-ChildItem -Path "*.txt" | ForEach-Object { - if (Test-Path $_.FullName) { - Write-Output "Processing: $($_.Name)" - (Get-Content $_.FullName).Count - } -} -``` - -## JSON Configuration - -```json -{ - "name": "test-project", - "version": "1.0.0", - "scripts": { - "build": "webpack --mode production", - "test": "jest --coverage" - }, - "dependencies": { - "express": "^4.18.0", - "lodash": "^4.17.21" - } -} -``` - -## YAML Configuration - -```yaml -name: Build and Test -on: - push: - branches: [main, develop] -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '18' -``` - -This should demonstrate consistent highlighting across different code languages. \ No newline at end of file From 48f81aa52baae5df29e589da07f6bdf70cdb37f8 Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 27 Aug 2025 13:17:14 +0100 Subject: [PATCH 5/5] feat(posts): add prioritized post summaries for home page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ Add concise, prioritized summaries for posts on the home page to avoid leaking large code blocks or overly long content in the index. 📁 Modified: index.html, README.md 📝 Document recommended front-matter usage and added a README section with examples and a nav entry for the new feature 💡 Behavior: prefer front-matter summary/description, then the first rendered paragraph (skipping headings/code), then Jekyll excerpt or stripped content as a fallback --- README.md | 34 ++++++++++++++++++++++++++++++++++ index.html | 29 ++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e02fd6f..6bd16179 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,39 @@ bundle exec jekyll serve --host=localhost --livereload ``` +## Post summaries (home page excerpts) + +The home page now shows a concise summary for each post without leaking large code blocks. + +Summary priority (no changes needed to old posts): + +1. If a post defines `summary:` (or `description:`) in front matter, that is used. +2. Otherwise the first real paragraph from the post body is extracted and truncated. +3. If no paragraph is found, it falls back to Jekyll's excerpt or stripped content. + +Recommended usage for new posts: + +```yaml +--- +layout: post +title: My Post +date: 2025-08-27 +summary: A one‑sentence teaser for the home page list. +--- + +Intro paragraph here… + + + +Rest of the content… +``` + +Notes: +- `summary:` gives you full control over the home-page blurb. +- `` is optional; use it when you want the per‑post page to show a short intro before the rest. +- Old posts don’t need to be edited. They’ll automatically use their first paragraph. + + ## SEO Improvements @@ -170,6 +203,7 @@ It is a brazen two-column theme that pairs a prominent sidebar with uncomplicat - [Live reload](#live-reload) - [Testing imgur hosted images](#testing-imgur-hosted-images) - [Current full site testing example:](#current-full-site-testing-example) + - [Post summaries (home page excerpts)](#post-summaries-home-page-excerpts) - [SEO Improvements](#seo-improvements) - [Canonical URL](#canonical-url) - [Robots Tag](#robots-tag) diff --git a/index.html b/index.html index 39dc19e5..48ab11b1 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,34 @@

-

{{ post.content | strip_html | truncatewords:75}}

+ {%- comment -%} + Summary priority: + 1) front matter: summary/description + 2) first actual paragraph from rendered content (skips headings/code) + 3) fallback to excerpt or stripped content + {%- endcomment -%} + + {% if post.summary %} +

{{ post.summary }}

+ {% elsif post.description %} +

{{ post.description }}

+ {% else %} + {% assign paragraphs = post.content | split: '

' %} + {% assign found_para = false %} + {% for p in paragraphs %} + {% if found_para == false and p contains '{{ p | append: '

' | strip_html | truncatewords: 75 }}

+ {% endif %} + {% endfor %} + {% unless found_para %} + {% if post.excerpt %} +

{{ post.excerpt | strip_html | truncatewords: 75 }}

+ {% else %} +

{{ post.content | strip_html | truncatewords: 75 }}

+ {% endif %} + {% endunless %} + {% endif %}

Continue Reading