# Discourseカテゴリーヘッダーのテーマコンポーネント

**URL:** https://meta.discourse.org/t/discourse-category-headers-theme-component/148682
**Category:** Theme component
**Created:** [2020 年 4 月 21 日午前 1:02 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682 "2020-04-21T01:02:59Z")
**Posts on this page:** 20
**Page:** 8

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2025 年 8 月 9 日午前 12:14 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/148 "2025-08-09T00:14:06Z")

</div>

素晴らしい！完璧な状態に戻りました。迅速な対応と、おまけに改善までしていただき、ありがとうございます！

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 8 月 9 日午前 2:36 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/149 "2025-08-09T02:36:29Z")

</div>

ネイサンさん、こんにちは。

「続きを読む」リンクは、説明文に揃えるのと、説明文の末尾にインライン表示するのと、どちらが良いか興味があります。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2025 年 8 月 9 日午前 3:01 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/150 "2025-08-09T03:01:26Z")

</div>

テキストの最後にインラインで表示するのが一番良いと思います。

こうすれば、ピン留めされた投稿ともっと一貫性があり、はるかにコンパクトで効率的になります（そう思います）。

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/6/3/363913f360837726a26499f7eb8d83df645852d0.png)

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 8 月 20 日午前 11:48 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/151 "2025-08-20T11:48:17Z")

</div>

@nathank この機能を追加しました！

このPRでは、2つの新機能を追加します。

1. カテゴリの説明に段落を追加。これにより、新しい設定 `show_full_category_description`（デフォルトは `false`）が追加され、Aboutカテゴリトピックの投稿内容全体を表示できるようになります。
2. インライン「続きを読む」リンク。これにより、新しい設定 `inline_read_more`（デフォルトは `false`）が追加され、「続きを読む」リンクがカテゴリの説明の数行下ではなく、末尾に追加されるようになります。

注意点：

- `show_full_category_description` が `true` の場合、インライン「続きを読む」リンクはカテゴリの説明の末尾には追加されません。
- カテゴリの説明に関する上書きはありません。`show_category_description` と `show_full_category_description` の両方を `true` に設定でき、両方の説明が表示されます。これは、後続のPRで対応される可能性があります。

> <https://github.com/naidihr/discourse-category-headers/pull/18>
>
> This PR adds 2 new features:
> 1. More paragraphs to the category description. Th…is adds a new setting, \`show\_full\_category\_description\` (default \`false\`) to show the full post contents of the About category topic.
> 2. Inline 'Read more' link. This adds a new setting \`inline\_read\_more\` (default \`false\`) to append the 'Read more' link at the end of the category description, instead of a few lines down.
> 
> Things to note:
> \- The inline 'Read more' link is not added to the end of the category description when \`show\_full\_category\_description\` is \`true\`
> \- There is no override regarding the category descriptions: you can set both \`show\_category\_description\` and \`show\_full\_category\_description\` to \`true\`, and both descriptions will be shown. This may be addressed in a later PR.

問題が発生した場合は、こちらに投稿してください。

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [2025 年 9 月 11 日午後 2:08 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/152 "2025-09-11T14:08:11Z")

</div>

3.5.0でカテゴリのロゴや絵文字が表示されない問題が発生している方はいらっしゃいますか？カテゴリロックアイコンが有効になっていても表示されません。

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 9 月 11 日午後 2:18 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/153 "2025-09-11T14:18:37Z")

</div>

こんにちは、このスクリーンショットと、もしあればブラウザのエラーを送信していただけますか？ バージョン互換性の問題かもしれません 🤔。

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [2025 年 9 月 11 日午後 3:45 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/154 "2025-09-11T15:45:40Z")

</div>

こちらでライブで動作している様子をご覧いただけます: [Hanfgarten-KREATIV-Contest - Forum | Cannabisanbauen.net](https://forum.cannabisanbauen.net/c/growreports/hanfgarten-contest/231)  
(tcプレビューでのみテストしましたが、全く同じ動作でした…)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2025 年 9 月 11 日午後 9:04 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/155 "2025-09-11T21:04:13Z")

</div>

> [@jrgong](#):
>
> カテゴリのロゴと絵文字

カテゴリ設定の画像セクションにアップロードするカテゴリロゴのことですか、それとも一般設定で正方形、アイコン、または絵文字を選択できるスタイル設定のことですか？

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 9 月 12 日午前 3:36 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/156 "2025-09-12T03:36:54Z")

</div>

はい、以下をご確認ください。

- `show_site_logo` にチェックが入っていますか？
- `logo_small` のサイト設定はありますか？

鍵アイコンの件は興味深いですね。確認します。

編集：@jrgong [PRをマージしました](https://github.com/naidihr/discourse-category-headers/pull/19)。ただし、あなたはstableを使用しており、アップデートは適用されないと思います…最近のウィジェットの非推奨もstableで発生していますか？

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2025 年 9 月 12 日午前 10:28 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/157 "2025-09-12T10:28:40Z")

</div>

> [@NateDhaliwal](#):
>
> Thing is, you’re on stable and I don’t think you’ll get the update

更新すれば機能するはずです。現在の安定版を古いバージョンに固定するような互換性ファイルのエントリはありません。

> <https://github.com/naidihr/discourse-category-headers/blob/master/.discourse-compatibility>

変更を加えて、古いバージョン（安定版など）でも機能するかどうかを確認したくない場合に、時々追加することがあります。

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [2025 年 9 月 12 日午後 12:09 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/158 "2025-09-12T12:09:06Z")

</div>

以下は私の設定です。

 ![CleanShot 2025-09-12 at 14.07.06@2x](https://global.discourse-cdn.com/meta/original/4X/6/5/8/658965de9489ad714f4a8df91aadefb8c34ce939.png)

TCを更新しましたが、問題は解決しません。

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 9 月 12 日午後 1:07 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/159 "2025-09-12T13:07:58Z")

</div>

カテゴリにカテゴリロゴがないものはありますか？すべてある場合、`show_site_logo` をオンにすると役立ちますか？

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [2025 年 10 月 5 日午後 12:32 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/160 "2025-10-05T12:32:00Z")

</div>

> [@NateDhaliwal](#):
>
> カテゴリにカテゴリロゴがないものはありますか？

そうなっています。

> [@NateDhaliwal](#):
>
> すべての場合、`show_site_logo` をオンにすると役立ちますか？

残念ながら、そうではありません。

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 10 月 5 日午後 1:14 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/161 "2025-10-05T13:14:24Z")

</div>

SVG の代わりに PNG 画像を使用すると、機能しますか?

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [2025 年 10 月 5 日午後 2:13 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/162 "2025-10-05T14:13:32Z")

</div>

ライトモードでははい。しかし、ダークモードでは、カテゴリヘッダーにライトのロゴが表示されたままです。こちらで動作中の様子をご覧ください。

> **[Hanfgarten-KREATIV-Contest](https://forum.cannabisanbauen.net/c/growreports/hanfgarten-contest/231)**
>
> Startdatum: 10. September 2025 Seeds im Contest Super Silver Haze | MAC Miracle Alien Cookies | Animal Mints | Northern Lights

私のカテゴリ画像のセッティング：

 ![CleanShot 2025-10-05 at 16.15.11@2x](https://global.discourse-cdn.com/meta/original/4X/0/b/3/0b32d9d1b925c3292cb59cd8333e05deb757b59f.png)

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2025 年 10 月 5 日午後 10:04 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/163 "2025-10-05T22:04:33Z")

</div>

ダークモードのカテゴリロゴとの互換性がまだ組み込まれているかどうかわかりません。これは機能リクエストになります。

それを担当するために、@NateDhaliwal に金銭的な貢献を検討していただけますでしょうか（少なくとも申し出ることはできますか）？

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 10 月 5 日午後 11:08 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/164 "2025-10-05T23:08:03Z")

</div>

はい、ネイサンが言ったように、コンポーネントは現在ダークモード画像を使用していません。しかし、興味深いコンポーネントを見つけました。

> <https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/light-dark-img.gjs>

それが機能するかどうかを確認するために、いくつかテストする必要があります。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2025 年 10 月 22 日午前 4:08 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/165 "2025-10-22T04:08:33Z")

</div>

カテゴリ間を移動してもカテゴリの説明テキストが更新されないというリグレッションに気づきました。

アイコンとタイトルは更新されますが、なぜかテキストは更新されません。ページを更新すると修正されます。

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025 年 10 月 22 日午前 9:06 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/166 "2025-10-22T09:06:08Z")

</div>

_ゴクリ_ 報告ありがとうございます。確認します。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2025 年 10 月 22 日午後 11:35 UTC](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682/167 "2025-10-22T23:35:58Z")

</div>

もう少し調べてみたのですが、TCがあるもう一方のサイトはこの点では問題ありません。私がもう少し深く掘り下げるまで、時間を無駄にしないでください！

[前のページ](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682.md?page=7)

[次のページ](https://meta.discourse.org/t/discourse-category-headers-theme-component/148682.md?page=9)
