Custom Publish

by danyim
5
4
3
2
1
Score: 35/100

Description

This plugin has not been manually reviewed by Obsidian staff. Command palette actions to manage frontmatter publish and visibility properties, with a copy-URL command for published pages.

Reviews

No reviews yet.

Stats

stars
14
downloads
0
forks
2
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Obsidian Custom Publish

This is an Obsidian plugin that exposes command palette actions to set frontmatter properties for custom publishing workflows. It doesn't tie itself to a specific hosting provider (Obsidian Publish or otherwise); it assumes you already have a system that scans notes and publishes based on frontmatter properties.

Commands

Command Action
Custom Publish: Publish page Sets the publish property to true
Custom Publish: Unpublish page Sets the publish property to false
Custom Publish: Toggle publish page Flips the publish property
Custom Publish: Toggle visibility Flips the visibility property
Custom Publish: Copy published page URL Copies the published URL to the clipboard using the configured URL template

If the target property doesn't exist on the note, it will be added automatically.

Settings

Setting Default Description
Publish property publish Frontmatter key used to mark a page as published
Visibility property private Frontmatter key used to control page visibility
Publish URL template (empty) URL template for published pages. Use ${PAGE} as a placeholder for the page name
Slug style title-kebab How the page name is converted for the ${PAGE} placeholder

Publish URL template

The ${PAGE} placeholder is replaced with the current note's filename, converted using the selected slug style. Special characters are stripped and words are split on spaces, underscores, and hyphens.

Slug styles:

Style Example input ${PAGE} output
kebab-case My First Post my-first-post
Title-Kebab-Case My First Post My-First-Post
TitleCase My First Post MyFirstPost
camelCase My First Post myFirstPost

Configuration examples (using kebab-case):

Publish URL template Result for "My First Post"
https://blog.example.com/${PAGE} https://blog.example.com/my-first-post
https://example.com/posts/${PAGE}.html https://example.com/posts/my-first-post.html
https://wiki.example.com/pages/${PAGE}/ https://wiki.example.com/pages/my-first-post/

Note: The "Copy published page URL" command is only available when a Publish URL template is configured.

Development

npm install
npm run dev    # watch mode
npm run build  # production build

Installation

Copy main.js, styles.css, and manifest.json to your vault at .obsidian/plugins/obsidian-custom-publish/.