Skip to content

Instantly share code, notes, and snippets.

@antiops
Last active October 6, 2021 03:54
Show Gist options
  • Select an option

  • Save antiops/b5212b891d2f708913097e2b2fc99faa to your computer and use it in GitHub Desktop.

Select an option

Save antiops/b5212b891d2f708913097e2b2fc99faa to your computer and use it in GitHub Desktop.
Gollum Wiki Notes

My notes and snippets while working with Gollum git wiki


File Notes

custom.js Docs

  • Darkmode for gollum
  • Use Ace Github theme, it's light but inverts with the darkmode js
  • Add gutter to editor
  • Remove print margin (The annoying line in the middle of the editor, looks bad on a dark page)
  • Change tab size to 2

gollum-start-on-boot.vbs

  • Automatically start Gollum on Windows user boot
  • Save to or shortcut in C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Misc Notes

Markdown Footnotes/Citations

This adds an emote at the footnote that takes you back up to the cited line (id="a1") 1

Footnotes:

  1. Github: Title of page
This adds an emote at the footnote that takes you back up to the line cited line (`id="a1"`) <sup id="a1">[1](#f1)</sup>

Footnotes:
1. <b id="f1">website_name</b>: [reference_title](link_to_reference) [](#a1)
$(document).ready(function () {
// Super basic darkmode. Just inverts most elements
const darkStyle = document.createElement('style')
darkStyle.setAttribute('type', 'text/css')
darkStyle.appendChild(document.createTextNode('html{-webkit-filter:invert(100%) hue-rotate(180deg) contrast(70%) !important; background: #fff;} .line-content {background-color: #fefefe;}'))
document.getElementsByTagName('head')[0].appendChild(darkStyle)
// Editor config
// Only runs if editor is loaded, otherwise it throws a nonfatal console error on any page that isnt the editor
if (window.ace) {
window.ace.config.setModuleUrl(
'ace/theme/github',
/*'http://localhost/assets/theme-github.js', // Serve from local /assets/ folder */
'http://ajaxorg.github.io/ace-builds/src-noconflict/theme-github.js' // Read https://github.com/gollum/gollum/wiki/Custom-Styling-and-Views
)
window.ace_editor.setTheme('ace/theme/github')
window.ace_editor.setOption('showPrintMargin', false)
window.ace_editor.setOption('showGutter', true)
window.ace_editor.setOption('tabSize', 2)
}
})
' C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Set objShell = WScript.CreateObject("WScript.Shell")
isHidden = 0 'change 0 to 1 to show the CMD prompt
objShell.Run "%comspec% /c gollum C:\Users\%USERNAME%\Documents\docs --js --allow-uploads dir", isHidden 'change Windows folder path to your Gollum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment