summaryrefslogtreecommitdiff
path: root/_includes/functions.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/functions.html')
-rw-r--r--_includes/functions.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/_includes/functions.html b/_includes/functions.html
new file mode 100644
index 0000000..3f9fee2
--- /dev/null
+++ b/_includes/functions.html
@@ -0,0 +1,25 @@
+{%- if include.func -%}
+ {%- assign func = include.func -%}
+{%- endif -%}
+
+{%- assign include_path = func -%}
+{%- assign path_array = include_path | split: '.' -%}
+{%- if path_array.size == 1 -%}
+ {%- assign include_path = include_path | append: '.html' -%}
+{%- endif -%}
+
+{%- if func == 'log' -%}
+ {%- include functions/log.html level=include.level msg=include.msg -%}
+{%- else -%}
+ {%- assign include_path = 'functions/' | append: include_path -%}
+ {%- include {{ include_path }} -%}
+{%- endif -%}
+
+{%- if func != 'log' -%}
+ {%- assign msg = '[function]['
+ | append: {{func}}
+ | append: '] '
+ | append: {{return}}
+ -%}
+ {%- include functions.html func='log' level='info' -%}
+{%- endif -%}