| @@ -6,26 +6,27 @@ module Docs · 5 unmodified lines |
| 6 | home: 'https://www.hammerspoon.org', | 6 | home: 'https://www.hammerspoon.org', |
| 7 | code: 'https://github.com/Hammerspoon/hammerspoon' | 7 | code: 'https://github.com/Hammerspoon/hammerspoon' |
| 8 | } | 8 | } |
| | 9 | self.base_url = 'https://www.hammerspoon.org/docs/' |
| | 10 | self.release = '0.9.100' |
| 9 | | 11 | |
| 10 | html_filters.push 'hammerspoon/clean_html', 'hammerspoon/entries' | 12 | html_filters.push 'hammerspoon/clean_html', 'hammerspoon/entries' |
| 11 | | 13 | |
| 12 | # links with no content will still render a page, this is an error in the docs | 14 | # links with no content will still render a page, this is an error in the docs |
| 13 | # (see: https://github.com/Hammerspoon/hammerspoon/pull/3579) | 15 | # (see: https://github.com/Hammerspoon/hammerspoon/pull/3579) |
| 14 | options[:skip] = ['module.lp/matrix.md'] | 16 | options[:skip] = ['module.lp/matrix.md'] |
| 15 | # Replace '/module.lp/' with '' in URLs | 17 | options[:skip_patterns] = [ |
| 16 | options[:replace_paths] = { 'localhost:12345/module.lp/MATRIX.md' => 'localhost:12345/module.lp/hs.canvas.matrix' } | 18 | /LuaSkin/, |
| | 19 | ] |
| 17 | | 20 | |
| 18 | # Hammerspoon docs don't have a license (MIT specified in the hammerspoon repo) | 21 | # Hammerspoon docs don't have a license (MIT specified in the hammerspoon repo) |
| 19 | # https://github.com/Hammerspoon/hammerspoon/blob/master/LICENSE | 22 | # https://github.com/Hammerspoon/hammerspoon/blob/master/LICENSE |
| 20 | options[:attribution] = <<-HTML | 23 | options[:attribution] = <<-HTML |
| 21 | Hammerspoon | 24 | © 2014–2017 Hammerspoon contributors<br> |
| | 25 | Licensed under the MIT License. |
| 22 | HTML | 26 | HTML |
| 23 | | 27 | |
| 24 | | 28 | def get_latest_version(opts) |
| 25 | version '0.9.100' do | 29 | get_latest_github_release('Hammerspoon', 'hammerspoon', opts) |
| 26 | self.release = '0.9.100' | | |
| 27 | # add `hs.doc.hsdocs.start()` to your init.lua to enable the docs server | | |
| 28 | self.base_url = 'http://localhost:12345/' | | |
| 29 | end | 30 | end |
| 30 | | 31 | |
| 31 | end | 32 | end |