Discourse 主题使用入门指南

这是一门关于 Discourse 主题基础知识的速成课程。本指南面向所有不熟悉 Discourse 主题的用户。如果您已经使用过 Discourse 主题或主题组件,那么您可能不需要阅读本指南。

什么是主题和主题组件?

主题或主题组件是一组打包在一起的文件,旨在修改 Discourse 的外观或添加新功能。

让我们先从主题开始。

主题

通常,主题之间并不兼容,因为它们本质上是不同的独立设计。您可以将主题想象成皮肤,或者 Android 上的启动器。您可以安装多个启动器,但不能同时使用两个。您的默认 Discourse 安装包含两个主题:FoundationHorizon

Foundation 是一种简洁、经典的 Discourse 外观,而 Horizon 则提供了一种更现代的设计,并提供多种配色方案供选择(例如 Horizon、Royal、Clover、Lily、Violet 和 Marigold——每种都有浅色和深色变体)。

Foundation

以及 Horizon

假设这还不够,您想要更多。没关系,您可以相当轻松地安装额外的主题。以下是 Meta 上可用的几个免费主题示例。

Material Design Theme

Sam’s personal “minimal” topic list design

Mint

正如您所看到的,根据您选择的不同主题,您的站点外观可能会有巨大的差异;然而,这还不是全部。除了主题之外,Discourse 还支持主题组件。

主题组件

我们使用“主题组件”这个词来描述那些更侧重于定制 Discourse 某一方面的包。由于它们的焦点更窄,主题组件几乎总是相互兼容的。这意味着您可以在任何主题下同时运行多个主题组件。您可以将主题组件想象成手机上的应用程序。

一如既往,举例是描述事物的最佳方式,以下是 Meta 上可用的几个主题组件示例

Discourse Category Banners

此主题组件会获取您现有的类别详细信息,包括名称、描述和颜色,并在相关类别页面的顶部生成一个横幅。

Brand header theme component

此主题组件为品牌添加了一个额外的顶部标题栏,包含您的徽标、导航链接以及适用于移动设备和桌面视图的社交图标。品牌徽标可以是图像或文本。

正如您所看到的,主题组件的焦点要窄得多。因此,在大多数情况下,它们是相互兼容的。现在您对 Discourse 主题和主题组件有了一个大致的了解。让我们深入探讨一下。

Discourse 主题界面

让我们来看看主题的界面。访问 your.site.com/admin/customize/themes,您应该会看到类似这样的界面:

这是 Discourse 中的默认主题界面。您可以在此处执行以下操作:

  • 设置默认活动主题
  • 选择向用户开放哪些主题
  • 创建新主题和主题组件
  • 导入新主题和主题组件
  • 向主题添加主题组件
  • 修改配色方案
  • 更改主题设置
  • 预览主题

让我们逐一介绍这些功能。

设置默认活动主题

您可以看到一个徽章,指示某个主题被设置为默认主题:

现在让我们将活动主题更改为 Horizon。您可以通过菜单按钮 或点击主题名称并在设置页面选中复选框来执行此操作:

您站点上的活动主题将设置为 Horizon。这意味着访问您站点的每个人都会看到以下内容:

选择向用户开放哪些主题

能够为站点设置主题固然不错,但更棒的是什么?让用户自己决定。Discourse 允许您向用户提供不同的主题,让他们根据自己的喜好设置主题。他们的选择仅限于其自己的账户,不会影响您的活动主题选择或其他用户的选择。

例如,您可以将活动主题设置为默认主题(Horizon),但提供 Foundation 主题作为选项。让我们在主题界面中尝试这样做。

您只需点击菜单按钮 ,然后选择“允许用户选择”

就是这样!它现在会获得一个“用户可选择”的徽章

您的用户可以通过访问以下链接来选择他们喜欢的任何主题

your.site.com/my/preferences/interface

创建新主题和主题组件

要创建新主题或主题组件,请点击“安装”按钮

然后会出现一个对话框。在菜单中选择“创建新”选项。您需要提供要创建内容的名称,并决定它是主题还是主题组件。

我们大致介绍了主题和主题组件的基础知识。如果您还记得,主题组件通常专注于修改 Discourse 的某个区域。而主题通常涵盖多个方面。您还应注意,一个主题下可以包含任意数量的主题组件,而主题组件则不能。现在不必为此担心,稍后将对这种关系进行更详细的解释。

现在,假设您已决定名称并决定将其制作为主题。好吧,一旦点击“创建”按钮,主题将被创建,然后您将能够

  1. 更改主题/主题组件的名称
  2. 为主题设置或更改配色方案
  3. 向您的主题添加子组件
  4. 向主题/主题组件添加 html / css / js
  5. 向主题添加文件或上传内容

具体的自定义内容超出了本指南的范围,因此这一点我就讲到这里。

添加 html / css / js 的界面如下(点击上述第 4 项后)

导入新主题和主题组件

我们已经有 如何导入主题的指南,但由于本指南旨在涵盖所有基础知识,因此我也在此处包含操作方法。

要导入主题或主题组件,请点击“安装”按钮

“热门”部分允许您从我们最流行的主题和组件列表中进行预览/安装。

您还可以从您的设备或通过主题存储库链接导入主题文件。每个主题的存储库链接由作者在主题话题中提供。导入主题后,前面讨论的所有内容都将适用于它。您可以将其设置为默认主题,使其可供用户选择,等等。

如果您导入的是主题组件,您还可以将其添加到您的任何主题中。这在下一节中将有详细介绍

向主题添加主题组件

假设您喜欢 Discourse 类别横幅主题组件并希望使用它。您可以按以下步骤操作

  1. 如上所述从存储库导入主题
  2. 将其作为主题组件添加到您的活动/用户可选择主题中

您可以这样操作:

导入组件后,进入您想要添加该组件的主题,并查找“包含的组件”部分

此列表将显示所有已安装的主题组件。从那里您可以向主题添加主题组件。添加 Homepage Feature 组件看起来像这样

在单个组件的页面上也存在一个类似的“在这些主题中包含组件”选项。这允许您一次将组件添加到多个主题

差不多就是这样。Homepage Feature 现在是默认主题的活动组件。如果您还希望将其添加到另一个主题,您需要重复添加主题组件的过程。

如果您已将 Foundation 主题设置为用户可选择,并将 Homepage Feature 主题组件也添加到了其中,那么选择 Foundation 主题作为其活动主题的用户也将获得 Homepage Feature 主题组件,因为它是 Foundation 主题的“子主题”。

您可以在一个主题下拥有无限数量的主题组件,并且如前所述,它们通常是相互兼容的。因此您可以执行以下操作:

所有这些组件将在该主题上同时处于活动状态。

修改配色方案

配色方案是您选择的用于生成主题中元素颜色的颜色调色板。这里我不会深入太多细节,但会向您展示如何使用配色方案。

导航至 your.site.com/admin/config/colors,您将看到

在此处您可以编辑配色方案或创建新的配色方案。要编辑配色方案,请点击它并将颜色更改为您喜欢的颜色

要创建新的配色方案,请点击此处

完成颜色更改后,现在是时候在您的活动主题或用户可选择主题中将配色方案设置为活动状态了。为此,请进入主题页面并查看此处

主题设置

Discourse 主题可以具有设置。这些设置旨在为您提供一种简便的方法,以便根据您的需要配置主题或主题组件。例如,Homepage Feature 主题组件有一些设置,用于控制哪些主题被推荐:

并非所有主题/主题组件都有设置,但对于那些有的主题,它们将始终显示在此处。设置通常包括作者提供的说明,帮助您确定需要进行哪些更改。

预览主题

有时在应用主题之前,您需要查看主题在站点上的外观。Discourse 提供了一种简便的方法来预览主题,而无需将其设置为活动状态。

在主题页面上时,请点击此处

然后会打开一个新标签页,显示该主题在您站点上的实时预览。您可以导航到不同的页面,查看所有内容的外观。预览主题最棒的地方在于,您可以实时测试更改,即使出现问题也不会影响您的站点。

其他信息

安全模式

Discourse 内置了一种在出现问题时绕过当前活动主题的方法。例如,组件代码中的 javascript 错误可能导致您的站点无法正常工作。要绕过当前活动主题,只需访问

your.site.com/safe-mode

然后您将看到

从那里您可以禁用当前活动主题,导航到主题页面并修复问题或永久禁用该主题。

获取新主题

查找新主题和主题组件的最直接方法是查看 Meta 上的 Customization > Theme 类别。

进一步阅读

Designer's Guide to getting started with themes in Discourse
Developing Discourse Themes & Theme Components
Using Safe Mode to troubleshoot issues with themes and plugins
Structure of themes and theme components
Create and share a font theme component
Create and share a color scheme
Use Discourse Core Variables in your Theme
Add settings to your Discourse theme
Theme Creator, create and show themes without installing Discourse!

如果您有任何问题,请随时提问。

91 个赞
DiscoTOC - automatic table of contents
Header Submenus
Force Mobile Homepage
Easy Responsive Footer
Installing a theme or theme component
Changes on the handlebar templates not reflecting on the browser
Which is Better? Discourse or Flarum?
Floating left sidebar
Add custom content that only appears on your homepage
What is the purpose of the "Convert" button with themes?
How can i set topic image' width
Compact Navigation
Scrollable Post Content
Hide Users Column
Where can i get discourse themes?
Discourse-webpack: A boilerplate for developing JS-heavy Discourse components
Where to place ad script?
How to make your side have a side-bar and external links
Hide full name if not logged in
Add Likes Column
Override icon / color
Restrict uploads
Kiosk, a self-service theme
Application Files after Digital Ocean Setup
Adding Custom Background CSS
Changing layout with themes
Image not filling header container
Configure tag color
Custom Header Links
Is anyone working on a Discourse Wiki?
Trust-Level Avatar Flair
How to add whatsapp in the share button list next to facebook
Floating "New topic" button
Floating "New topic" button
Different landing page for desktop vs mobile theme?
Filter topic with specific tag inside single category
:cn: DiscoTOC 自动内容表格
How to change Discourse splash animation?
Any options for over-riding the username restrictions?
Theme Creator Web Dev Help
Status Page (Atlassian)
Whitelist, allowed iframe
Is it possible to create child themes?
Youtube embed size, revisited
How to change paragraph font size?
Compliant Google Login Button
Add Category Column
Auto-Hide Post Editor Preview
Discourse Coloured Text
Alternative Voting Category Style
Discourse Cookie Consent Banner
Raw Post Button
Discourse-affiliate-linker
User card redesign field parity
Advice for starting with Discourse development
SuperHref — Detect dead Amazon/eBay links replace with related products
Local image ad banners?
Omit Emoji component
Progress Bar
Como faço para entender esse fórum? (How do I understand this forum?)
Full name @mentions
Best Workflow for Maintaining Themes?
How to create a theme (if I am a pure end user)
Fakebook Theme
Filtered Topic Lists
Discourse Popular Tag Sidebar
Auto-Linkify Words
Place for total coding beginners to learn how to customise?
Can I install an external application from github running on discourse
Topic List Sidebars
Newbie help accessing code
Per-category Terms of Service
Fetch third party data for topic list
Private Message Can't Be Reached with private messaging disabled
Share theme (component) translations
Categories Layout Override
(old) method for adding languages to highlight.js on Discourse
Discourse Sidebar Menu Reorder
Group specific tool bar
Theme Stelpolva: A discourse rounded theme based on Default Theme
Custom Hamburger Menu Links
Desktop to Mobile View Banner
Link from inside the topic to itself
Custom user menu tab
Discourse Tag Sidebars
Add To Home Screen (iOS, iPadOS)
Moonclaw Theme port
Created Topic Sort
Discourse Tag Cloud
Featured Flip Cards
Main banner doesn't appear when theme was changed
Codeblock Theme Picker
Hide Auth Method
Theme-Component v Plugin: What's the difference
Can I turn off location?
Extended About Page
Category Hider Theme Component
Category Previews
Wide image extending until search icon?
Expanded Create Topic Component
How to add Google Custom Search Engine to Discourse
Inline PDF Previews
How do I add category banners?
FKB Pro - Social theme
What's the fastest and easiest way to add a persistent javascript file or snippet
Banner opacity and disabling profile pictures / avatars
Discourse Watch Category Button
Group sidebar menu sections - deprecated
Wordpress in header, Discourse in footer ? Both sticky
Add Text In Header Beside Logo
How to remove borders in tables?
Custom Homepage for Groups
Custom header colour and category icons and login button
Discourse Web Page Watermark
Removing all categories (or just "uncategorized") from hamburger menu
Hide Likes For New Users
How to remove the number of months in the category section
Styling front page category title & nav container background
Category descriptions not showing up on mobile
How customize the appearance of sections like Amazon?
Selectively hiding numbers
Homepage (sub)category display - lots of whitespace
About the Theme category
About the Theme component category
How to update Theme Components when running on Ubuntu
Javascript code snippet injection for cookie tracking
🎀 Neomorphism, a modern theme for Discourse
Dracula a Dark Theme for Discourse
How can I add a menu item
Adding statcounter code
Grogu, a theme inspired by "The Mandalorian"
Versatile Banner
Left side hamburger menu on mobile
MD Composer extras
How to add a simple Banner
Custom Top Navigation Links
Personal Message Bubbles
Custom Header Links (icons)
Discourse for self hosting
Inline Tooltips
Topic Voting Auto Self-Vote
Full Row Bulk Select
Make "New Topic" button more prominent
Marquee / news ticker
How can I add a analytics script into the header of my community?
Display replies and likes count in mobile view
Help needed with theming and logo
Compose Center
Wikified Posts Component
Discourse Coloring Tag
Welcome Link Banner
CSS username colors only working for admin/moderators?
MD Topic List component
MD Topic List Mobile component
Review with reason
HTML tags showing in banner and don't know where to change it
New PM Dropdown Button
Topic List Previews (legacy)
:classical_building: Rome, a theme inspired by ancient roman manuscripts
How to add a script at the beginning of page header?
Recommendations on layouts? A way to preview changes?
Is it possible to change Topic Title prompt for a category?
Need a plugin coded to allow certain css codings in forum
Poll Defaults
Timeline bookmark button
Graceful Theme
Material Design Theme
Sublime Theme
Discourse hamburger tags
IFrame Lightboxes
Changing theme color for the forum
Change Excerpt of topic to go to latest post instead of that specific message
Density Toggle Component
How do I test drive UI changes?
Discourse Welcome Modal
Discourse svgbob
Colored Tag Styles
Hibiscus Theme
Fully Theme
Group Categories Page Override
Voice Recorder Component
Discourse Show Fullname in Mentions
Header Locale Selector
Mint Theme
Top Contributors Sidebar
Homepage Feature
Customized Inline Codeblocks
Profile Photowall
User Portfolio
Category Banners
Matomo Analytics
Colorful Categories
Net Promoter, Satisfaction scoring?
What is the name of this theme?
Social Share
Discourse Gifs
Kanban Board
Topic List Excerpts
Unanswered Filter
Discourse Solved Quote Customization
Post Badges
Featured Tiles
Inky Theme
Reply Template
Trendy Login
Topic Author
Placeholder Forms
Remove Dashes from Tag Names
Jitsi Video Conference
Brand Header
Show Original Poster Avatars
Categories Tag Column
Timeline with labelled step by step sections - how is this achieved?
User Card Directory
Tag Icons
Tag Banners
Guest Gate Theme Component
Offline Indicator Theme Component
Showcased Categories
Signup Banner
Submit from Preview (Mobile)
Insert Video
Hamburger Theme Selector
Google Fonts
Hide Muted Categories
Category Groups
Categories Tracking Toggle
Gated Topics in Category
Halloween Decorations :ghost:
User Field Prompt
Whereby Video Meetings
Sticky Avatars for Mobile
Change the Like Icon to :+1:
Right Sidebar Blocks
DarkPixlz's Modern Theme
Sticky New Topic Banner
Clickable Topic
Topic Count in Category Boxes
Group Timezones
Remove Name Suppression on Posts
Warning banner for old Android devices affected by Let's Encrypt changes
CSS Classes for Current User's Groups
Dice Roller
Baidu Search
Avatar Size and Shape
Discourse Icon
Topic Status Filter
GitHub Status Indicators
Topic Footer Buttons
Thin Header
Sam's Simple Theme
Optional Mobile Title Header
Custom Code
Intercom Widget
Discourse Mermaid
Custom Category Boxes
Discourse Classic Theme
Topic List Thumbnails
Unformatted Code Detector
Dark/Light Mode Toggle
Discourse Docs Card Filter
Add a custom header with a dropdown menu
Hide ignored users' topics
Contributing to Discourse
Designer's Guide to getting started with themes in Discourse
Sidebar Theme Toggle
Blackout - A Theme For OLED Displays
Issues adding CSS/JS component: Robustifying links to preserve link functionality
Horizontal loading slider
Composer Footnote Button
Account Deletion Request
Developer Toolbox
Desktop PWA Navigation
Lightweight Topic List Container
Customize the header with links, icons, or menus
Disable Likes
Buttons for Scrolling to the Top/Bottom of Topics
Advanced Search Banner
Floating Navigation Controls and Desktop Navigation Bar for Mobile
Composer tip under specific tag topics
Prevent users from changing their Full Names
Replace Discourse's default SVG icons with custom icons in a theme
Changing views to creating date?
DiscourseConnect Signup Button
Notification Banners
Alternative User PMs Button For Admin
How to use themes?
Discourse Custom Width
Clickable links in website and bio for TL0 newuser
Restrict Category Editing for Topics
Cookie Consent, GDPR, and Discourse
Allow users to block keywords
Customize Your Site Branding
Any existing theme with categories on top as cards?
How do I put gradient on thin icons?
How do I put gradient on thin icons?
Alien Night Theme - A free Dark Theme for Discourse
Arranging Categories in order of number of Topics
How to show user's name next to avatar in the navigation when logged in?
Hide staff from /about page
Breadcrumb Links
Quizmaster
Discourse OneCompiler Code Runner
Integrate Appzi feedback tool to front-end of discourse
Very Modest Theme
Developing Discourse Themes & Theme Components
Header Categories Navbar
Report Content to Group
Open In Script Editor
Hide sidebar from anon users
Sidebar User Field Toggle
Avid Reader Theme
Minimizing Maintenance on Theme Customizations
Air Theme
Minima Theme
Share Link Shortener
Twitter Native Embed
Adjust the post-voting button to the bottom
Pinboard, a simple UI theme
Clean, A clean style discourse theme
Prefilled composer link generator
Hiding GUI elements for new users (less overwhelming)
Topic List Author
App Promoter
Show both OP and last reply on mobile
Image comparison slider
Announcement Bar
Featured Categories Header
I want to learn how to program for Discourse
Featured Topics
Discourse Nav Item Icon / Emoji
A reddit-ish theme for Discourse
Homepage Toggle
Chat Sidebar
Change share icon by OS
Multiple Custom Profile Links
Image Alignment and Grid
Header Glass
Topic List Item Click Animation
Twemoji Icons
Custom embedded replies
Close Composer On Page Change (mobile)
Chat – whatsapp bubbles
Hide details button style
How can one add a toggle button to the post menu and implement an action for that toggle button in a Discourse plugin?
Targetable Color Schemes
Lock Composer
Author Badge for Topic Posts
Highlighter Composer Button
Navigation (sidebar) menu display control
Rainbow Header Gradient for Discourse
Icons next to categories
How to enable side navigation?
Long picture adaptation
F NAV - Mobile Navigation Tabs
Discourse Full-width component
QR Code Shareables
Discourse Stickers
Enable Dev Tools Button
Loading Slider to Spinner
Composer Highlighted Button
Composer Inserted and Deleted Text Formatting Buttons
Solved Topic Badge
Is there a way to remove the pop-ups when making a new topic?
Smooth Scroll Top on Homepage
Stat Banner
Usercard: show leaderboard rank
Featured Lists
eBay EPN Affiliate Link Generator
Banner Featured Links
How do I go about making a very customized theme?
Return to start of topic
Moving to a Single Category Style Site Setting
How can forum admins edit the colour of topics that have been read?
Character count when writing description
Need help integrating code wrote on Edittext to the Discourse
Transit - A Public Tranportation theme
Custom Profile Link
Search section like on Reddit?
How to resize 'Modern Category + Group Boxes' thumbnail via CSS
Category List with Banners
Watermark Image
How can I create a Discourse that's just like Stemaway.com?
Minima Adjustments for Topic Cards
How can I remove the milliseconds indicator (mini-profiler) at the top right?
Add groups to the /about page
Horizon Theme
Missing anchor links in certain TOC topics?
Changing the header font for Custom Header Links
How can I change the global font size?
Discourse Age Check
Missing anchor links in certain TOC topics?
Getting ‘undefined method `kilobytes’ for “1024”:String’ when installing theme component
How can I edit My Login Page
Discourse Modal Grip
How do I install a custom theme on my Discourse instance?
Reader Mode
Discourse OrgChart
Follow Category Button
New Topic Header Button
Editor Preview Position
Missing anchor links in certain TOC topics?
Customize new topic button text
Topic Cards
Fakebook Theme
Ghost Theme
Zeronoise Theme
Topic Map Stats Icons
Category Icons
Override Signup CTA requirements
Making custom CSS changes on your site
NateDhaliwal's Theme
Code-block line numbers
Classic About Statistics
Can We Implement the Discourse Central Theme in Our Discourse Hosted Community
AI Bot - New Question Modal
Discourse Persistent banner
Custom Logo Link
Creating a banner to display at the top of your site
A TC of fun: Discourse Confetti Clicks
Related category permissions
Discourse Birthdays & Anniversaries Today (Banner)
Unstar all badges
AI Post Analyzer for Chat
Be the first to reply
Add a Logout Button in Header for Discourse Themes
Profile text is yellow
Tag Style Tool
Insert Model 3D
Quick Profile Links Menu
Normalized Profile Links
:page_facing_up: Copy Post Component
Pull to Refresh for iOS App
Homepage Blocks
Custom Lightbox - modern, swipe gestures, fullscreen mode and more
Custom Components -- add button or text at any plugin outlet
Emoji Fluff
Adding preview screenshots to Discourse themes
Quote Callouts
Pyx's Modern Theme
Discourse Graph (Plotly) Embed
Post Notice Visibility Control
Heroes - Fantasy Theme
Custom User Menu
How to add whatsapp in the share button list next to facebook
Alternate New Topic Button (per category)
Customizable Print to PDF Button
Custom Topic Sort Order Button
Quick-add Tags To Topic
Discourse-fully light/dark下不同的颜色变量如何设置并生效
Sidebar Color Palette Toggle
Customizable Navbar Component
Filter Favorites
Introducing core themes
Unhide composer fullscreen toggle for tablets
Asking for feedback: Tag Reveal Component in Topic Lists - Expand/Collapse tags in topic lists
Enable Notification Banner
Templating of my "component" broke. How do I fix it?
Verso Theme
Discourse Featured User
Setting up light and dark mode color palettes
Highlight to Search
Default Chat Channel
Shared Draft as default New Topic
Hide Votes Left
Glacier Theme
Discourse Qingwa Timelines - Custom BBCode for Beautiful Timeline Layouts
Whisper Warning
Hidden User Fields
AI summary in topic header
Restricted reactions (like) by group
Wikipedia Lookup
Messages section for sidebar
Why am I finding Discourse so difficult to customize?
Air Theme
🌐 www theme
Air Theme
Air Theme
Upcoming Events Extra Buttons and Enhancements
Tiles Image Gallery
Topic List Tooltips
Full Screen Cover Image
Advanced Hero Component
Load More Button
Modern User Card | Fixed Experimental Usercard
Show hidden categories
Topic Hover Cards
Topic List Voting Column
Discourse Lucide Icons
External Links Icon
External Link Shield – Exit Confirmation & Trust Gating
Fingerprint Button
Editing Theme design
How do I test drive UI changes?
Air Theme
Mint Theme
Air Theme
Accent Theme
YouTube PiP & Topic Playlist Player
Post Score - Display engagement metrics on posts
Schedule Logo Change: Automate Discourse site logo(s)
Move Language Selector to Sidebar Footer
Advanced Header Search
Mobile Category List Adjustments
House Ad Templates
Red-light theme
Scroll to Top Component
Is it possible to edit plugin components?
Rotating Composer Placeholder
Embed whole forum
Land on Group Messages Component
Theme Developer Quick Reference Guide
Hide Topic Navigation With Timeline
Require Edit Reason
Video Upload to YouTube and Vimeo using Theme Component
Fixed-Position Topic Edit Button
Made some changes I cannot revert
Discourse Post Image Carousel
Applying a custom header to Discourse site
Blog Post Styling

3 posts were split to a new topic: Looking for theme gurus

2 posts were split to a new topic: Need help adding header links and image slideshow to my site

我最近按照这份指南操作(非常感谢!),成功在我的网站上安装了多个主题组件。后来我发现其中一个组件存在问题,并且存在一个 #customization:theme:broken-theme 分类。如果指南中包含这些信息会更好,但我无法编辑该指南,因此建议有人将上述信息补充进去。谢谢!

6 个赞

On many places, it is written, just add this code to CSS.
Then I tried that code/functionality to Admin Settings> Customize> Themes> Edit CSS/HTML. And paste the given code under ‘CSS’ or last pane ‘Embedded CSS’.
But there is no result.

Is there any guide which could tell the basics of how css/html code is pasted and in which area (there are many other panes/tabs also: ; Header ; After Header ; ; Footer )

3 个赞

是否有实际的文档,或者您的所有 API 信息都埋在帖子中?

1 个赞

这有帮助吗?

2 个赞

另请参阅 https://docs.discourse.org/

3 个赞

您好,

我没有看到“管理员设置>自定义>主题>编辑CSS/HTML”选项。我该如何启用此按钮?

1 个赞

您可以使用新的主题组件

3 个赞

也许是个愚蠢的问题……但你能为每个类别设置自己的“主题”吗?

提前感谢

您好 Eric,欢迎!

没有愚蠢的问题!虽然没有内置功能可以实现这一点,但您可以使用特定类别的 CSS主题组件 为每个类别分配独特的样式,例如。

1 个赞

有没有更新版本?我的整个界面看起来都不一样了,我有点找不到方向……

1 个赞

你好!你需要哪方面的帮助?你是管理员还是普通用户?谢谢。

1 个赞

欢迎!感谢您提出这个问题,我刚刚对主题进行了整理,并更新了截图以反映我们的最新版本。

1 个赞