ギャラリーの記事メタ情報見本に文字数・閲覧数を追加 - #3153
Closed
ma91n wants to merge 1 commit into
Closed
Conversation
見本が日付・著者の2項目のままで、説明文(日付・著者・文字数・閲覧数を 1行に並べる)とも記事ページの実物(article.ejs のメタ行)とも 食い違っていた。実体側を正として、実物と同じマークアップで 文字数と PV の項目を足す。 Fixes #3129 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
変更内容
themes/future/layout/gallery.ejsの sample-post-meta(部品ギャラリー「記事のメタ情報」の見本)に、文字数と閲覧数(PV)の2項目を追加しました。背景
見本の
.blog-infoは日付・著者の2項目しか出しておらず、説明文(「日付・著者・文字数・閲覧数を1行に並べ、タグはその下の行に置きます」)とも、記事ページの実物(_partial/article.ejsのメタ行)とも食い違っていました。実体側を正とし、実物と同じマークアップ(blog-info-breakの区切り、blog-info-metricの項目、title 属性による補足)で揃えています。char_count(samplePost)で描画get_ga4_pv()を呼び、集計値の無い記事では項目ごと出ない(article.ejsと同じ振る舞い)Fixes #3129
検証
gallery.ejsが EJS としてコンパイルできることを確認済み(ejs 3 で compile)article.ejsで全記事に対して稼働している実装をそのまま写したものです🤖 Generated with Claude Code