From 31010490c43c4a06a3b42b3feedbd6a88c956e59 Mon Sep 17 00:00:00 2001 From: bits-bytes-nn Date: Sun, 15 Nov 2026 00:13:57 +0900 Subject: [PATCH 1/2] chore(copy): shorten the site description and the privacy notice The site description becomes one plain English line; it is the home page's meta description, the feed subtitle and the footer text. description_lang marks it as English in the footer and the feed, since the site default is Korean. The About privacy section keeps only the Google Analytics notice the GA terms require. --- _config.yml | 6 ++++-- _includes/footer.html | 2 +- about.md | 21 +++++---------------- feed.xml | 2 +- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/_config.yml b/_config.yml index a46a30e..a661e54 100644 --- a/_config.yml +++ b/_config.yml @@ -44,8 +44,10 @@ date_format: "%B %-d, %Y" # which then leaks into meta content="" attributes and the feed . # The home page's description too, and the feed and footer: one text. description: >- - AI/ML 논문을 설계 결정과 트레이드오프까지 파고들어 읽고, 에이전틱 AI·데이터 아키텍처 현장에서 - 겪은 문제를 정리하는 기술 블로그입니다. + In-depth notes on AI/ML papers and technology. +# The description's language, which differs from `lang`: the footer and the +# feed mark it so a screen reader does not read it in the page's voice. +description_lang: en baseurl: '' url: https://bits-bytes-nn.github.io # Post URLs embed :year/:month/:day, and front-matter dates carry no offset, so diff --git a/_includes/footer.html b/_includes/footer.html index c815267..b105e20 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -42,7 +42,7 @@

Subscribe via RSS · Privacy

-

{{ site.description }}

+

{{ site.description }}

diff --git a/about.md b/about.md index cb1c81d..19d6e5c 100644 --- a/about.md +++ b/about.md @@ -30,19 +30,8 @@ If something here sparks a thought, I'd love to hear it — reach out through an ## Privacy -This blog has no accounts, comments or ads, and keeps no data of its own. What -your browser shares while you read: - -- **Google Analytics** counts page views: the page address, the referring page, - your device and browser type and an approximate location. It sets first-party - cookies (`_ga`, `_ga_*`) that last up to two years. Google signals and ad - personalisation are turned off. To opt out, block those cookies or use - [Google's opt-out add-on](https://tools.google.com/dlpage/gaoptout). -- **Fonts and libraries** load from Google Fonts, jsDelivr and unpkg, which see - your IP address as part of serving them. -- **Paper reviews** ask Semantic Scholar for the paper's citation count, and - some posts show figures hosted by their original sites (arXiv and others). -- **Your browser** keeps your theme choice and cached citation counts in local - storage; nothing leaves your device for those. - -Questions or requests: [{{ site.email }}](mailto:{{ site.email }}). +This site uses Google Analytics to count page views. It sets first-party +cookies (`_ga`, `_ga_*`, up to two years) and sends Google the page address, +the referring page, your browser type and an approximate location. Google +signals and ad personalisation are off. To opt out, block those cookies or use +[Google's opt-out add-on](https://tools.google.com/dlpage/gaoptout). diff --git a/feed.xml b/feed.xml index b46dde7..151015c 100644 --- a/feed.xml +++ b/feed.xml @@ -16,7 +16,7 @@ layout: null {{ site.time | date_to_xmlschema }} {{ page.url | absolute_url | xml_escape }} {{ site.title | smartify | xml_escape }} - {{ site.description | xml_escape }} + {{ site.description | xml_escape }} {{ site.author | xml_escape }} From c514dc687296530abe9fba730deaaa26b87e50fa Mon Sep 17 00:00:00 2001 From: bits-bytes-nn Date: Sun, 15 Nov 2026 00:52:03 +0900 Subject: [PATCH 2/2] chore: adversarial review round on UX and code hygiene User-facing: - Previous/next cards: one column on phones, two on wider screens (the breakpoint was inverted). - Phone menu is closed in the markup; a noscript style opens it without JS. - Search: a blank query clears the results, ?q= keeps and restores the query, status waits for IME composition, dates are highlighted, clearer messages, results carry their post's lang; styles moved from css/search.css into _sass/_search.scss on the site's tokens. - UI text (header, footer, post meta, TOC, previous/next, share, home cards, pagination) is marked with the new `ui_lang` so screen readers read it in English on Korean pages. - /categories/ lists types, then topics, in post_conventions.yml order; the footer site map links Categories and Tags (footer_nav). - Language switcher names each language in its own words; singular citation label; duplicate RSS line on posts removed; dark-mode hover contrast fixed; hero, pagination and share hover effects removed. Code and build: - translations.rb sets page.translation; head.html, the language switcher and related_posts.rb use it instead of their own pairing loops. - related_posts.rb takes the site language instead of hardcoding "ko". - nokogiri and minitest are in the Gemfile; tests run under the bundle. - The lint's javascript: link rule is dropped: safe_post_html.rb fails the build on the same links. - The live sitemap check derives its URL from _config.yml (CHECK_LIVE_SITEMAP), warns as a GitHub annotation on network errors only, and fails on a sitemap with no posts. - validate-site.sh reads the config URL as YAML and prints XML parse errors. - Dead CSS selectors, duplicate rules, pre-2020 browser fallbacks, an unused derive() argument, the feed's draft filter and a snapshot test removed; history comments rewritten as rules. - Docs: safe_post_html.rb, ui_lang, search and categories behaviour, the bundle test command; READMEs point to operations.md for the checks. --- .github/dependabot.yml | 4 +- .github/workflows/jekyll.yml | 24 +++----- Gemfile | 6 ++ Gemfile.lock | 3 + README.ko.md | 12 +--- README.md | 12 +--- _config.yml | 9 +-- _includes/footer.html | 6 +- _includes/head.html | 24 ++++---- _includes/header.html | 8 +-- _includes/language_switcher.html | 43 ++++---------- _includes/nav_links.html | 7 ++- _includes/related_posts.html | 8 +-- _layouts/default.html | 2 +- _layouts/post.html | 20 +++---- _plugins/post_description.rb | 22 +++----- _plugins/post_toc.rb | 6 +- _plugins/posted_date.rb | 9 +-- _plugins/related_posts.rb | 31 +++++------ _plugins/safe_post_html.rb | 11 +--- _plugins/scrollable_tables.rb | 9 +-- _plugins/search_index.rb | 10 +--- _plugins/translations.rb | 37 ++++++++---- _sass/_dark.scss | 21 +++---- _sass/_layout.scss | 21 ++----- _sass/_post.scss | 49 ++++------------ _sass/_search.scss | 59 ++++++++++++++++++++ _sass/_syntax.scss | 2 - about.md | 4 +- categories.html | 60 ++++++++++---------- css/main.scss | 1 + css/search.css | 96 -------------------------------- docs/architecture.md | 80 +++++++++++++++----------- docs/operations.md | 11 ++-- docs/writing.md | 5 +- feed.xml | 15 ++--- index.html | 6 +- insights.md | 1 - js/citations.js | 2 +- js/main.js | 28 +++++----- js/search.js | 48 ++++++++++++---- paper-reviews.md | 1 - paper-summaries.md | 4 +- paper-surveys.md | 1 - script/check-plugin-output.rb | 29 +++++----- script/lint-posts.rb | 5 -- script/validate-site.sh | 20 ++++--- search.json | 3 +- search.md | 3 +- tags.html | 2 + tech-guides.md | 1 - test/run_all.rb | 8 +-- test/test_lint_posts.rb | 8 --- test/test_related_posts.rb | 88 +++-------------------------- test/test_translations.rb | 5 ++ 55 files changed, 419 insertions(+), 591 deletions(-) create mode 100644 _sass/_search.scss delete mode 100644 css/search.css diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3157416..3e3fe7e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,8 +11,8 @@ updates: update-types: - minor - patch - # The gems only run in CI (build, html-proofer), but html-proofer pulls in - # nokogiri, which gets security releases. + # The gems only run at build time, but nokogiri parses post bodies there and + # gets security releases. - package-ecosystem: bundler directory: / schedule: diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 9970d59..b4aacc7 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -36,17 +36,9 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - # No apt step. The packages it installed are already in the ubuntu-24.04 - # image — a past run's log showed libyaml-dev/zlib1g-dev/libffi-dev - # "already the newest version" and only 2 incidental upgrades — and the - # -dev headers were only ever needed to compile Ruby itself, which - # ruby/setup-ruby avoids by fetching a prebuilt build. The native gems - # (sassc, eventmachine) need g++/make, which the image ships as well. - # - # What it did cost was `apt-get update` on every deploy, a network-bound - # step slower and less reliable than the rest of the pipeline put - # together. If this assumption is ever wrong the build job fails and - # `deploy` (needs: build) publishes nothing. + # No apt step: setup-ruby fetches a prebuilt Ruby, and the native gems + # (sassc, eventmachine, nokogiri) need only the g++/make the image ships. + # Should that stop holding, the build fails and nothing deploys. - name: Setup Ruby uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0 # The version comes from .ruby-version (3.3+: html-proofer's @@ -54,11 +46,9 @@ jobs: with: bundler-cache: true - name: Unit-test the Jekyll plugins - # Plain `ruby`, not `bundle exec`: the plugins guard their Jekyll/Liquid - # registrations behind `defined?`, so their logic loads standalone, and - # minitest ships with Ruby. Runs before the build — these plugins decide - # every page's description and read time. - run: ruby test/run_all.rb + # Before the build: these plugins decide every page's description, order + # and read time. + run: bundle exec ruby test/run_all.rb - name: Lint the post sources # Front matter against _data/post_conventions.yml, plus table, math and # heading rules the built HTML no longer shows. @@ -97,7 +87,7 @@ jobs: BASE_PATH: ${{ steps.pages.outputs.base_path }} # check-plugin-output.rb also holds the build to the live sitemap, so a # post merged without --record cannot silently lose its URL. - PUBLISHED_SITEMAP: https://bits-bytes-nn.github.io/sitemap.xml + CHECK_LIVE_SITEMAP: "1" - name: Upload artifact # Nothing to publish from a PR run; the gates above are the whole point. if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' diff --git a/Gemfile b/Gemfile index c36af2b..1bb6fa2 100644 --- a/Gemfile +++ b/Gemfile @@ -19,5 +19,11 @@ gem 'bigdecimal' gem 'logger' gem 'webrick' +# _plugins/safe_post_html.rb parses each post body with its HTML5 parser. +gem 'nokogiri', '>= 1.12' + # CI quality gate: validates internal links, images, and HTML structure of _site/ gem 'html-proofer', '~> 5.2' + +# test/run_all.rb, run under the bundle like the build. +gem 'minitest', '~> 5.25', group: :test diff --git a/Gemfile.lock b/Gemfile.lock index 8ca66cf..de9427a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,6 +99,7 @@ GEM logger (1.7.0) mercenary (0.4.0) mini_portile2 (2.8.9) + minitest (5.27.0) nokogiri (1.19.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) @@ -171,6 +172,8 @@ DEPENDENCIES jekyll-sitemap kramdown-parser-gfm logger + minitest (~> 5.25) + nokogiri (>= 1.12) webrick RUBY VERSION diff --git a/README.ko.md b/README.ko.md index 0255861..07ccab7 100644 --- a/README.ko.md +++ b/README.ko.md @@ -2,7 +2,7 @@ # Bits, Bytes and Neural Networks -**AI/ML 논문 리뷰·요약과 기술 가이드를 블로그로 발행합니다.** +**AI/ML 논문과 기술을 깊이 읽고 정리하는 블로그입니다.** [bits-bytes-nn.github.io](https://bits-bytes-nn.github.io) · GitHub Pages에서 서빙하는 Jekyll 정적 사이트 @@ -31,14 +31,8 @@ Summaries, Paper Surveys, Tech Guides, Insights 다섯 개입니다. 논문 글 2. **의존성 설치:** `bundle install` 3. **개발 서버**(저장하면 다시 빌드, `http://localhost:4000`): `bundle exec jekyll serve`. `_config.yml`을 바꾸면 다시 시작합니다. -4. **CI와 같은 검사:** - - ```bash - ruby test/run_all.rb && ruby script/lint-posts.rb - bundle exec jekyll build --strict-front-matter --destination /tmp/site-verify - bundle exec htmlproofer /tmp/site-verify --disable-external --allow-hash-href --no-ignore-empty-alt - script/validate-site.sh /tmp/site-verify - ``` +4. **CI와 같은 검사:** 명령은 + [docs/operations.md](docs/operations.md#checks-before-pushing)에 있습니다. ## 문서 diff --git a/README.md b/README.md index ef5187f..37425a5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Bits, Bytes and Neural Networks -**In-depth AI/ML paper reviews, summaries, and tech guides — published as a blog.** +**In-depth notes on AI/ML papers and technology.** [bits-bytes-nn.github.io](https://bits-bytes-nn.github.io) · a Jekyll static site on GitHub Pages @@ -33,14 +33,8 @@ merge deploys. 2. **Install the gems:** `bundle install` 3. **Serve with live reload** at `http://localhost:4000`: `bundle exec jekyll serve`. Restart it after changing `_config.yml`. -4. **Check a change the way CI does:** - - ```bash - ruby test/run_all.rb && ruby script/lint-posts.rb - bundle exec jekyll build --strict-front-matter --destination /tmp/site-verify - bundle exec htmlproofer /tmp/site-verify --disable-external --allow-hash-href --no-ignore-empty-alt - script/validate-site.sh /tmp/site-verify - ``` +4. **Check a change the way CI does:** the commands are in + [docs/operations.md](docs/operations.md#checks-before-pushing). ## Documentation diff --git a/_config.yml b/_config.yml index a661e54..a183c0f 100644 --- a/_config.yml +++ b/_config.yml @@ -45,9 +45,10 @@ date_format: "%B %-d, %Y" # The home page's description too, and the feed and footer: one text. description: >- In-depth notes on AI/ML papers and technology. -# The description's language, which differs from `lang`: the footer and the -# feed mark it so a screen reader does not read it in the page's voice. -description_lang: en +# The language of the site's own words (navigation, labels, the title and +# description above), which differs from `lang`, the posts'. The layouts mark +# that text with it, so a screen reader does not read it in a Korean voice. +ui_lang: en baseurl: '' url: https://bits-bytes-nn.github.io # Post URLs embed :year/:month/:day, and front-matter dates carry no offset, so @@ -108,7 +109,7 @@ social: icon: github username: bits-bytes-nn url: https://github.com/bits-bytes-nn - desc: Fork me on GitHub + desc: bits-bytes-nn on GitHub share: false # Share only (no url = not shown in Contact) diff --git a/_includes/footer.html b/_includes/footer.html index b105e20..9b34741 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,4 +1,4 @@ -