├── .obsidian ├── hotkeys.json ├── appearance.json ├── app.json ├── core-plugins.json └── workspace ├── .gitignore ├── docs ├── About.md ├── images │ └── Pasted image 20220313222535.png ├── Wargames │ └── TryHackMe │ │ ├── Pasted image 20220313221939.png │ │ └── Biteme.md └── index.md ├── .github └── workflows │ └── ci.yml ├── mkdocs.yml ├── README.md └── LICENSE /.obsidian/hotkeys.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/settings.json 2 | -------------------------------------------------------------------------------- /.obsidian/appearance.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseFontSize": 16 3 | } -------------------------------------------------------------------------------- /docs/About.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | This page is for the fun stuff :) -------------------------------------------------------------------------------- /docs/images/Pasted image 20220313222535.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnHammond/notes/HEAD/docs/images/Pasted image 20220313222535.png -------------------------------------------------------------------------------- /docs/Wargames/TryHackMe/Pasted image 20220313221939.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnHammond/notes/HEAD/docs/Wargames/TryHackMe/Pasted image 20220313221939.png -------------------------------------------------------------------------------- /.obsidian/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "legacyEditor": false, 3 | "livePreview": true, 4 | "attachmentFolderPath": "docs/images", 5 | "useMarkdownLinks": true, 6 | "newLinkFormat": "relative", 7 | "promptDelete": false 8 | } -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Hello, World! 2 | 3 | Hi. This is my attempt to publish my Obsidian notes onto Github Pages. 4 | 5 | ## Is it working? 6 | 7 | The `index.md` in the `/docs` folder is the homepage you see here. 8 | 9 | The folders in `/docs` appear as the main sections on the navigation bar. -------------------------------------------------------------------------------- /.obsidian/core-plugins.json: -------------------------------------------------------------------------------- 1 | [ 2 | "file-explorer", 3 | "global-search", 4 | "switcher", 5 | "graph", 6 | "backlink", 7 | "page-preview", 8 | "note-composer", 9 | "command-palette", 10 | "editor-status", 11 | "markdown-importer", 12 | "word-count", 13 | "open-with-default-app", 14 | "file-recovery" 15 | ] -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | on: 3 | push: 4 | branches: 5 | - master 6 | - main 7 | jobs: 8 | deploy: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions/setup-python@v2 13 | with: 14 | python-version: 3.x 15 | - run: pip install mkdocs-material 16 | - run: pip install mkdocs-roamlinks-plugin 17 | - run: mkdocs gh-deploy --force 18 | -------------------------------------------------------------------------------- /docs/Wargames/TryHackMe/Biteme.md: -------------------------------------------------------------------------------- 1 | # Biteme 2 | 3 | > John Hammond 4 | 5 | 6 | ------------ 7 | 8 | Trying things with images: 9 | 10 | ![](Pasted%20image%2020220313221939.png) 11 | 12 | Trying a different path: 13 | 14 | ![](../../images/Pasted%20image%2020220313222535.png) 15 | 16 | 17 | And with code blocks: 18 | 19 | ```python 20 | #!/usr/bin/env python3 21 | 22 | import os 23 | 24 | 25 | text = [] 26 | for i in range(1,4464): 27 | text.append(open(f"source/{i}", "rb").read()[0]) 28 | 29 | print(bytearray(text).decode("utf-8")) 30 | ``` 31 | 32 | 33 | ```py 34 | #!/usr/bin/env python3 35 | 36 | import os 37 | 38 | 39 | text = [] 40 | for i in range(1,4464): 41 | text.append(open(f"source/{i}", "rb").read()[0]) 42 | 43 | print(bytearray(text).decode("utf-8")) 44 | ``` 45 | 46 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: John Hammond 2 | 3 | theme: 4 | name: 'material' 5 | palette: 6 | 7 | # Dark mode 8 | - media: "(prefers-color-scheme: dark)" 9 | scheme: slate 10 | primary: black 11 | accent: light blue 12 | # toggle: 13 | # icon: material/toggle-switch 14 | # name: Switch to light mode 15 | 16 | 17 | # Extensions 18 | markdown_extensions: 19 | - pymdownx.highlight 20 | - footnotes 21 | - pymdownx.inlinehilite 22 | - pymdownx.snippets 23 | - pymdownx.superfences 24 | # - attr_list 25 | # - pymdownx.arithmatex 26 | # - pymdownx.superfences 27 | # - pymdownx.details 28 | # - pymdownx.magiclink 29 | # - pymdownx.tasklist: 30 | # custom_checkbox: true 31 | # - pymdownx.emoji: 32 | # emoji_generator: !!python/name:pymdownx.emoji.to_svg 33 | # - admonition 34 | - toc: 35 | permalink: true 36 | 37 | plugins: 38 | - search 39 | - roamlinks -------------------------------------------------------------------------------- /.obsidian/workspace: -------------------------------------------------------------------------------- 1 | { 2 | "main": { 3 | "id": "cb76720b5d4aa2d3", 4 | "type": "split", 5 | "children": [ 6 | { 7 | "id": "22e616f2dfe47f8a", 8 | "type": "leaf", 9 | "state": { 10 | "type": "markdown", 11 | "state": { 12 | "file": "docs/Wargames/TryHackMe/Biteme.md", 13 | "mode": "source", 14 | "source": false 15 | } 16 | } 17 | } 18 | ], 19 | "direction": "vertical" 20 | }, 21 | "left": { 22 | "id": "40db45dfc8ad66a5", 23 | "type": "split", 24 | "children": [ 25 | { 26 | "id": "6779d0a4958c693e", 27 | "type": "tabs", 28 | "children": [ 29 | { 30 | "id": "c68edaeb2b0529f1", 31 | "type": "leaf", 32 | "state": { 33 | "type": "file-explorer", 34 | "state": {} 35 | } 36 | }, 37 | { 38 | "id": "f809f8362a115e8e", 39 | "type": "leaf", 40 | "state": { 41 | "type": "search", 42 | "state": { 43 | "query": "", 44 | "matchingCase": false, 45 | "explainSearch": false, 46 | "collapseAll": false, 47 | "extraContext": false, 48 | "sortOrder": "alphabetical" 49 | } 50 | } 51 | } 52 | ] 53 | } 54 | ], 55 | "direction": "horizontal", 56 | "width": 300 57 | }, 58 | "right": { 59 | "id": "77c71f1d798a9156", 60 | "type": "split", 61 | "children": [ 62 | { 63 | "id": "6b7fe881f1a65305", 64 | "type": "tabs", 65 | "children": [ 66 | { 67 | "id": "3bfdce91c8c6b27b", 68 | "type": "leaf", 69 | "state": { 70 | "type": "backlink", 71 | "state": { 72 | "file": "docs/Wargames/TryHackMe/Biteme.md", 73 | "collapseAll": false, 74 | "extraContext": false, 75 | "sortOrder": "alphabetical", 76 | "showSearch": false, 77 | "searchQuery": "", 78 | "backlinkCollapsed": false, 79 | "unlinkedCollapsed": true 80 | } 81 | } 82 | } 83 | ] 84 | } 85 | ], 86 | "direction": "horizontal", 87 | "width": 300, 88 | "collapsed": true 89 | }, 90 | "active": "22e616f2dfe47f8a", 91 | "lastOpenFiles": [ 92 | "docs/Wargames/TryHackMe/Biteme.md", 93 | "docs/Wargames/TryHackMe/Pasted image 20220313221939.png", 94 | "images/Pasted image 20220313221041.png", 95 | "docs/About.md", 96 | "docs/index.md", 97 | "images/Pasted image 20220313221758.png", 98 | "README.md", 99 | "docs/INDEX.md" 100 | ] 101 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Publish your Obsidian Notes 2 | 3 | (MkDocs template) 4 | 5 | Would you like to take _some_ of your notes in [Obsidian](https://obsidian.md/) and make it public? 6 | 7 | This template gives you an easy (and automated) way to publish your Obsidian notes on your Github pages. 8 | 9 | With this template, you get these **out-of-the-box**: 10 | 11 | - an awesome website based on Material theme, complete with a search bar (Checkout this template repo published [here](https://jobindj.github.io/obsidian-publish-mkdocs/)) 12 | ![](2021-11-22-22-49-26.png) 13 | - get the Obsidian/Roam style `[[wikilinks]]` from your vault in your published notes 14 | - Toggle between light and dark mode 15 | 16 | 17 | ## Quick start 18 | 19 | 1. Create a **new github repository using this template**. Click the green button at the top or use [this link](https://github.com/jobindj/obsidian-publish-mkdocs/generate). 20 | 21 | ![](2021-11-22-22-54-02.png) 22 | 23 | 2. **Give a name** to your repository. By default your notes will be published at `` 24 | - Copy only the `main` branch while creating the repo from the template 25 | 3. **Clone** the repository you generated **into your Obsidian folder/vault.** 26 | 4. **Move your notes** that you would like to make public to the `repo-name/docs` folder. 27 | - Easiest way to do this would be using drag and drop within Obsidian 28 | 5. Commit and **push** the changes. Github actions will take care of the rest, publishing your notes using [MkDocs](https://www.mkdocs.org/), with the [Material theme](https://squidfunk.github.io/mkdocs-material/). 29 | 6. Go to `Settings > Pages` and select the select the **Source** as your `gh-pages` branch. 30 | 31 | ![](2021-11-22-22-52-49.png) 32 | 33 | **Not working for you?** Open an [issue](https://github.com/jobindj/obsidian-publish-mkdocs/issues/new/choose) and let me know what went wrong. 34 | 35 | ## Configuring your website 36 | 37 | ### How do I arrange notes as sections and pages? 38 | 39 | By default, the sections and pages will follow the folder structure within `/docs`. The folders and sub-folders will show up as sections. Try not to have white spaces in your folder and file names, as these will be converted to HTML links. The webpage heading will be the same as the first-level heading in the markdown note. 40 | 41 | - If you would like to arrange the pages manually, then use the `nav` option in the `mkdocs.yml` [configuration file](https://www.mkdocs.org/#adding-pages) at the root of this repo to set custom page navigation. 42 | - For example, see the setup for [the Blue Book](https://lyz-code.github.io/blue-book/) at [github](https://github.com/lyz-code/blue-book/blob/master/mkdocs.yml). Managing each page using `nav` can become cumbersome as the number of notes increase though! 43 | - The Materials theme provides multiple options to arrange [sections](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-sections), use [navigation tabs](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-tabs), and many other helpful [navigation setups](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/) 44 | 45 | ## Alternatives 46 | 47 | - [kmaasrud/oboe](https://github.com/kmaasrud/oboe): tool to convert an Obsidian vault into a static directory of HTML files. 48 | - [Jackiexiao/foam-mkdocs-template](https://github.com/Jackiexiao/foam-mkdocs-template): template for Obsidian/Foam using mkdocs/mkdocs-material/mkdocs-roamlinks-plugin 49 | - [foambubble/foam-template](https://github.com/foambubble/foam-template): Foam workpace template -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | --------------------------------------------------------------------------------