{"id":21206269,"url":"https://github.com/arvindd/notes-template","last_synced_at":"2026-03-19T19:18:58.040Z","repository":{"id":148093176,"uuid":"604125201","full_name":"arvindd/notes-template","owner":"arvindd","description":"Template for creating org-mode notes (private or public) and publishing them via a public hugo site.","archived":false,"fork":false,"pushed_at":"2023-12-06T20:54:37.000Z","size":37,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T11:42:53.964Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arvindd.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T11:43:21.000Z","updated_at":"2023-02-20T15:54:05.000Z","dependencies_parsed_at":"2025-01-21T15:41:40.674Z","dependency_job_id":null,"html_url":"https://github.com/arvindd/notes-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/arvindd/notes-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindd%2Fnotes-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindd%2Fnotes-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindd%2Fnotes-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindd%2Fnotes-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arvindd","download_url":"https://codeload.github.com/arvindd/notes-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindd%2Fnotes-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29599357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T22:25:43.180Z","status":"ssl_error","status_checked_at":"2026-02-18T22:25:42.766Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T20:55:04.331Z","updated_at":"2026-02-19T00:32:30.236Z","avatar_url":"https://github.com/arvindd.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: README\n#+startup: indent\n#+startup: showall\n#+category: notes\n#+type: docs\n#+draft: false\n\n* Introduction\n  This template is for creating org-mode notes system on your own local computer. Optionally, it also allows you to publicly share your notes on the internet via a [[https://gohugo.io/][hugo]]-generated static website.\n\n* How to set something similar to this for yourself?\n  If you plan to use emacs for all your notes, first of all, clone [[https://github.com/arvindd/.emacs.d][.emacd.d]] in your home directory. This sets up the basic settings for all the notes.\n\n  Now, use the \"Use this template\" button to first make a repository in your own github account, and clone that repo into to your local machine (eg: ~/notes).\n\n  Note that we do not need any installation of hugo and related software if we are only needing to work with the notes (read, change, add, etc.). Hugo is only needed for posting a public version of the notes.\n\n* Where are the notes?\n  In the notes repo that you cloned above, the actual notes are in the \"content\" in the root of your notes repo. All the notes in that directory are org-mode files, just as this file.\n\n  Every folder inside content (and in all sub-directories) there is an _index.org file - this is the index file for each directory. THe directories form sections, and each file is a note in that section.\n\n  Using org-mode makes it easy to manage notes with emacs. Of course, if you prefer to use markdown files, you could do so too - the choice is entirely yours.\n\n* The .notes folder\n  The emacs settings you cloned above, however, does not assume a hugo site. This is to make sure that notes remain independent of hugo - and can be used even without hugo.\n\n  Emacs assumes all notes are in the ~/.notes folder - i.e., .notes folder in your home directory.\n\n  Therefore, in order to simply use emacs in the org-mode for all your notes, you need to create a symbolic link .notes that points to the notes/content folder above.\n\n  On Linux / WSL, from the home directory, this is done with:\n\n  #+begin_src\n  ln -s \u003cpath-to-notes\u003e/content .notes\n  #+end_src\n\n  On Windows, from the home directory, this is done on powershell with:\n\n  #+begin_src\n  cmd /c mklink /d .notes \u003cpath-to-notes\u003e/content\n  #+end_src\n\n  On Windows, from the home directory, this is done on command prompt with:\n\n  #+begin_src\n  mklink /d .notes \u003cpath-to-notes\u003e/content\n  #+end_src\n\n* Installation of tools\n  As mentioned above, if our sole purpose is to maintain a local version of the notes, we do not need any of the tools - including hugo, go, git, etc. We need all these tools only for building a public version of the notes.\n\n  If you want to also check the version of notes locally using hugo-generated site, install all the tools now.\n\n  First, finish installation of hugo and its pre-requisites following [[https://notes.ramdoot.in/hugo][this guide]]. Since this notes uses [[https://www.docsy.dev/][docsy theme]], it also has another prerequisite - nodejs. Install all that following [[https://notes.ramdoot.in/nodejs][this guide]].\n\n  For building the hugo site for the notes, we also need additional pre-requisite npm packages. Install these too:\n\n  #+begin_src\n  npm install -D autoprefixer\n  npm install -D postcss-cli\n  npm install -D postcss\n  #+end_src\n\n* If you use emacs org-mode for your notes...\n** Public vs private notes\n   You can do this if you use emacs org-mode for your notes.\n\n   When a new note file is created using emacs org-mode, on default, the file is created with a front-matter as \"#+draft: true\". With this value for draft, the file remains as a private note, and will be seen only when logged into your own notes repo in github.\n\n   To make the note as a public note, i.e., accessible using your hosting domain, make the front-matter as \"#+draft: false\" - and this becomes public.\n\n   Note that you need one of the following for having private notes:\n   - A FREE account in hosting providers such as [[https://www.netlify.com/][netlify]] for hosting your static website, but still able to keep your github repo private. Netlify can generate hugo sites automatically when you push your notes to your private repo in github.\n   - A github enterprise or a paid github pro/teams so that you can have [[https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages][github pages]] for private repo\n\n** Hiding parts of a public note\n   An entire subsection of a note can be hid from the public note by tagging it with a \"noexport\" tag. In emacs-org mode, tags can be added by using =C-c \u003ctag name\u003e=.\n\n** Including simple images using emacs picture mode\nOf course, since you are using emacs org-mode, you could simply add an inline image using the usual image syntax for org-mode: ~[[link]]~.\n\nOther way to draw quick (but simple) images in emacs is by using the picture mode. For example, a simple explanation such as this could easily be done using picture mode:\n\n#+name: example ascii picture\n#+begin_src ditaa :file img/quad.png :exports both\n\n                  Types of quadrilaterals\n\n                                             +-------------+\n   +----------------------+                  |             |\n   |                      |                  |             |\n   |      Rectangle       |                  |   Square    |\n   |                      |                  |             |\n   +----------------------+                  |             |\n                                             +-------------+\n\n#+end_src\n\n\nWhat you see above are some drawings done simply using normal ascii characters - and embedded in a source-code block (i.e., between ~#+begin_src~ and ~#+end_src~. When done so, hugo simply puts these in pre-formatted HTML blocks so that they will look exactly the way they look within an emacs. The same result could have also been achieved with example blocks with delimiters ~#+begin_example~ and ~#+end_example~.\n\nHowever, if you use hugo to plavce your notes in a publicly accessible location, it makes sense to actually have a picture drawn and exported as actual png file so that it looks natural when seen via a browser. Our friend to do that is via [[https://github.com/stathissideris/ditaa][ditaa]] - a small command line program that converts such ascii figures as above into real looking pictures. You will have to do it by embedding the block above using a source-code block as follows:\n\n#+begin_example\n#+​begin_src ditaa :file img/quad.png :exports results\n\n\u003cput your ascii drawing here (emacs picture may help you for difficult drawings)\n\n#+​end_src\n#+end_example\n\nWhat you see above is a ditaa source code block, with the file name specified as img/quad.png (this is where ditaa will create the png file when the above source code block is executed with ~C-c C-c~). The ~:exports results~ will make sure that the original ascii block is not shown on your webpage, and only the \"results\" of execution of the source code block (in this case, your png image created after ditaa is invoked using ~C-c C-c~) is shown. When executed, results appear as follows:\n\n#+begin_example\n#+RESULTS\n[[img/quad.png]]\n#+end_example\n\nOne important thing that *you should do* is to change the link to the image in the ~#+RESULTS~ above to be an absolute link (i.e., prefix that with a ~/~ - so that it is accessible on the web. Non-absolute paths would be relative to the root of the notes folder - so might not be seen when rendered on your web. In this case, change the link to: ~[[/img/quad.png]]~ - note the ~/~ prefix.\n\nWhen done this way, the above picture will be shown on your results location as follows (note that you can also move your results anywhere in your notes by adding a ~#+name:~ to your source code block):\n\n#+RESULTS: example ascii picture\n[[img/quad.png]]\n\n* Disallowing robots to crawl your site\nOn default, public sites generated by hugo are crawled by search-engine bots like google or bing. In order to stop crawlers that honour robots.txt, create this file: =/layouts/robots.txt=. The file should contain this:\n\n#+begin_example\nUser-agent: *\n{{ range .Pages }}\nDisallow: {{ .RelPermalink }}\n{{ end }}\n#+end_example\n\nThis will make hugo generate robots.txt in the root of the generated site with the above contents. This content basically requests crawlers not to crawl any page in the generated site - and all those crawlers that honor robots.txt (such as google and bing) will not crawl your generated site.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvindd%2Fnotes-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farvindd%2Fnotes-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvindd%2Fnotes-template/lists"}