This plugin is used to upload files to a configured GitHub repo. Unlike Obsidian Git, the plugin allows sharing only files marked by a pre-configured meta-data key, similar to
publish: true in Obsidian Publish.
The configuration of the plugin makes it possible to share files in any repo you own.
The final idea is to provide a plugin/workflow for the majority of alternatives to Obsidian Publish.
Thus, the plugin allows configuring different workflows:
- It is possible to push in a GitHub repo by setting a receiving folder ;
- But also to push in a folder respecting a hierarchy, either from Obsidian (relative path) or from a key configured in the frontmatter.
The idea is to be able to push in a specific place of your repository, to respect the constraints of mkdocs or Jekyll.
Moreover, you can choose to transfer (or not) the images, with the choice of a specific reception folder for it.
Finally, it is possible to configure the autodeletion of files that have been deleted or that you have stopped sharing.
Be careful though, the autodeletion is only possible if you have configured the reception folder (as well as the “Root” folder if you use the YAML frontmatter). Also, you can loose data!
To use the plugin, you need to fill the correct information to allow the workflow.
- Repo name: The repository where the information will be sent.
- GitHub username: Your username.
- GitHub Token: Get your GitHub Token here. The correct settings should already be applied. If you want to avoid generating this every few months, select the “No expiration” option. Click the “Generate token” button, and copy the token you are presented with on the next page.
You have two options :
- Use a “fixed” folder : Every file will be sent in this folder.
- Use a folder created based on a
- Use the relative path from obsidian. You can prepend a folder using the default folder.
You need, in all case, to configure the default folder : The file will be sent here.
If you use the option for frontmatter, this folder will be the default folder : the file will be sent here if the key doesn’t exist.
Using the second option will activate two more options :
- Front matter key: The key you want to use in your file.
- Root folder : To prepend a path before the category key found (if any key are found!)
- You use
categoryin a file with
- You set a root folder with
- And you set a default folder on
The final path (in GitHub!) will be :
But, if you don’t set
category, the path will be
Every file will be sent in the default folder. If you leave the default folder blank, it will be sent in the root of the repository.
- If you set
sourcefor the default folder, any file will be sent in
your_repo/source, whatever is their frontmatter key or their relative path.
- If you leave it blank, it will be sent in
It uses the relative path in your Obsidian vault. The default folder will be prepended before the relative obsidian path. You can leave it blank to use the root repository.
For a file in
- If you set
source: the final path will be
- If you leave the default folder blank, the final path will be
If your workflow needs to activate a GitHub actions, set the name here.
Leave it blank to disable the GitHub actions activation.
You can also set up an “auto-delete” when you use the commands to delete files:
- Deleted from your vault
- Which you have stopped sharing
This option will also add a new command to delete file (without sharing new file).
You can’t use the delete command if you don’t have set a default folder (and a root folder if you use the YAML configuration)
Also, you can lost some files using this commands, so be careful! Don’t forget that you can revert commit in case the plugin delete a file you don’t want to delete.
Occasionally, you want to avoid sending the image linked (why? Don’t know. It’s your GitHub repo, after all!). You can remove the transfer of these files.
If you choose to send image, you can set a default folder for image.
You can configure :
- The share key used by the plugin. By default, it is
- Folder excluded. The share key can’t work here. Useful if you forget to remove the
share(or turn it to
false) and move a file in your archive…
- Add the command to share the file on the file menu (right-click on a file in the explorer or using the three dot) and editor menu (right-click on an opened edited note)
In the Readme, you can see some workflow example.