Ghost plug doc update
This commit is contained in:
parent
fc3b45103b
commit
9c0525e683
@ -91,9 +91,7 @@ export async function updatePlugs() {
|
|||||||
"_plug/".length,
|
"_plug/".length,
|
||||||
existingPlug.length - ".plug.json".length,
|
existingPlug.length - ".plug.json".length,
|
||||||
);
|
);
|
||||||
// console.log("Considering", plugName);
|
|
||||||
if (!allPlugNames.includes(plugName)) {
|
if (!allPlugNames.includes(plugName)) {
|
||||||
// console.log("Removing plug", plugName);
|
|
||||||
await space.deleteAttachment(existingPlug);
|
await space.deleteAttachment(existingPlug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,32 +3,48 @@ type: plug
|
|||||||
uri: github:silverbulletmd/silverbullet-ghost/ghost.plug.json
|
uri: github:silverbulletmd/silverbullet-ghost/ghost.plug.json
|
||||||
repo: https://github.com/silverbulletmd/silverbullet-ghost
|
repo: https://github.com/silverbulletmd/silverbullet-ghost
|
||||||
author: Zef Hemel
|
author: Zef Hemel
|
||||||
|
share-support: true
|
||||||
---
|
---
|
||||||
|
|
||||||
**Note:** Currently in broken state, needs updating.
|
|
||||||
|
|
||||||
<!-- #include [[https://raw.githubusercontent.com/silverbulletmd/silverbullet-ghost/main/README.md]] -->
|
<!-- #include [[https://raw.githubusercontent.com/silverbulletmd/silverbullet-ghost/main/README.md]] -->
|
||||||
# Ghost plug for Silver Bullet
|
# Ghost plug for Silver Bullet
|
||||||
|
|
||||||
Note: Still very basic, to use:
|
This allows you to publish your pages as [Ghost](https://ghost.org/) pages or posts. I use it to publish [Zef+](https://zef.plus).
|
||||||
|
|
||||||
|
## Configuration
|
||||||
In your `SETTINGS` specify the following settings:
|
In your `SETTINGS` specify the following settings:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ghostUrl: https://your-ghost-blog.ghost.io
|
ghost:
|
||||||
ghostPostPrefix: posts
|
myblog:
|
||||||
ghostPagePrefix: pages
|
url: https://your-ghost-blog.ghost.io
|
||||||
```
|
```
|
||||||
|
|
||||||
And in your `SECRETS` file:
|
Then, create a Custom Integration (in your Ghost control panel under Settings > Advanced > Integrations > Add Custom Integration). Enter a name (whatever you want), then copy the full Admin API Key in your `SECRETS` file, mirroring the structure of SETTINGS:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ghostAdminKey: your:adminkey
|
ghost:
|
||||||
|
myblog: your:adminkey
|
||||||
```
|
```
|
||||||
|
|
||||||
This will assume the naming pattern of `posts/my-post-slug` where the first top-level heading (`# Hello`) will be used as the post title.
|
## Usage
|
||||||
|
The plugin hooks into Silver Bullet's [Share infrastructure](https://silverbullet.md/%F0%9F%94%8C_Share). Therefore to share a page as either a Ghost page or post, add a `$share` front matter key. For posts this should take the shape of:
|
||||||
|
|
||||||
Commands to use `Ghost: Publish`
|
---
|
||||||
|
$share:
|
||||||
|
- ghost:myblog:post:my-post-slug
|
||||||
|
---
|
||||||
|
|
||||||
|
And for pages:
|
||||||
|
|
||||||
|
---
|
||||||
|
$share:
|
||||||
|
- ghost:myblog:page:my-page-slug
|
||||||
|
---
|
||||||
|
|
||||||
|
Now, when you {[Share: Publish]} (Cmd-s/Ctrl-s) your post will automatically be created (as a draft) or updated if it already exists.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Open your `PLUGS` note in SilverBullet and add this plug to the list:
|
Open your `PLUGS` note in SilverBullet and add this plug to the list:
|
||||||
|
@ -9,6 +9,7 @@ See the [original RFC](https://github.com/silverbulletmd/silverbullet/discussion
|
|||||||
|
|
||||||
Specific implementations for sharing are implemented in other plugs, specifically:
|
Specific implementations for sharing are implemented in other plugs, specifically:
|
||||||
<!-- #query page where share-support = true render [[template/page]] -->
|
<!-- #query page where share-support = true render [[template/page]] -->
|
||||||
|
* [[🔌 Ghost]]
|
||||||
* [[🔌 Markdown]]
|
* [[🔌 Markdown]]
|
||||||
* [[🔌 Collab]]
|
* [[🔌 Collab]]
|
||||||
* [[🔌 Mattermost]]
|
* [[🔌 Mattermost]]
|
||||||
|
Loading…
Reference in New Issue
Block a user