2022-10-29 07:48:10 +00:00
|
|
|
---
|
2022-07-24 19:39:37 +00:00
|
|
|
type: plug
|
2023-05-23 18:53:53 +00:00
|
|
|
uri: github:silverbulletmd/silverbullet-ghost/ghost.plug.js
|
2022-07-24 19:39:37 +00:00
|
|
|
repo: https://github.com/silverbulletmd/silverbullet-ghost
|
|
|
|
author: Zef Hemel
|
2023-01-15 12:48:43 +00:00
|
|
|
share-support: true
|
2022-10-29 07:48:10 +00:00
|
|
|
---
|
2022-10-12 09:47:13 +00:00
|
|
|
|
2022-10-29 07:48:10 +00:00
|
|
|
<!-- #include [[https://raw.githubusercontent.com/silverbulletmd/silverbullet-ghost/main/README.md]] -->
|
2023-05-23 18:53:53 +00:00
|
|
|
# Ghost plug for Silver Bullet
|
2022-07-24 19:39:37 +00:00
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
This allows you to publish your pages as [Ghost](https://ghost.org/) pages or
|
|
|
|
posts. I use it to publish [Zef+](https://zef.plus).
|
2022-07-24 19:39:37 +00:00
|
|
|
|
2023-01-15 12:48:43 +00:00
|
|
|
## Configuration
|
2023-05-26 12:50:43 +00:00
|
|
|
|
2022-07-24 19:39:37 +00:00
|
|
|
In your `SETTINGS` specify the following settings:
|
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
```yaml
|
|
|
|
ghost:
|
|
|
|
myblog:
|
|
|
|
url: https://your-ghost-blog.ghost.io
|
|
|
|
```
|
2022-07-24 19:39:37 +00:00
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
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:
|
2022-07-24 19:39:37 +00:00
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
```yaml
|
|
|
|
ghost:
|
|
|
|
myblog: your:adminkey
|
|
|
|
```
|
2022-07-24 19:39:37 +00:00
|
|
|
|
2023-01-15 12:48:43 +00:00
|
|
|
## Usage
|
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
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:
|
|
|
|
|
|
|
|
---
|
|
|
|
$share:
|
|
|
|
- ghost:myblog:post:my-post-slug
|
|
|
|
---
|
2023-01-15 12:48:43 +00:00
|
|
|
|
|
|
|
And for pages:
|
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
---
|
|
|
|
$share:
|
|
|
|
- ghost:myblog:page:my-page-slug
|
|
|
|
---
|
2023-01-15 12:48:43 +00:00
|
|
|
|
2023-05-26 12:50:43 +00:00
|
|
|
Now, when you {[Share: Publish]} (Cmd-s/Ctrl-s) your post will automatically be
|
|
|
|
created (as a draft) or updated if it already exists.
|
2022-07-24 19:39:37 +00:00
|
|
|
|
2023-01-15 12:48:43 +00:00
|
|
|
Enjoy!
|
2022-07-25 14:51:46 +00:00
|
|
|
|
|
|
|
## Installation
|
2023-05-26 12:50:43 +00:00
|
|
|
|
|
|
|
Open your `PLUGS` note in SilverBullet and add this plug to the list, or simply use the `Plugs: Add` command:
|
2022-07-25 14:51:46 +00:00
|
|
|
|
|
|
|
```
|
2023-05-26 12:50:43 +00:00
|
|
|
- github:silverbulletmd/silverbullet-ghost/ghost.plug.js
|
2022-07-25 14:51:46 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Then run the `Plugs: Update` command and off you go!
|
|
|
|
<!-- /include -->
|