Skip to content

Commit 1774804

Browse files
reduce size of reference page HTML by 68%
1 parent 74a2956 commit 1774804

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

_includes/plotschema-reference.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,7 @@
9696
{% capture curlyarrays %}{% raw %}{arrays}{% endraw %}{% endcapture %}
9797
{% capture curly2darray %}{% raw %}{2D array}{% endraw %}{% endcapture %}
9898
{% capture curlyobject %}{% raw %}{object}{% endraw %}{% endcapture %}
99-
{{ plotschemacontent | replace:'*',quote | replace:curlyarray,array | replace:curlyobject,object | replace:curlyarrays,arrays | replace:curly2darray,2darray | replace:"data_array",data_array | replace:"true",truestring | replace:"false",falsestring }}
99+
{{ plotschemacontent | replace:'*',quote |
100+
replace:curlyarray,array | replace:curlyobject,object |
101+
replace:curlyarrays,arrays | replace:curly2darray,2darray |
102+
replace:"data_array",data_array | replace:"true",truestring | replace:"false",falsestring | normalize_whitespace }}

_includes/reference-block.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
<ul>
22
{% for obj in attribute %}
3-
{% if obj[0] != "flags" and obj[0] != "role" and obj[0] != "extras" and obj[0] != "description" and obj[0] != "_isLinkedToArray" and obj[0] != "items" and obj[0] != "uid" and obj[0] != "smith" and obj[0] != "_deprecated" and obj[0] != "_isSubplotObj" and obj[0] != "editType" and obj[0] != "impliedEdits"%}
3+
{% capture last_three %}{{ obj[0] | slice: -3, 3 }}{% endcapture %}
4+
{% if last_three != "src" and obj[0] != "flags" and obj[0] != "stream" and obj[0] != "_arrayAttrRegexps"
5+
and obj[0] != "role" and obj[0] != "extras"
6+
and obj[0] != "description" and obj[0] != "_isLinkedToArray"
7+
and obj[0] != "items" and obj[0] != "uid"
8+
and obj[0] != "smith" and obj[0] != "_deprecated"
9+
and obj[0] != "_isSubplotObj"
10+
and obj[0] != "editType" and obj[0] != "impliedEdits"%}
411

512
{% if obj[0] == "type" and page.language == "python" and block == "data" %}
613
{% continue %}
714
{% endif %}
815

16+
{% if (obj[0] == "r" or obj[0] == "t") and
17+
(include.parentlink == "scatter" or include.parentlink == "scattergl" or include.parentlink == "bar" %}
18+
{% continue %}
19+
{% endif %}
20+
21+
922
<li>
1023
{% if toc %}
1124
{% assign id="" %}

0 commit comments

Comments
 (0)