Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PabloLION/free-lightweight-obsidian-publisher
https://github.com/PabloLION/free-lightweight-obsidian-publisher
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/PabloLION/free-lightweight-obsidian-publisher
- Owner: PabloLION
- Created: 2021-11-24T06:41:59.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-24T02:16:15.000Z (almost 3 years ago)
- Last Synced: 2024-10-29T12:42:53.556Z (about 1 month ago)
- Language: Python
- Size: 30.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- project-awesome - PabloLION/free-lightweight-obsidian-publisher - (Python)
README
## Example
See the public part of my note on [https://note.pablolion.com/](https://note.pablolion.com/).
## Usage
You don't have to download all this git.
`deploy-obsidian.zsh` in the root folder does all the job.
This is a one-file repo.### Prerequisites
0. zsh
1. obsidian-export from [zoni/obsidian-export](https://github.com/zoni/obsidian-export)
2. mkdocs from [mkdocs.org](https://www.mkdocs.org/)
3. [netlify-cli](https://www.netlify.com/products/cli/#install) from [netlify.com](https://www.netlify.com/) then setup CLI with your netlify account.
4. theme [mkdocs-material](https://squidfunk.github.io/mkdocs-material/)
5. two-space indentation [mdx_truly_sane_lists](https://github.com/radude/mdx_truly_sane_lists)To install all of them with python pip and yarn (or npm), use this.
```shell
pip3 install mkdocs mkdocs-material mdx_truly_sane_lists
# npm install netlify-cli -g
yarn global add netlify-cli
```### Steps
1. Export these variables below in the .zshrc file or declare them in the `deploy-obsidian.zsh` file
```ZSH
obsidian_mkdocs_root=?????? # root of mkdocs project contains the mkdocs.yml file
obsidian_vault=?????? # root of the obsidian vault, contains the .obsidian folder
reserved_folder_name=?????? # name of the folder that contains static non-exported resources, this folder in $obsidian_vault/docs won't be deleted by the script. This variable is default to `res`
```2. Make sure that your mkdocs store markdown files in the `docs` folder, and the all static resources in `res` folder.
3. !! All files except `$reserved_folder_name` (`res` by default) in `$obsidian_mkdocs_root/docs` will be removed!!
4. Run `deploy-obsidian.zsh`, add it to your `.zshrc` file, etc. (If you don't have a netlify-cli, please answer "NO" to the first question.)
5. Enjoy.
6. (Optional) Write some feedback in this repo.## FAQ
### Functionality
Q: Does it have the graph?
A: No, it doesn't.### Trouble shooting
- `read -q invalid`: execute with zsh instead of with sh
## Bonus
### Switching from GitHub Wiki to this solution
- You can fix the GitHub flavor link with regex substitution/\[\[(.+)\|(.+)\]\]/g => [[$2|$1]] ([See it in my note](https://note.pablolion.com/coding/markdown%20note/#links-in-obsidian))
## Contributing
### Backup
#### Python attempt
- Discarded after 2 hours, because I find a easier way.