Skip to content

Commit 1db4de2

Browse files
committed
Attempt debug scripts 1
1 parent b400ab2 commit 1db4de2

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

content/_data/debug.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
header:
2+
- title: Home
3+
url: /
4+
- title: About
5+
url: "#"
6+
type: dropdown
7+
subpages:
8+
- title: Timeline
9+
url: /timeline
10+
- title: Features
11+
url: "/features"

content/_includes/custom-head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
<meta name="msapplication-config" content="/favicon/browserconfig.xml">
99
<meta name="theme-color" content="#ffffff">
1010

11-
<link rel="stylesheet" href="assets/plyr/plyr.css">
11+
<link rel="stylesheet" href="{{ "/assets/plyr/plyr.css" | absolute_url}}">

content/debug.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Links Debug
3+
permalink: /debug/
4+
layout: page
5+
---
6+
7+
## Scripts Debug
8+
9+
Results: Only
10+
11+
* Absolute URL: {{ "/assets/plyr/plyr.css" | absolute_url }}
12+
* Relative URL: {{ "assets/plyr/plyr.css" | relative_url }}
13+
* no filter: <a href="{{ "assets/plyr/plyr.css" }}">assets/plyr/plyr.css</a> - should break
14+
15+
## Nav Debug
16+
17+
{%- for item in site.data.navigation.header -%}
18+
{%- if item.type contains "dropdown" -%}
19+
* Home: [#]("#")
20+
{% if item.subpages %}
21+
{%- for page in item.subpages -%}
22+
* {{ page.url | absolute_url }}
23+
{% endfor %}
24+
{% endif %}
25+
{% endif %}
26+
{% endfor %}
27+
28+
29+
<ul>
30+
{%- for item in site.data.navigation.header -%}
31+
<!-- Dropdown Menus -->
32+
{%- if item.type contains "dropdown" -%}
33+
<li><a href="#">{{ item.title}}<span class="caret"></span></a></li>
34+
{%- if item.subpages -%}
35+
<ul class="dropdown-menu">
36+
{%- for page in item.subpages -%}
37+
{%- if page.url contains "http" or "http" contains page.url -%}
38+
<!-- External Link -->
39+
<li><a href="{{ page.url | absolute_url }}">{{ page.title }}<i class="fad fa-external-link-alt"></i></a></li>
40+
{%- else -%}
41+
<!-- Internal Link -->
42+
<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li>
43+
{%- endif -%}
44+
{%- endfor -%}
45+
</ul>
46+
{%- endif -%}
47+
48+
<!-- Dropdown Items -->
49+
{%- if item.subfolderitems[0] -%}
50+
<ul class="dropdown-menu">
51+
{%- for entry in item.subfolderitems -%}
52+
<li><a class="nav-link" href="{{ entry.url }}">{{ entry.page }}</a></li>
53+
{%- endfor -%}
54+
</ul>
55+
</li>
56+
<!-- End of Dropdown Menus -->
57+
{%- endif -%}
58+
59+
<!-- Normal Menu Items-->
60+
{%- else -%}
61+
<!-- Current page -->
62+
{%- if page.title == item.title -%}
63+
<li><a class="is-current-page" href="{{ item.url }}">{{ item.title }}</a></li>
64+
{%- else -%}
65+
<!-- Normal Page -->
66+
<li class="nav-item"><a class="nav-link" href="{{ item.url }}">{{ item.title }}</a></li>
67+
{%- endif -%}
68+
<!-- End normal items -->
69+
{%- endif -%}
70+
<!-- End Nav Loop -->
71+
{%- endfor -%}
72+
</ul>

0 commit comments

Comments
 (0)