Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ shellcheck script/*.sh assets/images/*.sh && actionlint # workflow-lint.yml
1. **`ruby test/run_all.rb`**로 `_plugins/`와 린트의 단위 테스트를 돌리고
2. **`ruby script/lint-posts.rb`**로 프런트매터를 `_data/post_conventions.yml`과 대조하고,
마크다운 원본의 표·수식·헤딩 규칙을 검사하고
3. `JEKYLL_ENV=production`으로 사이트를 빌드하고
3. `JEKYLL_ENV=production`으로 사이트를 빌드하고(Google Analytics는 이 빌드에만 들어갑니다)
4. `_site/`에 **html-proofer**를 돌려 내부 링크·이미지·앵커를 검사하고
5. **`script/validate-site.sh`**로 htmlproofer가 보지 않는 빌드 후 검사(사이트맵, 피드,
메타데이터, 헤딩, 리디렉션, 플러그인 결과)를 돌린 뒤 — 항목은 스크립트에 있습니다
Expand Down Expand Up @@ -328,5 +328,5 @@ curl -sS https://bits-bytes-nn.github.io/robots.txt
## 라이선스

MIT — [LICENSE](LICENSE) 참고. 제임스 웹 표지 이미지(ESA/Webb, CC BY 4.0)의 출처도 거기에
밝혀 두었습니다. [Centrarium](http://jekyllthemes.org/themes/centrarium/)
밝혀 두었습니다. [Centrarium](https://github.com/bencentra/centrarium)
Jekyll 테마를 기반으로 합니다.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ requests. In order, it:
2. runs **`ruby script/lint-posts.rb`** — front matter against
`_data/post_conventions.yml`, plus table, math and heading rules in the
Markdown source,
3. builds the site with `JEKYLL_ENV=production`,
3. builds the site with `JEKYLL_ENV=production` (the only build that loads Google Analytics),
4. runs **html-proofer** over `_site/` (internal links, images, anchors),
5. runs **`script/validate-site.sh`** — the post-build checks htmlproofer does
not cover (sitemap, feed, metadata, headings, redirects, plugin output); the
Expand Down Expand Up @@ -352,4 +352,4 @@ What to do instead:

MIT — see [LICENSE](LICENSE), which also credits the James Webb cover images
(ESA/Webb, CC BY 4.0). Built on the
[Centrarium](http://jekyllthemes.org/themes/centrarium/) Jekyll theme.
[Centrarium](https://github.com/bencentra/centrarium) Jekyll theme.
4 changes: 2 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@
crossorigin="anonymous"></script>
{% endif %}

<!-- Google Analytics -->
{% if site.ga_tracking_id %}
<!-- Google Analytics, on the deployed build only: a local serve would count as traffic. -->
{% if site.ga_tracking_id and jekyll.environment == 'production' %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking_id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
Expand Down
16 changes: 16 additions & 0 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,17 @@ blockquote {
}
}

// The hero is as tall as its title, so a two-line title made one post's cover
// taller than its neighbours'. Two lines reserved (lh is the h1's
// $heading-line-height), one centred in them, keeps most heroes one height; a
// longer title still grows it.
.post-header-container.has-cover .title {
display: flex;
align-items: center;
justify-content: center;
min-height: 2lh;
}

// Inline SVG icons (_includes/icon.html). Sized like the glyph font they
// replace: one em tall, as wide as the drawing, sitting on the text baseline.
.icon {
Expand Down Expand Up @@ -992,6 +1003,11 @@ blockquote {
padding: 1em !important;
}

// The two lines are reserved for the cover, which does not print.
.post-header-container.has-cover .title {
min-height: 0;
}

// It credits a cover that does not print.
.cover-credit {
display: none;
Expand Down
4 changes: 2 additions & 2 deletions _sass/base/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ h3 {

h4 {
font-size: modular-scale(1);
font-weight: 600;
font-weight: 700;
}

// h5/h6 stay at body size, not below it — smaller reads as fine print rather
Expand All @@ -50,7 +50,7 @@ h5 {

h6 {
font-size: modular-scale(0);
font-weight: 600;
font-weight: 700;
letter-spacing: 0.02em;
}

Expand Down
2 changes: 1 addition & 1 deletion js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
var searchInput = document.getElementById('search-input');
var resultsContainer = document.getElementById('results-container');
var statusEl = document.getElementById('search-status');
if (!searchInput || !resultsContainer) return;
if (!searchInput || !resultsContainer || !statusEl) return;

var LIMIT = 10; // must match the `limit` passed to SimpleJekyllSearch
var WINDOW_CHARS = 220; // length of the excerpt shown
Expand Down
4 changes: 4 additions & 0 deletions script/lint-posts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def self.front_matter(post, spec)
if data["description"].to_s.match?(/\$\$|\*\S[^*]*\*|`|\]\(|<[a-zA-Z\/]|\{[{%]/)
found << "1: description is plain text; no $$, *emphasis*, backticks, links or tags"
end
# The layouts print these unescaped, so <think> would vanish as a tag.
%w[title subtitle].each do |key|
found << "1: #{key} has a tag; the page reads it as HTML" if data[key].to_s.match?(/<[a-zA-Z\/]/)
end

# Jekyll drops a file without the date prefix, and builds a `date:` past the
# file's day into a permanent URL. The file-name date is the posting day.
Expand Down
6 changes: 6 additions & 0 deletions test/test_lint_posts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ def test_description_is_plain_text
assert_equal [], lint(front: "#{FRONT}description: \"Mixtral 8*7B와 C++ [1]\"\n")
end

def test_title_and_subtitle_have_no_tags
assert_finding(/\A1: title has a tag/, lint(front: FRONT.sub('"Mistral 7B"', '"Reasoning with <think> Tokens"')))
assert_finding(/subtitle has a tag/, lint(front: FRONT.sub(/^subtitle: .*$/, 'subtitle: "<s> 토큰"')))
assert_equal [], lint(front: FRONT.sub('"Mistral 7B"', '"Mistral 7B < 13B"'))
end

def test_front_matter_starts_on_line_one
assert_raises(ArgumentError) { PostLint.parse("_posts/2025-02-27-x.md", "\n---\n#{FRONT}---\nText.\n") }
assert_equal "Mistral 7B", PostLint.parse("_posts/2025-02-27-x.md", "\uFEFF---\n#{FRONT}---\nText.\n").data["title"]
Expand Down