Skip to content

PabloLION/free-lightweight-obsidian-publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Example

See the public part of my note on 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

  1. zsh
  2. obsidian-export from zoni/obsidian-export
  3. mkdocs from mkdocs.org
  4. netlify-cli from netlify.com then setup CLI with your netlify account.
  5. theme mkdocs-material
  6. two-space indentation mdx_truly_sane_lists

To install all of them with python pip and yarn (or npm), use this.

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

    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)

Contributing

Backup

Python attempt

  • Discarded after 2 hours, because I find a easier way.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published