mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Releases: Variablize Release Notes
Add additional variables to the release note files to allow setting the version number and date. The version number is required, and can be used to automatically set the release notes title. The date is optional and can be set hours/days after the release. Additionally, a Makefile test is added that checks whether the download files exist on the Bitcoin.org server. This can help prevent creating a broken Download page. * Set variables for all previous releases * Document variables in README.md * Update code and templates to use variables * Add the Download page links to the "dl" CSS class. Also add newlines to make the HTML a bit easier to parse using sed * Add a new Liquid plugin to print warnings. This is used to print a non-error warning if any release is created without the optional date
This commit is contained in:
parent
4e80dc13f8
commit
cbebe461ff
40 changed files with 314 additions and 94 deletions
31
_plugins/liquid-warn.rb
Normal file
31
_plugins/liquid-warn.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
# This file is licensed under the MIT License (MIT) available on
|
||||
# http://opensource.org/licenses/MIT.
|
||||
|
||||
## liquid-warn.rb prints a warning to stdout (not stderr). This can allow
|
||||
## someone manually building the site (or reviewing logs) to detect a problem
|
||||
|
||||
## Example:
|
||||
## {% if some_variable_is_set %}
|
||||
## ...content...
|
||||
## {% else %}
|
||||
## {% warn "Optional message" %}
|
||||
## {% endif %}
|
||||
|
||||
module Jekyll
|
||||
|
||||
class LiquidWarn < Liquid::Tag
|
||||
|
||||
def initialize(tag_name, text, tokens)
|
||||
super
|
||||
@warning = text
|
||||
end
|
||||
|
||||
def render(context)
|
||||
## Use "notice" instead of "warning" because we use grep to
|
||||
## treat some Jekyll warnings as errors
|
||||
print "Notice: " + @warning + "\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('warn', Jekyll::LiquidWarn)
|
Loading…
Add table
Add a link
Reference in a new issue