Customizing FAQ / Guidelines Pages

AI-generated summary

In a discussion titled “Customizing FAQ / Guidelines Pages” under the Support category, shyguy shares findings and asks questions about configuring FAQ and Guidelines pages in Discourse. They explain that by default, FAQ and Guidelines are combined under routes like /faq, /guidelines, etc., pulling content from SiteSetting.guidelines_topic_id, and appear in the sidebar. When SiteSetting.faq_url is set (e.g., to /t/25), /faq becomes a direct link to that URL (external or internal), while Guidelines remain template-based. shyguy asks: (1) how to force a topic title to be exactly “FAQ” (not “Faq”) — they later suggest using Topic.find(25).update(title: 'FAQ') in Rails; (2) how to elegantly place Guidelines in the Community sidebar for all users, possibly via the new custom sidebar feature; and (3) what I18n.t('guidelines_topic.title') is used for — likely only during initial topic creation. twofoursixeight replies by pointing to existing documentation on updating FAQ, privacy policy, and terms of service at meta.discourse.org.

i didn’t find it documented in detail anywhere, so i thought i’d make some notes about what i found so far and ask some questions. :slight_smile:

Guidelines and FAQ are two separate entities that are combined in the default config.

SiteSetting.faq_url = '' (default):

image

FAQ:

  • routes: /faq, /guidelines, /rules, /conduct → a template (or something) populated with content from SiteSetting.guidelines_topic_id (FAQ/Guidelines topic in the Staff category)
  • relevant localizations (Admin > Customize > Text): I18n.t('js.faq'), I18n.t('js.sidebar.sections.community.links.faq.content'), etc
  • shows up in the sidebar

SiteSetting.faq_url = 'foo':

even though it says full url, it seems like it can be a relative url like /t/25, which is useful.

image

Guidelines:

  • routes: /guidelines, /rules, /conduct → template using content from SiteSetting.guidelines_topic_id
  • localizations: I18n.t('js.guidelines'), etc

FAQ:

  • routes: /faq → SiteSetting.faq_url
    • for better or worse, this is a direct link to that URL. it doesn’t pull the content and put it into a template like Guidelines does. it’s intended to give you the option of linking to an external resource.
  • localizations: I18n.t('js.faq'), I18n.t('js.sidebar.sections.community.links.faq.content'), etc
  • shows up in the sidebar

Questions

i am opting for a separate FAQ, and i am linking it to a FAQ topic.

  1. i can’t figure out how to set the topic title to simply FAQ – not Faq or similar. i tried SiteSetting.title_prettify and SiteSetting.min_topic_title_length. the closest i can get is Faq (and it is stored in the db like that). i tried directly editing the db like SQL: update topics set title = 'FAQ' where id=25;, but that’s a bad idea, and it didn’t even work anyways. the updated value shows up in the topic edit dialog, but idk how to force a refresh. rebuild HTML didn’t work. i guess i need to do this in rails, but idk how.
    • here’s how (please tell me if this is wrong):
Topic.find(25).update(title: 'FAQ')
  1. what is the most elegant way to get Guidelines into the Community section of the sidebar for all users? can i somehow use the new custom sidebar thing?

  2. what’s I18n.t('guidelines_topic.title')? is that merely used during initial topic creation when you start fresh?

thanks

There is a documentation for frequently asked questions in: