Skip to content

morgenman/Computer-Science

Repository files navigation

Hosting Obsidian Notes on GitHub Automatically

  1. Clone this repository
  2. Delete the notes, copy in your own and open the folder as a vault in Obsidian
  3. Deal with the .obsidian folder… probably want to keep the git plugin
  4. Go through the following files and adjust:
BranchFileWhat to change w/ L(ine)#
master (this branch)/.github/workflows/publish.yamlL16: url of repository
L38,L39: replace https://morgenman.github.io/Computer-Science/ with url of this repository
brain/mdzk.tomlL3,L7: replace name and title as you like
/notes/CNAMEREMOVE THIS FILE… Replace with your own cname if you have a custom domain
/notes/readme.mdThis is your home page. You can delete this and the zettelkasten file if you want, or put them in the master branch if you want to see and edit them in obsidian. Any notes in this folder will be on the website, but not in obsidian.
/notes/404.htmlThis is the html file generated by changing `404.md.bak` to `404.md`. When you do that, you’ll get 404.html in your gh-pages branch which you can then use to replace the `404.html` file here to reflect your own content.
L8: If you are hosting on gh-pages, you should change `/` to whatever the path is of your repository. I.e. if your site is hosted on www.username.github.io/rep-name/, this should be `/rep-name/`
Point of info: Keeping the html manually here allows you to hide the 404 page from the sidebar.
/theme/index.hbsL256-288: This is how I implemented nomnoml diagrams. I imagine other diagram concepts could be implemented here using js in a similar way. If you do that, please tag my rep so I can add it!

Note: Updating the gh-pages branch

  • This happens automatically when the master branch is written to (this branch). After making changes to the brain, simply push some change to master, and you’ll see in the actions tab that it did all the processing!

I have baked in the Spectrum theme and a light/dark mode switch manually. Feel free to explore the css in the brain branch to customize a theme. Hopefully this works for you!

About

How my notes are hosted.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published