mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Dev Docs: Add "Edit|History|Report Issue|Discuss" Links To Subheads
This commit is contained in:
parent
25acab7584
commit
f368d38e04
27 changed files with 331 additions and 20 deletions
29
_plugins/liquid-die.rb
Normal file
29
_plugins/liquid-die.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
# This file is licensed under the MIT License (MIT) available on
|
||||
# http://opensource.org/licenses/MIT.
|
||||
|
||||
## liquid-die.rb terminates site compilation in failure. This can allow
|
||||
## us to avoid updating the site HTML with a broken layout
|
||||
|
||||
## Example:
|
||||
## {% if some_variable_is_set %}
|
||||
## ...content...
|
||||
## {% else %}
|
||||
## {% die %}
|
||||
## {% endif %}
|
||||
|
||||
module Jekyll
|
||||
|
||||
class LiquidDie < Liquid::Tag
|
||||
|
||||
def initialize(tag_name, text, tokens)
|
||||
super
|
||||
end
|
||||
|
||||
def render(context)
|
||||
abort("Liquid die tag called. Dying...")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Liquid::Template.register_tag('die', Jekyll::LiquidDie)
|
Loading…
Add table
Add a link
Reference in a new issue