From 9ff6a24a06e52d7320992d43af27a6ff2f19311b Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Wed, 24 Oct 2018 17:23:00 +0200 Subject: [PATCH] docs: variables table as include Co-Authored-By: Ashwin Maroli --- docs/_docs/variables.md | 76 ++---------------------- docs/_includes/docs_variables_table.html | 18 ++++++ 2 files changed, 22 insertions(+), 72 deletions(-) create mode 100644 docs/_includes/docs_variables_table.html diff --git a/docs/_docs/variables.md b/docs/_docs/variables.md index aabec18d..3382b7d8 100644 --- a/docs/_docs/variables.md +++ b/docs/_docs/variables.md @@ -10,66 +10,15 @@ The following is a reference of the available data. ## Global Variables -
- - - - - - - - - {% for var in site.data.jekyll_variables.global %} - - - - - {% endfor %} - -
VariableDescription

{{ var.name }}

{{- var.description -}}

-
+{% include docs_variables_table.html scope=site.data.jekyll_variables.global %} ## Site Variables -
- - - - - - - - - {% for var in site.data.jekyll_variables.site %} - - - - - {% endfor %} - -
VariableDescription

{{ var.name }}

{{- var.description -}}

-
+{% include docs_variables_table.html scope=site.data.jekyll_variables.site %} ## Page Variables -
- - - - - - - - - {% for var in site.data.jekyll_variables.page %} - - - - - {% endfor %} - -
VariableDescription

{{ var.name }}

{{- var.description -}}

-
+{% include docs_variables_table.html scope=site.data.jekyll_variables.page %}
ProTip™: Use Custom Front Matter
@@ -87,24 +36,7 @@ The following is a reference of the available data. ## Paginator -
- - - - - - - - - {% for var in site.data.jekyll_variables.paginator %} - - - - - {% endfor %} - -
VariableDescription

{{ var.name }}

{{- var.description -}}

-
+{% include docs_variables_table.html scope=site.data.jekyll_variables.paginator %}
Paginator variable availability
diff --git a/docs/_includes/docs_variables_table.html b/docs/_includes/docs_variables_table.html new file mode 100644 index 00000000..df5e9b17 --- /dev/null +++ b/docs/_includes/docs_variables_table.html @@ -0,0 +1,18 @@ +
+ + + + + + + + + {% for var in include.scope %} + + + + + {% endfor %} + +
VariableDescription

{{ var.name }}

{{- var.description -}}

+