jekyll-theme-zer0 0.21.2 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -0
  3. data/README.md +86 -46
  4. data/_data/authors.yml +12 -3
  5. data/_data/features.yml +1 -1
  6. data/_data/glossary.yml +101 -0
  7. data/_data/navigation/docs.yml +12 -0
  8. data/_data/navigation/home.yml +2 -2
  9. data/_data/navigation/main.yml +2 -8
  10. data/_data/prompts.yml +184 -0
  11. data/_includes/components/author-eeat.html +133 -0
  12. data/_includes/components/cookie-consent.html +9 -9
  13. data/_includes/components/dev-shortcuts.html +36 -27
  14. data/_includes/components/env-detect.html +14 -0
  15. data/_includes/components/env-switcher.html +38 -16
  16. data/_includes/components/halfmoon.html +31 -20
  17. data/_includes/components/info-section.html +4 -3
  18. data/_includes/components/js-cdn.html +8 -15
  19. data/_includes/components/mermaid.html +13 -9
  20. data/_includes/components/powered-by.html +5 -3
  21. data/_includes/content/intro.html +64 -4
  22. data/_includes/content/jsonld-faq.html +47 -0
  23. data/_includes/content/jsonld-software.html +121 -0
  24. data/_includes/content/sitemap.html +2 -2
  25. data/_includes/core/branding.html +9 -7
  26. data/_includes/core/footer.html +12 -9
  27. data/_includes/core/head.html +17 -14
  28. data/_includes/core/header.html +33 -21
  29. data/_includes/navigation/navbar.html +130 -124
  30. data/_includes/navigation/sidebar-left.html +3 -3
  31. data/_includes/navigation/sidebar-right.html +4 -8
  32. data/_includes/search-data.json +1 -2
  33. data/_layouts/landing.html +8 -3
  34. data/_layouts/root.html +4 -4
  35. data/_layouts/sitemap-collection.html +20 -10
  36. data/_sass/core/_docs-layout.scss +756 -0
  37. data/_sass/core/_navbar.scss +522 -69
  38. data/_sass/core/_offcanvas-panels.scss +48 -0
  39. data/_sass/core/_syntax.scss +1 -51
  40. data/_sass/core/_theme.scss +2 -249
  41. data/_sass/core/_variables.scss +1 -54
  42. data/_sass/core/code-copy.scss +6 -6
  43. data/_sass/custom.scss +119 -133
  44. data/_sass/theme/_color-modes.scss +3 -0
  45. data/_sass/theme/_css-variables.scss +29 -0
  46. data/_sass/theme/_wizard-mode.scss +31 -0
  47. data/assets/css/custom.css +5 -120
  48. data/assets/css/main.scss +6 -2
  49. data/assets/css/stats.css +3 -0
  50. data/assets/css/theme-npm-entry.scss +6 -0
  51. data/assets/css/vendor/.gitkeep +0 -0
  52. data/assets/images/authors/bamr87.png +0 -0
  53. data/assets/js/auto-hide-nav.js +71 -20
  54. data/assets/js/color-modes.js +8 -2
  55. data/assets/js/halfmoon.js +8 -2
  56. data/assets/js/myScript.js +4 -12
  57. data/assets/js/navigation.js +174 -19
  58. data/assets/js/search-modal.js +50 -7
  59. data/assets/vendor/bootstrap/css/bootstrap.min.css +5 -0
  60. data/assets/vendor/bootstrap/js/bootstrap.bundle.min.js +6 -0
  61. data/assets/vendor/bootstrap-icons/font/bootstrap-icons.css +2018 -0
  62. data/assets/vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff +0 -0
  63. data/assets/vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff2 +0 -0
  64. data/assets/vendor/font-awesome/css/all.min.css +9 -0
  65. data/assets/vendor/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  66. data/assets/vendor/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
  67. data/assets/vendor/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  68. data/assets/vendor/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
  69. data/assets/vendor/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  70. data/assets/vendor/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
  71. data/assets/vendor/font-awesome/webfonts/fa-v4compatibility.ttf +0 -0
  72. data/assets/vendor/font-awesome/webfonts/fa-v4compatibility.woff2 +0 -0
  73. data/assets/vendor/github-calendar/github-calendar-responsive.css +231 -0
  74. data/assets/vendor/github-calendar/github-calendar.min.js +240 -0
  75. data/assets/vendor/jquery/jquery-3.7.1.min.js +2 -0
  76. data/assets/vendor/mathjax/es5/adaptors/liteDOM.js +1 -0
  77. data/assets/vendor/mathjax/es5/core.js +1 -0
  78. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
  79. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
  80. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
  81. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
  82. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
  83. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
  84. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
  85. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
  86. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
  87. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
  88. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
  89. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
  90. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
  91. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
  92. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
  93. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
  94. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
  95. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
  96. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
  97. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
  98. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
  99. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
  100. data/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
  101. data/assets/vendor/mathjax/es5/startup.js +1 -0
  102. data/assets/vendor/mathjax/es5/tex-mml-chtml.js +1 -0
  103. data/assets/vendor/mermaid/mermaid.min.js +2029 -0
  104. data/scripts/bin/build +12 -2
  105. data/scripts/lib/version.sh +41 -0
  106. data/scripts/test/integration/mermaid +1 -1
  107. data/scripts/vendor-install.sh +196 -0
  108. metadata +62 -3
  109. data/_sass/core/_docs.scss +0 -3219
data/_data/prompts.yml ADDED
@@ -0,0 +1,184 @@
1
+ # _data/prompts.yml
2
+ # Prompt templates for the Copilot Agent issue button in the intro section.
3
+ # Each entry maps to a .github/prompts/*.prompt.md file.
4
+ # The body is included in the GitHub issue when that prompt is selected.
5
+
6
+ - id: article-review
7
+ label: "Article Review"
8
+ icon: "bi-file-text"
9
+ description: "Review article structure, metadata, and SEO"
10
+ body: |
11
+ Act as an Expert Content Editor and SEO Specialist.
12
+
13
+ Review this article, validate its structure/metadata, and suggest content expansions to improve depth and engagement.
14
+
15
+ **Review Checklist:**
16
+ - Front Matter: `title`, `description`, `categories`, `tags`, `date`, `layout` present and valid
17
+ - Content depth: flag sections that are too brief or superficial
18
+ - Clarity: identify jargon needing explanation
19
+ - Structure: verify logical flow with proper H2/H3 headings
20
+ - SEO: keyword placement in title, H1, and first paragraph
21
+ - Tone: professional, authoritative, yet accessible
22
+
23
+ **Deliverables:**
24
+ - Front Matter pass/fail report with specific fixes
25
+ - Bullet-point content issues
26
+ - Suggested expanded sections (provide actual text)
27
+
28
+ - id: code-implementation
29
+ label: "Code Implementation"
30
+ icon: "bi-code-slash"
31
+ description: "Implement a feature with production-ready code"
32
+ body: |
33
+ Act as a Senior Software Engineer with expertise in clean code practices, design patterns, and production-ready development.
34
+
35
+ Implement the requested feature, module, or system component for this page/file.
36
+
37
+ **Requirements:**
38
+ - Follow existing code conventions and style
39
+ - Include error handling and edge cases
40
+ - Add inline documentation and comments
41
+ - Write unit tests if applicable
42
+ - Consider performance and security implications
43
+
44
+ **Deliverables:**
45
+ - Complete, working implementation
46
+ - Explanation of design decisions
47
+ - Test cases
48
+ - Usage examples
49
+
50
+ - id: code-refactoring
51
+ label: "Code Refactoring"
52
+ icon: "bi-arrow-repeat"
53
+ description: "Refactor code for quality, readability, and performance"
54
+ body: |
55
+ Act as a Code Quality Expert and Refactoring Specialist.
56
+
57
+ Refactor the code in this file to improve quality, maintainability, and performance while preserving exact external behavior.
58
+
59
+ **Refactoring Goals:**
60
+ - Apply SOLID principles and clean code practices
61
+ - Eliminate duplication (DRY)
62
+ - Improve naming clarity
63
+ - Reduce complexity and nesting
64
+ - Optimize performance bottlenecks
65
+
66
+ **Deliverables:**
67
+ - Refactored code with before/after comparison
68
+ - Explanation of each change and its rationale
69
+ - Any breaking changes or migration notes
70
+
71
+ - id: debugging
72
+ label: "Debugging"
73
+ icon: "bi-bug"
74
+ description: "Diagnose and fix issues in the code"
75
+ body: |
76
+ Act as a Senior Debugging Specialist and Software Troubleshooting Expert.
77
+
78
+ Analyze the provided code, error messages, and symptoms to identify the root cause and propose a targeted fix.
79
+
80
+ **Please provide in your response:**
81
+ - Root cause analysis (WHY it fails, not just WHAT)
82
+ - Targeted fix with code changes
83
+ - Verification steps to confirm the fix
84
+ - Preventive measures to avoid recurrence
85
+
86
+ **Steps to reproduce:** <!-- fill in below -->
87
+
88
+ **Expected behavior:** <!-- fill in below -->
89
+
90
+ **Actual behavior / error message:** <!-- fill in below -->
91
+
92
+ - id: documentation
93
+ label: "Documentation"
94
+ icon: "bi-journal-text"
95
+ description: "Generate or improve technical documentation"
96
+ body: |
97
+ Act as a Technical Writer and Documentation Specialist.
98
+
99
+ Create or improve the documentation for the code, API, or content in this file.
100
+
101
+ **Documentation Scope:**
102
+ - Purpose and overview
103
+ - Installation / setup instructions
104
+ - Usage examples with code snippets
105
+ - API reference (parameters, return values, errors)
106
+ - Troubleshooting / FAQ section
107
+
108
+ **Standards:**
109
+ - Clear, concise language
110
+ - Consistent formatting (Markdown)
111
+ - Working code examples
112
+ - Proper heading hierarchy
113
+
114
+ - id: requirements-analysis
115
+ label: "Requirements Analysis"
116
+ icon: "bi-list-check"
117
+ description: "Convert ideas into structured technical requirements"
118
+ body: |
119
+ Act as an expert Business Analyst and Technical Lead.
120
+
121
+ Analyze the content of this page and convert it into a comprehensive, structured technical requirements document.
122
+
123
+ **Output Structure:**
124
+ - Executive Summary
125
+ - Functional Requirements (user stories + acceptance criteria)
126
+ - Non-Functional Requirements (performance, security, scalability)
127
+ - Technical Constraints and Assumptions
128
+ - Out of Scope items
129
+ - Open Questions
130
+
131
+ - id: system-design
132
+ label: "System Design"
133
+ icon: "bi-diagram-3"
134
+ description: "Design a scalable system architecture"
135
+ body: |
136
+ Act as a Senior Software Architect.
137
+
138
+ Design a comprehensive system architecture based on the requirements or content described in this page.
139
+
140
+ **Design Deliverables:**
141
+ - High-level architecture diagram (described in text/Mermaid)
142
+ - Component breakdown and responsibilities
143
+ - Data models and API contracts
144
+ - Security and authentication strategy
145
+ - Scalability and reliability considerations
146
+ - Technology stack recommendations with rationale
147
+
148
+ - id: test-generation
149
+ label: "Test Generation"
150
+ icon: "bi-check2-square"
151
+ description: "Generate comprehensive tests for code"
152
+ body: |
153
+ Act as a QA Automation Engineer and Test Architect.
154
+
155
+ Generate a comprehensive test suite for the code or functionality described in this file.
156
+
157
+ **Test Coverage:**
158
+ - Unit tests for core logic
159
+ - Integration tests for component interactions
160
+ - Edge cases and error conditions
161
+ - Performance benchmarks (if applicable)
162
+
163
+ **Standards:**
164
+ - Follow existing test framework conventions
165
+ - Clear test descriptions
166
+ - Arrange-Act-Assert pattern
167
+ - Mocks/stubs for external dependencies
168
+
169
+ - id: prompt-engineering
170
+ label: "Prompt Engineering"
171
+ icon: "bi-lightning"
172
+ description: "Craft an effective AI prompt for this task"
173
+ body: |
174
+ Act as an expert Prompt Engineer specializing in software development and AI-assisted workflows.
175
+
176
+ Craft a high-quality, effective prompt that will guide an AI agent to work on the content or task described in this page.
177
+
178
+ **Prompt Requirements:**
179
+ - Clear role definition (Act as...)
180
+ - Specific task instructions
181
+ - Input/output format specification
182
+ - Constraints and edge cases
183
+ - Example inputs and expected outputs
184
+ - Quality criteria for evaluation
@@ -0,0 +1,133 @@
1
+ <!--
2
+ ===================================================================
3
+ AUTHOR E-E-A-T BLOCK - Experience, Expertise, Authority, Trust
4
+ ===================================================================
5
+
6
+ File: author-eeat.html
7
+ Path: _includes/components/author-eeat.html
8
+ Purpose: Displays a visible author credibility block for AIEO
9
+ (AI Engine Optimization) and E-E-A-T signals.
10
+
11
+ Parameters:
12
+ - author_key (optional): Key from _data/authors.yml (default: "bamr87")
13
+ - style (optional): "banner" | "card" (default: "banner")
14
+
15
+ Usage:
16
+ include components/author-eeat.html
17
+ include components/author-eeat.html author_key="bamr87" style="card"
18
+
19
+ Dependencies:
20
+ - _data/authors.yml: Author data
21
+ - Bootstrap 5 utility classes
22
+ ===================================================================
23
+ -->
24
+
25
+ {% assign author_key = include.author_key | default: "bamr87" %}
26
+ {% assign author = site.data.authors[author_key] %}
27
+ {% assign eeat_style = include.style | default: "banner" %}
28
+
29
+ {% if author %}
30
+
31
+ {% if eeat_style == "banner" %}
32
+ <!-- E-E-A-T Author Banner -->
33
+ <div class="bg-body-secondary border-top border-bottom py-4 mt-5" itemscope itemtype="https://schema.org/Person">
34
+ <div class="container-xl px-4 px-md-5">
35
+ <div class="row align-items-center g-3">
36
+ <div class="col-auto">
37
+ {% if author.avatar %}
38
+ <img src="{{ site.baseurl }}/{{ site.public_folder }}{{ author.avatar }}"
39
+ alt="{{ author.display_name | default: author.name }}"
40
+ class="rounded-circle border border-2 border-primary"
41
+ width="64" height="64"
42
+ style="object-fit: cover;"
43
+ itemprop="image">
44
+ {% else %}
45
+ <div class="rounded-circle bg-primary text-white d-flex align-items-center justify-content-center"
46
+ style="width: 64px; height: 64px;">
47
+ <i class="bi bi-person fs-3"></i>
48
+ </div>
49
+ {% endif %}
50
+ </div>
51
+ <div class="col">
52
+ <p class="mb-1 fw-semibold" itemprop="name">
53
+ Built by <strong>{{ author.display_name | default: author.name }}</strong>
54
+ {% if author.role %}<span class="text-body-secondary"> — {{ author.role }}</span>{% endif %}
55
+ </p>
56
+ <p class="mb-0 text-body-secondary small" itemprop="description">
57
+ {{ author.bio }}
58
+ </p>
59
+ <div class="mt-2 d-flex gap-2 flex-wrap">
60
+ {% if author.github %}
61
+ <a href="https://github.com/{{ author.github }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="sameAs">
62
+ <i class="bi bi-github me-1"></i>GitHub
63
+ </a>
64
+ {% endif %}
65
+ {% if author.twitter %}
66
+ <a href="https://twitter.com/{{ author.twitter }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="sameAs">
67
+ <i class="bi bi-twitter me-1"></i>Twitter
68
+ </a>
69
+ {% endif %}
70
+ {% if author.linkedin %}
71
+ <a href="https://linkedin.com/in/{{ author.linkedin }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="sameAs">
72
+ <i class="bi bi-linkedin me-1"></i>LinkedIn
73
+ </a>
74
+ {% endif %}
75
+ {% if author.website %}
76
+ <a href="{{ author.website }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="url">
77
+ <i class="bi bi-globe me-1"></i>Website
78
+ </a>
79
+ {% endif %}
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+
86
+ {% elsif eeat_style == "card" %}
87
+ <!-- E-E-A-T Author Card -->
88
+ <div class="card border-0 shadow-sm" itemscope itemtype="https://schema.org/Person">
89
+ <div class="card-body p-4">
90
+ <div class="d-flex align-items-start">
91
+ {% if author.avatar %}
92
+ <img src="{{ site.baseurl }}/{{ site.public_folder }}{{ author.avatar }}"
93
+ alt="{{ author.display_name | default: author.name }}"
94
+ class="rounded-circle me-3 border border-2 border-primary"
95
+ width="72" height="72"
96
+ style="object-fit: cover;"
97
+ itemprop="image">
98
+ {% else %}
99
+ <div class="rounded-circle bg-primary text-white d-flex align-items-center justify-content-center me-3"
100
+ style="width: 72px; height: 72px;">
101
+ <i class="bi bi-person fs-2"></i>
102
+ </div>
103
+ {% endif %}
104
+ <div class="flex-grow-1">
105
+ <h5 class="card-title mb-1" itemprop="name">{{ author.display_name | default: author.name }}</h5>
106
+ {% if author.role %}
107
+ <p class="text-primary mb-2 small" itemprop="jobTitle">{{ author.role }}</p>
108
+ {% endif %}
109
+ <p class="card-text text-body-secondary small mb-2" itemprop="description">{{ author.bio }}</p>
110
+ <div class="d-flex gap-2 flex-wrap">
111
+ {% if author.github %}
112
+ <a href="https://github.com/{{ author.github }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="sameAs">
113
+ <i class="bi bi-github"></i>
114
+ </a>
115
+ {% endif %}
116
+ {% if author.twitter %}
117
+ <a href="https://twitter.com/{{ author.twitter }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="sameAs">
118
+ <i class="bi bi-twitter"></i>
119
+ </a>
120
+ {% endif %}
121
+ {% if author.linkedin %}
122
+ <a href="https://linkedin.com/in/{{ author.linkedin }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" itemprop="sameAs">
123
+ <i class="bi bi-linkedin"></i>
124
+ </a>
125
+ {% endif %}
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ {% endif %}
132
+
133
+ {% endif %}
@@ -49,17 +49,17 @@ Usage: Include in root.html layout
49
49
  Configuration: Uses site.posthog settings from _config.yml
50
50
  {% endcomment %}
51
51
 
52
- <div id="cookieConsent" class="cookie-consent-banner position-fixed bottom-0 start-0 end-0 bg-dark text-light p-3 shadow-lg">
53
- <div class="container-fluid">
54
- <div class="row align-items-center">
52
+ <div id="cookieConsent" class="cookie-consent-banner position-fixed bottom-0 start-0 end-0 bg-dark text-light py-3 px-3 shadow-lg">
53
+ <div class="container-xl px-3 px-md-4">
54
+ <div class="row align-items-center g-2">
55
55
  <div class="col-12 col-lg-8">
56
- <h6 class="mb-2 mb-lg-0">
57
- <i class="bi bi-shield-check me-2"></i>
56
+ <p class="h6 fw-semibold mb-2 mb-lg-0">
57
+ <i class="bi bi-shield-check me-2" aria-hidden="true"></i>
58
58
  We value your privacy
59
- </h6>
60
- <p class="mb-2 mb-lg-0 small">
61
- This website uses cookies and similar technologies to enhance your browsing experience, analyze traffic, and provide personalized content.
62
- <a href="/privacy-policy/" class="text-light text-decoration-underline">Learn more in our Privacy Policy</a>.
59
+ </p>
60
+ <p class="mb-2 mb-lg-0 small text-white-50">
61
+ This website uses cookies and similar technologies to enhance your browsing experience, analyze traffic, and provide personalized content.
62
+ <a href="{{ '/privacy-policy/' | relative_url }}" class="text-white text-decoration-underline">Learn more in our Privacy Policy</a>.
63
63
  </p>
64
64
  </div>
65
65
  <div class="col-12 col-lg-4">
@@ -8,31 +8,36 @@
8
8
  Purpose: Provide quick access to source code editing in various IDEs
9
9
 
10
10
  Dependencies:
11
- - site.repository, site.branch, site.collections_dir
11
+ - site.repository, site.branch, site.collections_dir, site.local_git, site.repository_name
12
12
  - page.collection, page.path
13
+ - is_production (from env-detect.html in info-section.html) — vscode:// link only when not production
13
14
  ===================================================================
14
15
  -->
15
16
 
16
- {% comment %} Determine page directory for collections {% endcomment %}
17
+ {% comment %} Determine page directory for collections (same segments as GitHub blob links) {% endcomment %}
17
18
  {% if page.collection %}
18
19
  {% capture page_dir %}{{ site.collections_dir }}{% endcapture %}
19
20
  {% else %}
20
21
  {% assign page_dir = "" %}
21
22
  {% endif %}
22
23
 
24
+ {% assign rel_site_path = page.path %}
25
+ {% if page_dir != "" %}
26
+ {% assign rel_site_path = page_dir | append: "/" | append: page.path %}
27
+ {% endif %}
28
+
29
+ {% assign git_home = site.local_git | join: "" %}
30
+ {% assign vscode_full_path = git_home | append: "/" | append: site.repository_name | append: "/" | append: rel_site_path %}
31
+ {% assign vscode_full_path = vscode_full_path | replace: "//", "/" | replace: "//", "/" %}
32
+
23
33
  <div class="dev-shortcuts">
24
34
  <div class="d-flex flex-column gap-2">
25
-
26
- <!-- Section Label -->
27
- <small class="text-body-secondary fw-medium text-uppercase">
28
- <i class="bi bi-code-slash me-1"></i>Source Code
29
- </small>
30
-
31
- <!-- Button Group -->
35
+
36
+ <!-- Button Group (section title is the parent h6 in info-section.html) -->
32
37
  <div class="btn-group-vertical" role="group" aria-label="Source code shortcuts">
33
-
38
+
34
39
  <!-- View on GitHub -->
35
- <a href="https://github.com/{{ site.repository }}/blob/{{ site.branch }}/{{ page_dir }}/{{ page.path }}"
40
+ <a href="https://github.com/{{ site.repository }}/blob/{{ site.branch }}/{{ rel_site_path }}"
36
41
  target="_blank"
37
42
  rel="noopener"
38
43
  class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
@@ -45,9 +50,9 @@
45
50
  </span>
46
51
  <i class="bi bi-box-arrow-up-right text-body-secondary small"></i>
47
52
  </a>
48
-
53
+
49
54
  <!-- Edit in GitHub.dev -->
50
- <a href="https://github.dev/{{ site.repository }}/blob/{{ site.branch }}/{{ page_dir }}/{{ page.path }}"
55
+ <a href="https://github.dev/{{ site.repository }}/blob/{{ site.branch }}/{{ rel_site_path }}"
51
56
  target="_blank"
52
57
  rel="noopener"
53
58
  class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
@@ -60,31 +65,35 @@
60
65
  </span>
61
66
  <i class="bi bi-box-arrow-up-right text-body-secondary small"></i>
62
67
  </a>
63
-
64
- <!-- Open in Local VS Code -->
65
- <a href="vscode://file{{ site.local_git }}/{{ site.repository_name }}/{{ page_dir }}/{{ page.path }}"
66
- class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
67
- data-bs-toggle="tooltip"
68
- data-bs-placement="left"
69
- title="Open in local VS Code (requires local clone)">
68
+
69
+ {% comment %}Local vscode:// only when not deployed production, and local_git is configured{% endcomment %}
70
+ {% unless is_production %}
71
+ {% if git_home != "" %}
72
+ <a href="vscode://file{{ vscode_full_path }}"
73
+ class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
74
+ data-bs-toggle="tooltip"
75
+ data-bs-placement="left"
76
+ title="Open in local VS Code (requires local clone at this path)">
70
77
  <span>
71
78
  <i class="bi bi-code-square me-2"></i>
72
79
  Open in VS Code
73
80
  </span>
74
81
  <i class="bi bi-window text-body-secondary small"></i>
75
82
  </a>
76
-
83
+ {% endif %}
84
+ {% endunless %}
85
+
77
86
  </div>
78
-
87
+
79
88
  <!-- Config Links -->
80
89
  <small class="text-body-secondary fw-medium text-uppercase mt-2">
81
90
  <i class="bi bi-sliders me-1"></i>Configuration
82
91
  </small>
83
-
92
+
84
93
  <div class="btn-group-vertical" role="group" aria-label="Configuration shortcuts">
85
-
94
+
86
95
  <!-- Site Config -->
87
- <a href="https://github.com/{{ site.repository }}/blob/{{ site.branch }}/_config.yml"
96
+ <a href="https://github.com/{{ site.repository }}/blob/{{ site.branch }}/_config.yml"
88
97
  target="_blank"
89
98
  rel="noopener"
90
99
  class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
@@ -97,8 +106,8 @@
97
106
  </span>
98
107
  <code class="small ms-2">_config.yml</code>
99
108
  </a>
100
-
109
+
101
110
  </div>
102
-
111
+
103
112
  </div>
104
113
  </div>
@@ -0,0 +1,14 @@
1
+ {% comment %}
2
+ Sets: build_env, is_local_url, is_production
3
+ Production badge only when Jekyll built as production AND site.url is not a local host.
4
+ {% endcomment %}
5
+ {% assign build_env = jekyll.environment | default: "development" %}
6
+ {% assign site_url_lc = site.url | default: "" | downcase %}
7
+ {% assign is_local_url = false %}
8
+ {% if site_url_lc contains "localhost" or site_url_lc contains "127.0.0.1" or site_url_lc contains "0.0.0.0" %}
9
+ {% assign is_local_url = true %}
10
+ {% endif %}
11
+ {% assign is_production = false %}
12
+ {% if build_env == "production" and is_local_url == false %}
13
+ {% assign is_production = true %}
14
+ {% endif %}
@@ -8,23 +8,36 @@
8
8
  Purpose: Display current environment and provide URL switching
9
9
 
10
10
  Dependencies:
11
- - jekyll.environment: Current build environment
12
- - site.url: Production URL
11
+ - jekyll.environment: Build-time Jekyll env (production | development)
12
+ - site.domain_url: Canonical production origin (YAML array joined in Liquid); not overridden by jekyll serve
13
+ - site.url: Overwritten during jekyll serve — do not use alone for “Prod” quick links
13
14
  - site.port: Development port (default 4000)
14
15
  - Bootstrap 5 components
16
+
17
+ Note: Docker / JEKYLL_ENV=production on localhost would show "Production"
18
+ while you are clearly on a dev machine. We treat localhost / 127.0.0.1 / 0.0.0.0
19
+ in site.url as development context for the badge and card styling.
15
20
  ===================================================================
16
21
  -->
17
22
 
18
- {% assign current_env = jekyll.environment | default: "development" %}
19
- {% assign is_production = current_env == "production" %}
20
- {% assign prod_url = site.url | append: site.baseurl %}
21
- {% assign dev_url = "http://localhost:" | append: site.port | default: 4000 | append: site.baseurl %}
23
+ {% comment %}is_production / build_env / is_local_url: set by env-detect.html in info-section.html{% endcomment %}
24
+ {% assign dev_port = site.port | default: 4000 %}
25
+ {% comment %}Prod links must not use site.url during serve (Jekyll sets it to 0.0.0.0:4000 etc.){% endcomment %}
26
+ {% if site.domain_url %}
27
+ {% assign canonical_prod_origin = site.domain_url | join: "" %}
28
+ {% elsif site.production_url %}
29
+ {% assign canonical_prod_origin = site.production_url %}
30
+ {% else %}
31
+ {% assign canonical_prod_origin = site.url %}
32
+ {% endif %}
33
+ {% assign prod_url = canonical_prod_origin | append: site.baseurl %}
34
+ {% assign dev_url = "http://localhost:" | append: dev_port | append: site.baseurl %}
22
35
 
23
36
  <!-- Environment Status Card -->
24
- <div class="card border-{{ is_production | if: 'success', 'warning' }} mb-3">
25
- <div class="card-header d-flex align-items-center justify-content-between py-2 bg-{{ is_production | if: 'success', 'warning' }} bg-opacity-10">
37
+ <div class="card mb-3 {% if is_production %}border-success{% else %}border-warning{% endif %}">
38
+ <div class="card-header d-flex align-items-center justify-content-between py-2 {% if is_production %}bg-success{% else %}bg-warning{% endif %} bg-opacity-10">
26
39
  <span class="fw-semibold">
27
- <i class="bi bi-{{ is_production | if: 'cloud-check', 'pc-display' }} me-2"></i>
40
+ <i class="bi {% if is_production %}bi-cloud-check{% else %}bi-pc-display{% endif %} me-2"></i>
28
41
  Current Environment
29
42
  </span>
30
43
  {% if is_production %}
@@ -33,7 +46,7 @@
33
46
  </span>
34
47
  {% else %}
35
48
  <span class="badge bg-warning text-dark">
36
- <i class="bi bi-code-slash me-1"></i>Development
49
+ <i class="bi bi-code-slash me-1"></i>Dev
37
50
  </span>
38
51
  {% endif %}
39
52
  </div>
@@ -45,11 +58,11 @@
45
58
  </label>
46
59
  <div class="input-group input-group-sm">
47
60
  <span class="input-group-text">
48
- <i class="bi bi-{{ is_production | if: 'lock', 'unlock' }}"></i>
61
+ <i class="bi {% if is_production %}bi-lock{% else %}bi-unlock{% endif %}"></i>
49
62
  </span>
50
63
  <input type="text"
51
64
  class="form-control font-monospace"
52
- value="{{ is_production | if: prod_url, dev_url }}{{ page.url }}"
65
+ value="{% if is_production %}{{ prod_url }}{% else %}{{ dev_url }}{% endif %}{{ page.url }}"
53
66
  readonly
54
67
  id="currentUrlInput">
55
68
  <button class="btn btn-outline-secondary"
@@ -75,6 +88,15 @@
75
88
  <strong class="small">v{{ jekyll.version }}</strong>
76
89
  </div>
77
90
  </div>
91
+ <div class="col-12">
92
+ <div class="p-2 bg-body-tertiary rounded text-start">
93
+ <small class="text-body-secondary d-block">Build env (JEKYLL_ENV)</small>
94
+ <strong class="small font-monospace text-body">{{ build_env }}</strong>
95
+ {% if is_local_url and build_env == "production" %}
96
+ <div class="small text-body-secondary mt-1">Serving on a local URL — UI shows <strong>Dev</strong> above.</div>
97
+ {% endif %}
98
+ </div>
99
+ </div>
78
100
  </div>
79
101
  </div>
80
102
  </div>
@@ -97,7 +119,7 @@
97
119
  class="text-decoration-none font-monospace small text-truncate"
98
120
  style="max-width: 180px;"
99
121
  title="{{ prod_url }}{{ page.url }}">
100
- {{ site.url | remove: "https://" | remove: "http://" | truncate: 25 }}{{ page.url | truncate: 15 }}
122
+ {{ canonical_prod_origin | remove: "https://" | remove: "http://" | truncate: 25 }}{{ page.url | truncate: 15 }}
101
123
  </a>
102
124
  </div>
103
125
  <div class="btn-group btn-group-sm">
@@ -127,7 +149,7 @@
127
149
  class="text-decoration-none font-monospace small text-truncate"
128
150
  style="max-width: 180px;"
129
151
  title="{{ dev_url }}{{ page.url }}">
130
- localhost:{{ site.port | default: 4000 }}{{ page.url | truncate: 15 }}
152
+ localhost:{{ dev_port }}{{ page.url | truncate: 15 }}
131
153
  </a>
132
154
  </div>
133
155
  <div class="btn-group btn-group-sm">
@@ -169,12 +191,12 @@
169
191
  </div>
170
192
 
171
193
  <!-- Environment Tip -->
172
- <div class="alert alert-{{ is_production | if: 'success', 'warning' }} alert-dismissible fade show mt-3 py-2 small" role="alert">
194
+ <div class="alert {% if is_production %}alert-success{% else %}alert-warning{% endif %} alert-dismissible fade show mt-3 py-2 small" role="alert">
173
195
  <i class="bi bi-info-circle me-1"></i>
174
196
  {% if is_production %}
175
197
  Viewing <strong>production</strong> build. Changes require deployment.
176
198
  {% else %}
177
- <strong>Development</strong> mode. Changes auto-reload on save.
199
+ <strong>Dev</strong> context{% if is_local_url and build_env == "production" %} (local URL; JEKYLL_ENV is production){% endif %}. Changes auto-reload when using <code>jekyll serve</code>.
178
200
  {% endif %}
179
201
  <button type="button" class="btn-close btn-close-sm" data-bs-dismiss="alert" aria-label="Close" style="padding: 0.5rem;"></button>
180
202
  </div>