๐Ÿ“ Publish to Discourse Post Update Guide

:memo: Publish to Discourse Post Update Guide

This note outlines the minimum required frontmatter fields and key behaviors when using the Publish to Discourse plugin in Obsidian to update existing threads on a Discourse forum.

Use this as a reference to avoid silent failures and ensure proper syncing between your .md files and published content.


:white_check_mark: Minimum Required Frontmatter Template

Use this block at the top of your note:

---
title: [REQUIRED]
category: [REQUIRED]
discourse_post_id: [REQUIRED]
discourse_topic_id: [REQUIRED]
discourse_url: [OPTIONAL]
discourse_tags: []  # Must be defined, even if empty
discourse_category_id: [RECOMMENDED]
discourse_category: [REQUIRED]
---

:warning: Field Breakdown

Field Required Notes
title :white_check_mark: Yes Sets the Discourse thread title. Required for both new & updated posts.
category :white_check_mark: Yes Must match a valid Discourse category exactly (case-sensitive).
discourse_post_id :white_check_mark: Yes Needed to identify and update the existing post.
discourse_topic_id :white_check_mark: Yes Identifies the correct thread on the forum.
discourse_url :x: No Optional reference link โ€” helpful for confirmation or debugging.
discourse_tags :warning: Yes Must be declared. Use [] if no tags are needed.
discourse_category_id :warning: Recommended Sometimes required depending on forum setup. Default for โ€œUncategorizedโ€ is 1.
discourse_category :white_check_mark: Yes Must exactly match a real Discourse category (e.g., Uncategorized).

:x: Common Mistakes That Break Publishing

  • Misspelled category
    Writing Uncatagorized instead of Uncategorized silently breaks publishing.

  • Leaving required fields blank
    Example of a broken config:.
    discourse_tags: discourse_category:

    These must be explicitly set:
    discourse_tags: [] discourse_category: Uncategorized

  • Missing discourse_post_id or discourse_topic_id
    Without both, the plugin will not know what to update and may fail silently or create a duplicate post.

  • Incorrectly assuming headers or callouts affect title
    Only the title: key in frontmatter sets the published thread title. Writing # My Title in the body has no effect.โ€”


:repeat: Updating a Post from Obsidian

To publish updates correctly:

  1. Make sure your .md file includes all required frontmatter fields listed above.

  2. Save the file.

  3. In Obsidian, use the Publish to Discourse โ†’ Update Post command.

  4. Check the forum to verify that your title, body, and tags were updated.

:bulb: If the update fails silently, itโ€™s almost always due to a typo, a missing ID, or an empty required field.

This does not work for me without a target. Have I done something wrong?

:thinking:

This variable does not check for a target, harmful or not. If you are combining it with other variables it may act differently. Maybe thatโ€™s causing the issue?

Iโ€™d put it in a repeat block on top by itself, MOUNT variable, alone.

I just realized I had require target set on in the options. Itโ€™s working fine now.

1 Like