Skip to content

Commit

Permalink
Plugin fixes and cleanup (#4)
Browse files Browse the repository at this point in the history
Closes #3 

## Changes
- reviewed, cleaned up, and adjusted parts of code related to publishing/unpublishing notes and associated assets (to make it easier for myself I've added DONE keyword at the top of every method/function that has been reviewed and adjusted by me, the rest still needs work; I'll remove these annotations in the future when the whole code has been fully reviewed and adopted in the next iterations)
- for now left only 3 basic settings (repo, gh user name, PAT) and commented out the rest as I haven't reviewed or tested them yet
- added basic instructions to README
  • Loading branch information
olayway committed May 8, 2023
1 parent cb12322 commit 84dabc4
Show file tree
Hide file tree
Showing 12 changed files with 706 additions and 1,359 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# 🌷 Obsidian Flowershow Plugin

Obsidian Flowershow plugin for publishing with [Flowershow](https://github.com/datopian/flowershow) direct from your Obsidian vault.

## Docs

### Initial Setup

1. Firstly, you will need a GitHub account. If you don't have it yet, create one [here](https://github.com/signup).
2. You'll also need a Vercel account. You can sign up using your GitHub account [here](https://vercel.com/signup)
3. Open [this repo](https://github.com/datopian/flowershow-template), and click the blue "Deploy" button under "Quick clone and deploy" section. This will open Vercel's "Create Git Repository" page. Pick a name for your site's repository and click "Create", to create a copy of the template repository in your GitHub account and deploy it to Vercel.
4. Now you need to create a personal access token on GitHub, so that the plugin can add/delete notes to/from the repo. Go to [this page](https://github.com/settings/tokens/new?scopes=repo) while logged in to GitHub. The correct settings should already be applied. If you don't want to generate this every few months, choose the "No expiration" option. Click the "Generate token" button, and copy the token you are presented with on the next page.
5. In Obsidian open Flowershow plugin settings. Fill in your GitHub username, the name of the repo with your notes which you created in step 3. Lastly paste the token you created in step 4.
6. Now, let's publish your first note! Create a new note in Obsidian.
7. Open your command pallete by pressing CTRL+P on Windows/Linux (CMD+P on Mac) and find the "Flowershow: Publish Single Note" command. Press enter.
8. Go to your site's URL which you should find on [Vercel](https://vercel.com/dashboard). If nothing shows up yet, wait a minute and refresh. Your Flowershow site with the note you just created should now be up and running.

Congratulations, you now have your own Flowershow site, hosted free of charge!
You can now start adding links as you usually would in Obisidan, with double square brackets like this: [[Some Other Note]], to the note that you just published. You can also link to a specific header by using the syntax [[Some Other Note#A Header]]. Remember to also publish the notes your are linking to as this will not happen automatically.

### Commands

* `Flowershow: Publish Single Note` - Publishes the current note to your Flowershow site.
* `Flowershow: Publish All Notes` - Publishes all notes in your vault to your Flowershow site.

### Frontmatter settings

* `isDraft` - Set to `true` to keep the note unpublished from your Flowershow site (or unpublish it if it was published before). Default: `false`.

## Development

### Local testing
Expand Down
Loading

0 comments on commit 84dabc4

Please sign in to comment.