From 61eae5c5f9881cab29712f6e696085baa977e1f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Wed, 11 Sep 2019 12:19:34 +0800 Subject: release: v1.0.0 --- _includes/functions.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 _includes/functions.html (limited to '_includes/functions.html') 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 -%} -- cgit v1.2.3