Created
November 21, 2025 11:16
-
-
Save akirk/94fe4b738cc82121c914a6315800c402 to your computer and use it in GitHub Desktop.
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
| { | |
| "$schema": "https://akirk.github.io/playground-step-library/step-library-schema.json", | |
| "meta": { | |
| "title": "WP Multibyte Patch Demo" | |
| }, | |
| "landingPage": "/", | |
| "steps": [ | |
| { | |
| "step": "setLanguage", | |
| "vars": { | |
| "language": "ja" | |
| } | |
| }, | |
| { | |
| "step": "installPlugin", | |
| "vars": { | |
| "url": "https://wordpress.org/plugins/wp-multibyte-patch/" | |
| } | |
| }, | |
| { | |
| "step": "setSiteName", | |
| "vars": { | |
| "sitename": "WP Multibyte Patch", | |
| "tagline": "Excerpt Demo - Notice how the Japanese text is truncated cleanly" | |
| } | |
| }, | |
| { | |
| "step": "addTemplate", | |
| "vars": { | |
| "slug": "home", | |
| "title": "Blog Home with Excerpts", | |
| "content": "<!-- wp:template-part {\"slug\":\"header\",\"tagName\":\"header\"} /-->\n\n<!-- wp:group {\"tagName\":\"main\",\"style\":{\"spacing\":{\"margin\":{\"top\":\"var:preset|spacing|50\"}}},\"layout\":{\"type\":\"constrained\"}} -->\n<main class=\"wp-block-group\" style=\"margin-top:var(--wp--preset--spacing--50)\">\n\n<!-- wp:query {\"queryId\":1,\"query\":{\"perPage\":10,\"pages\":0,\"offset\":0,\"postType\":\"post\",\"order\":\"desc\",\"orderBy\":\"date\",\"author\":\"\",\"search\":\"\",\"exclude\":[],\"sticky\":\"\",\"inherit\":true}} -->\n<div class=\"wp-block-query\">\n\n<!-- wp:post-template -->\n<!-- wp:group {\"style\":{\"spacing\":{\"blockGap\":\"var:preset|spacing|20\",\"padding\":{\"bottom\":\"var:preset|spacing|40\"}}},\"layout\":{\"type\":\"default\"}} -->\n<div class=\"wp-block-group\" style=\"padding-bottom:var(--wp--preset--spacing--40)\">\n\n<!-- wp:post-title {\"isLink\":true} /-->\n\n<!-- wp:post-excerpt {\"moreText\":\"続きを読む\",\"excerptLength\":110} /-->\n\n<!-- wp:post-date /-->\n\n</div>\n<!-- /wp:group -->\n<!-- /wp:post-template -->\n\n<!-- wp:query-pagination {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"space-between\"}} -->\n<!-- wp:query-pagination-previous /-->\n<!-- wp:query-pagination-next /-->\n<!-- /wp:query-pagination -->\n\n</div>\n<!-- /wp:query -->\n\n</main>\n<!-- /wp:group -->\n\n<!-- wp:template-part {\"slug\":\"footer\",\"tagName\":\"footer\"} /-->" | |
| } | |
| }, | |
| { | |
| "step": "deleteAllPosts" | |
| }, | |
| { | |
| "step": "addPost", | |
| "vars": { | |
| "title": "Clean Excerpt Truncation Demo", | |
| "content": "<!-- wp:paragraph -->\n<p>This post demonstrates WP Multibyte Patch's excerpt handling. The excerpt below contains Japanese text that will be truncated. With the plugin active, the text cuts cleanly at character boundaries instead of breaking mid-character (which would cause garbled text called \"mojibake\").</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>日本語の文章がここから始まります。WordPress は通常、抜粋を作成する際にバイト数で文字列を切り取ります。これはASCII文字では問題ありませんが、日本語のようなマルチバイト文字では、文字の途中で切られてしまい、文字化けが発生します。WP Multibyte Patch はこの問題を解決し、文字の境界で正しく切り取るようにします。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>このプラグインがないと、抜粋の最後が「?」や意味不明な記号になることがあります。プラグインを有効にすると、きれいに「...」で終わります。</p>\n<!-- /wp:paragraph -->", | |
| "type": "post", | |
| "status": "publish", | |
| "date": "2025-01-02 12:00:00" | |
| } | |
| }, | |
| { | |
| "step": "addPost", | |
| "vars": { | |
| "title": "日本の四季について", | |
| "content": "<!-- wp:paragraph -->\n<p>日本には美しい四季があります。春には桜が咲き、多くの人々が花見を楽しみます。夏は暑く、花火大会や夏祭りが各地で開催されます。秋になると紅葉が山々を彩り、観光客で賑わいます。冬は雪が降り、スキーやスノーボードを楽しむことができます。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>それぞれの季節には独特の食べ物や行事があり、日本文化の豊かさを感じることができます。春は新生活の始まりでもあり、入学式や入社式が行われます。夏休みには多くの家族が旅行に出かけ、海や山で過ごします。秋は食欲の秋とも呼ばれ、新米や秋刀魚など美味しい食材が豊富です。冬にはクリスマスや正月など、大きなイベントが続きます。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>日本を訪れる際は、季節に合わせた旅行計画を立てることをお勧めします。</p>\n<!-- /wp:paragraph -->", | |
| "type": "post", | |
| "status": "publish", | |
| "date": "2025-01-01 12:00:00" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment