docyard 0.1.0 → 0.3.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/CHANGELOG.md +41 -1
  4. data/LICENSE.vscode-icons +42 -0
  5. data/README.md +57 -8
  6. data/lib/docyard/asset_handler.rb +33 -0
  7. data/lib/docyard/components/base_processor.rb +24 -0
  8. data/lib/docyard/components/callout_processor.rb +121 -0
  9. data/lib/docyard/components/code_block_processor.rb +55 -0
  10. data/lib/docyard/components/code_detector.rb +59 -0
  11. data/lib/docyard/components/icon_detector.rb +57 -0
  12. data/lib/docyard/components/icon_processor.rb +51 -0
  13. data/lib/docyard/components/registry.rb +34 -0
  14. data/lib/docyard/components/tabs_parser.rb +60 -0
  15. data/lib/docyard/components/tabs_processor.rb +44 -0
  16. data/lib/docyard/config/validator.rb +171 -0
  17. data/lib/docyard/config.rb +133 -0
  18. data/lib/docyard/constants.rb +28 -0
  19. data/lib/docyard/errors.rb +54 -0
  20. data/lib/docyard/file_watcher.rb +2 -2
  21. data/lib/docyard/icons/LICENSE.phosphor +21 -0
  22. data/lib/docyard/icons/file_types.rb +92 -0
  23. data/lib/docyard/icons/phosphor.rb +63 -0
  24. data/lib/docyard/icons.rb +40 -0
  25. data/lib/docyard/initializer.rb +27 -2
  26. data/lib/docyard/language_mapping.rb +52 -0
  27. data/lib/docyard/logging.rb +43 -0
  28. data/lib/docyard/markdown.rb +14 -3
  29. data/lib/docyard/rack_application.rb +100 -13
  30. data/lib/docyard/renderer.rb +40 -5
  31. data/lib/docyard/router.rb +13 -8
  32. data/lib/docyard/routing/resolution_result.rb +31 -0
  33. data/lib/docyard/server.rb +5 -2
  34. data/lib/docyard/sidebar/file_system_scanner.rb +77 -0
  35. data/lib/docyard/sidebar/renderer.rb +110 -0
  36. data/lib/docyard/sidebar/title_extractor.rb +25 -0
  37. data/lib/docyard/sidebar/tree_builder.rb +59 -0
  38. data/lib/docyard/sidebar_builder.rb +58 -0
  39. data/lib/docyard/templates/assets/css/code.css +362 -0
  40. data/lib/docyard/templates/assets/css/components/callout.css +169 -0
  41. data/lib/docyard/templates/assets/css/components/code-block.css +196 -0
  42. data/lib/docyard/templates/assets/css/components/icon.css +16 -0
  43. data/lib/docyard/templates/assets/css/components/logo.css +44 -0
  44. data/lib/docyard/templates/assets/css/components/navigation.css +258 -0
  45. data/lib/docyard/templates/assets/css/components/tabs.css +298 -0
  46. data/lib/docyard/templates/assets/css/components/theme-toggle.css +61 -0
  47. data/lib/docyard/templates/assets/css/layout.css +283 -0
  48. data/lib/docyard/templates/assets/css/main.css +10 -4
  49. data/lib/docyard/templates/assets/css/markdown.css +200 -0
  50. data/lib/docyard/templates/assets/css/reset.css +63 -0
  51. data/lib/docyard/templates/assets/css/typography.css +97 -0
  52. data/lib/docyard/templates/assets/css/variables.css +205 -0
  53. data/lib/docyard/templates/assets/favicon.svg +16 -0
  54. data/lib/docyard/templates/assets/js/components/code-block.js +162 -0
  55. data/lib/docyard/templates/assets/js/components/tabs.js +338 -0
  56. data/lib/docyard/templates/assets/js/theme.js +209 -1
  57. data/lib/docyard/templates/assets/logo-dark.svg +4 -0
  58. data/lib/docyard/templates/assets/logo.svg +12 -0
  59. data/lib/docyard/templates/config/docyard.yml.erb +20 -0
  60. data/lib/docyard/templates/layouts/default.html.erb +69 -19
  61. data/lib/docyard/templates/markdown/components/callouts.md.erb +204 -0
  62. data/lib/docyard/templates/markdown/components/icons.md.erb +125 -0
  63. data/lib/docyard/templates/markdown/components/tabs.md.erb +686 -0
  64. data/lib/docyard/templates/markdown/configuration.md.erb +202 -0
  65. data/lib/docyard/templates/markdown/core-concepts/file-structure.md.erb +61 -0
  66. data/lib/docyard/templates/markdown/core-concepts/markdown.md.erb +90 -0
  67. data/lib/docyard/templates/markdown/getting-started/installation.md.erb +43 -0
  68. data/lib/docyard/templates/markdown/getting-started/introduction.md.erb +30 -0
  69. data/lib/docyard/templates/markdown/getting-started/quick-start.md.erb +56 -0
  70. data/lib/docyard/templates/markdown/index.md.erb +78 -14
  71. data/lib/docyard/templates/partials/_callout.html.erb +11 -0
  72. data/lib/docyard/templates/partials/_code_block.html.erb +6 -0
  73. data/lib/docyard/templates/partials/_icon.html.erb +1 -0
  74. data/lib/docyard/templates/partials/_icon_file_extension.html.erb +1 -0
  75. data/lib/docyard/templates/partials/_icons.html.erb +11 -0
  76. data/lib/docyard/templates/partials/_nav_group.html.erb +7 -0
  77. data/lib/docyard/templates/partials/_nav_item.html.erb +3 -0
  78. data/lib/docyard/templates/partials/_nav_leaf.html.erb +1 -0
  79. data/lib/docyard/templates/partials/_nav_list.html.erb +3 -0
  80. data/lib/docyard/templates/partials/_nav_section.html.erb +6 -0
  81. data/lib/docyard/templates/partials/_sidebar.html.erb +6 -0
  82. data/lib/docyard/templates/partials/_sidebar_footer.html.erb +11 -0
  83. data/lib/docyard/templates/partials/_tabs.html.erb +40 -0
  84. data/lib/docyard/templates/partials/_theme_toggle.html.erb +13 -0
  85. data/lib/docyard/utils/path_resolver.rb +30 -0
  86. data/lib/docyard/utils/text_formatter.rb +22 -0
  87. data/lib/docyard/version.rb +1 -1
  88. data/lib/docyard.rb +16 -4
  89. metadata +71 -3
  90. data/lib/docyard/templates/assets/css/syntax.css +0 -116
  91. data/lib/docyard/templates/markdown/getting-started.md.erb +0 -40
@@ -0,0 +1,202 @@
1
+ ---
2
+ title: Configuration
3
+ ---
4
+
5
+ # Configuration
6
+
7
+ Docyard uses convention over configuration. You can start using Docyard without any configuration file - it just works!
8
+
9
+ ## Optional Configuration
10
+
11
+ Create a `docyard.yml` file in your project root to customize your documentation site.
12
+
13
+ ```yaml
14
+ site:
15
+ title: "My Documentation"
16
+ description: "Documentation for my project"
17
+
18
+ build:
19
+ output_dir: "dist"
20
+ base_url: "/"
21
+ ```
22
+
23
+ ## Configuration Reference
24
+
25
+ ### Site Settings
26
+
27
+ Configure your site metadata and branding.
28
+
29
+ #### `site.title`
30
+
31
+ The title of your documentation site. Shown in the browser tab and header.
32
+
33
+ - **Type:** String
34
+ - **Default:** `"Documentation"`
35
+
36
+ ```yaml
37
+ site:
38
+ title: "My Project Docs"
39
+ ```
40
+
41
+ #### `site.description`
42
+
43
+ Meta description for SEO and social sharing.
44
+
45
+ - **Type:** String
46
+ - **Default:** `""`
47
+
48
+ ```yaml
49
+ site:
50
+ description: "Complete documentation for My Project"
51
+ ```
52
+
53
+ #### `site.logo`
54
+
55
+ Path to your logo image. Displayed in the site header.
56
+
57
+ - **Type:** String (file path)
58
+ - **Default:** None
59
+ - **Supported formats:** SVG, PNG, JPG
60
+
61
+ ```yaml
62
+ site:
63
+ logo: "docs/assets/logo.svg"
64
+ ```
65
+
66
+ ::: tip
67
+ Use SVG format for your logo for best quality at all screen sizes.
68
+ :::
69
+
70
+ #### `site.logo_dark`
71
+
72
+ Optional dark mode variant of your logo.
73
+
74
+ - **Type:** String (file path)
75
+ - **Default:** None
76
+
77
+ ```yaml
78
+ site:
79
+ logo: "docs/assets/logo.svg"
80
+ logo_dark: "docs/assets/logo-dark.svg"
81
+ ```
82
+
83
+ #### `site.favicon`
84
+
85
+ Path to your favicon.
86
+
87
+ - **Type:** String (file path)
88
+ - **Default:** None
89
+ - **Supported formats:** `.ico`, `.png`
90
+
91
+ ```yaml
92
+ site:
93
+ favicon: "docs/assets/favicon.ico"
94
+ ```
95
+
96
+ ### Build Settings
97
+
98
+ Configure static site generation.
99
+
100
+ #### `build.output_dir`
101
+
102
+ Directory where the built site will be generated.
103
+
104
+ - **Type:** String
105
+ - **Default:** `"dist"`
106
+ - **Note:** Cannot contain slashes
107
+
108
+ ```yaml
109
+ build:
110
+ output_dir: "dist" # or "_site", "public", etc.
111
+ ```
112
+
113
+ #### `build.base_url`
114
+
115
+ Base URL for your site. Important for subdirectory deployments.
116
+
117
+ - **Type:** String
118
+ - **Default:** `"/"`
119
+ - **Note:** Must start with `/`
120
+
121
+ ```yaml
122
+ # For root deployment
123
+ build:
124
+ base_url: "/"
125
+
126
+ # For GitHub Pages project site
127
+ build:
128
+ base_url: "/my-repo/"
129
+ ```
130
+
131
+ ::: important
132
+ Set `base_url` correctly for subdirectory deployments (like GitHub Pages project sites) or your assets won't load correctly.
133
+ :::
134
+
135
+ #### `build.clean`
136
+
137
+ Whether to clean the output directory before building.
138
+
139
+ - **Type:** Boolean
140
+ - **Default:** `true`
141
+
142
+ ```yaml
143
+ build:
144
+ clean: true # Recommended
145
+ ```
146
+
147
+ ## Examples
148
+
149
+ ### Basic Configuration
150
+
151
+ Minimal config with just a custom title:
152
+
153
+ ```yaml
154
+ site:
155
+ title: "Acme Documentation"
156
+ ```
157
+
158
+ ### Full Branding
159
+
160
+ Complete branding with logo and favicon:
161
+
162
+ ```yaml
163
+ site:
164
+ title: "Acme Inc."
165
+ description: "API documentation for Acme services"
166
+ logo: "docs/assets/logo.svg"
167
+ logo_dark: "docs/assets/logo-dark.svg"
168
+ favicon: "docs/assets/favicon.ico"
169
+ ```
170
+
171
+ ### GitHub Pages Deployment
172
+
173
+ Configuration for GitHub Pages subdirectory:
174
+
175
+ ```yaml
176
+ site:
177
+ title: "My Project"
178
+
179
+ build:
180
+ base_url: "/my-repo/"
181
+ ```
182
+
183
+ ### Custom Output Directory
184
+
185
+ Using a different output directory:
186
+
187
+ ```yaml
188
+ build:
189
+ output_dir: "public"
190
+ base_url: "/"
191
+ ```
192
+
193
+ ## No Configuration Required
194
+
195
+ If you don't create a `docyard.yml` file, Docyard will work with sensible defaults:
196
+
197
+ - Site title: `"Documentation"`
198
+ - Output directory: `dist/`
199
+ - Base URL: `/`
200
+ - Clean build: `true`
201
+
202
+ This means you can run `docyard serve` immediately after `docyard init` without any additional configuration!
@@ -0,0 +1,61 @@
1
+ # File Structure
2
+
3
+ Understanding how Docyard organizes your documentation.
4
+
5
+ ## Basic Structure
6
+
7
+ ```bash
8
+ docs/
9
+ ├── index.md # Home page
10
+ ├── getting-started/ # Section folder
11
+ │ ├── introduction.md
12
+ │ └── quick-start.md
13
+ └── guides/ # Another section
14
+ └── tutorial.md
15
+ ```
16
+
17
+ ## Navigation Rules
18
+
19
+ - **Folders become sections** in the sidebar navigation
20
+ - **Files become pages** within those sections
21
+ - Files are sorted alphabetically
22
+ - `index.md` in the root is your home page
23
+
24
+ ## File Naming
25
+
26
+ File names are automatically converted to page titles:
27
+
28
+ - `quick-start.md` → "Quick Start"
29
+ - `api-reference.md` → "Api Reference"
30
+ - `getting_started.md` → "Getting Started"
31
+
32
+ ## Custom Titles
33
+
34
+ Override the auto-generated title using an H1 heading:
35
+
36
+ ```markdown
37
+ # Custom Page Title
38
+
39
+ Your content here...
40
+ ```
41
+
42
+ ## Hidden Files
43
+
44
+ Files and folders starting with `_` or `.` are ignored:
45
+
46
+ - `_draft.md` - Not included
47
+ - `.notes.md` - Not included
48
+ - `published.md` - Included
49
+
50
+ ## Nested Sections
51
+
52
+ You can nest folders to create sub-sections:
53
+
54
+ ```bash
55
+ docs/
56
+ └── api/
57
+ ├── classes/
58
+ │ └── generator.md
59
+ └── modules/
60
+ └── utils.md
61
+ ```
@@ -0,0 +1,90 @@
1
+ # Markdown Support
2
+
3
+ Docyard supports GitHub Flavored Markdown with syntax highlighting.
4
+
5
+ ## Headings
6
+
7
+ ```markdown
8
+ # H1 Heading
9
+ ## H2 Heading
10
+ ### H3 Heading
11
+ ```
12
+
13
+
14
+ ## Text Formatting
15
+
16
+ **Bold text** with `**bold**`
17
+ *Italic text* with `*italic*`
18
+ ~~Strikethrough~~ with `~~strikethrough~~`
19
+
20
+ ## Lists
21
+
22
+ Unordered lists:
23
+
24
+ - Item 1
25
+ - Item 2
26
+ - Nested item
27
+ - Another nested
28
+
29
+ Ordered lists:
30
+
31
+ 1. First step
32
+ 2. Second step
33
+ 3. Third step
34
+
35
+ ## Code
36
+
37
+ Inline code: `const x = 42`
38
+
39
+ Code blocks with syntax highlighting:
40
+
41
+ ```ruby
42
+ class DocumentationGenerator
43
+ def initialize(title)
44
+ @title = title
45
+ end
46
+
47
+ def build
48
+ puts "Building #{@title}..."
49
+ end
50
+ end
51
+ ```
52
+
53
+ ```javascript
54
+ function generateDocs(title) {
55
+ console.log(`Building ${title}...`);
56
+ return { success: true };
57
+ }
58
+ ```
59
+
60
+
61
+ ## Tables
62
+
63
+ | Feature | Status | Priority |
64
+ |---------|--------|----------|
65
+ | Sidebar | Done | High |
66
+ | Search | Planned | Medium |
67
+ | Dark Mode | Planned | High |
68
+
69
+ ## Links
70
+
71
+ [External link](https://github.com)
72
+ [Internal link](file-structure)
73
+ [Link to section](../getting-started/installation)
74
+
75
+ ## Blockquotes
76
+
77
+ > This is a blockquote. Use it to highlight important information or callouts.
78
+
79
+ ## Images
80
+
81
+ ```markdown
82
+ ![Alt text](/path/to/image.png)
83
+ ```
84
+
85
+
86
+ ## Task Lists
87
+
88
+ - [x] Completed task
89
+ - [ ] Incomplete task
90
+ - [ ] Another task
@@ -0,0 +1,43 @@
1
+ # Installation
2
+
3
+ Learn how to install Docyard on your system.
4
+
5
+ ## Prerequisites
6
+
7
+ - Ruby 3.2 or higher
8
+ - Bundler (recommended)
9
+
10
+ ## Install via RubyGems
11
+
12
+ ```bash
13
+ gem install docyard
14
+ ```
15
+
16
+
17
+ ## Install via Bundler
18
+
19
+ Add to your Gemfile:
20
+
21
+ ```ruby
22
+ gem 'docyard'
23
+ ```
24
+
25
+
26
+ Then run:
27
+
28
+ ```bash
29
+ bundle install
30
+ ```
31
+
32
+ ## Verify Installation
33
+
34
+ ```bash
35
+ docyard --version
36
+ ```
37
+
38
+
39
+ You should see the version number printed to your terminal.
40
+
41
+ ## Next Steps
42
+
43
+ Now that Docyard is installed, head over to the [Quick Start Guide](quick-start) to create your first documentation site.
@@ -0,0 +1,30 @@
1
+ # Introduction
2
+
3
+ Welcome to Docyard - a modern, zero-config documentation generator for Ruby developers.
4
+
5
+ ## What is Docyard?
6
+
7
+ Docyard turns your Markdown files into beautiful, searchable documentation sites. Write docs in Markdown, and Docyard handles the rest.
8
+
9
+ ## Key Features
10
+
11
+ - **Auto-generated Navigation** - Sidebar navigation built from your folder structure
12
+ - **Hot Reload** - See changes instantly as you write
13
+ - **GitHub Flavored Markdown** - Full GFM support including tables and task lists
14
+ - **Syntax Highlighting** - 100+ languages powered by Rouge
15
+ - **Zero Configuration** - Works out of the box with sensible defaults
16
+ - **Mobile Responsive** - Looks great on all devices
17
+
18
+ ## Philosophy
19
+
20
+ Docyard follows these principles:
21
+
22
+ 1. **Simple by default** - No configuration needed to get started
23
+ 2. **Markdown-first** - Focus on writing, not tooling
24
+ 3. **Beautiful out of the box** - Production-ready styling included
25
+ 4. **Developer friendly** - Built by developers, for developers
26
+
27
+ ## Next Steps
28
+
29
+ - [Install Docyard](installation) to get started
30
+ - Check out the [Quick Start Guide](quick-start) for a 5-minute tutorial
@@ -0,0 +1,56 @@
1
+ # Quick Start
2
+
3
+ Get up and running with Docyard in under 5 minutes.
4
+
5
+ ## 1. Install Docyard
6
+
7
+ ```bash
8
+ gem install docyard
9
+ ```
10
+
11
+ ## 2. Initialize Your Project
12
+
13
+ Create a new documentation project:
14
+
15
+ ```bash
16
+ docyard init
17
+ ```
18
+
19
+
20
+ This creates a `docs/` folder with sample documentation files.
21
+
22
+ ## 3. Start the Dev Server
23
+
24
+ ```bash
25
+ docyard serve
26
+ ```
27
+
28
+
29
+ Your documentation will be available at `http://localhost:4200`.
30
+
31
+ ## 4. Edit Your Docs
32
+
33
+ Open `docs/index.md` and make some changes. The browser will automatically reload to show your changes.
34
+
35
+ ## 5. Organize Your Content
36
+
37
+ Create folders to organize your documentation:
38
+
39
+ ```bash
40
+ docs/
41
+ ├── index.md
42
+ ├── getting-started/
43
+ │ ├── introduction.md
44
+ │ └── installation.md
45
+ └── guides/
46
+ ├── basic-usage.md
47
+ └── advanced-features.md
48
+ ```
49
+
50
+
51
+ The sidebar navigation will automatically reflect your folder structure.
52
+
53
+ ## What's Next?
54
+
55
+ - Learn about [File Structure](../core-concepts/file-structure) conventions
56
+ - Explore [Markdown](../core-concepts/markdown) syntax and features
@@ -1,22 +1,86 @@
1
- ---
2
- title: Home
3
- description: Welcome to your documentation site
4
- ---
1
+ # Welcome to Docyard
5
2
 
6
- # Welcome to Docyard!
3
+ A modern, zero-config documentation generator for Ruby developers.
7
4
 
8
- This is your documentation homepage. Edit this file to customize it.
5
+ ## Features
9
6
 
10
- ## What is Docyard?
11
-
12
- Docyard is a beautiful, zero-config documentation generator built with Ruby.
7
+ - **Auto-generated Navigation** - Sidebar built from your folder structure
8
+ - **Hot Reload** - Changes appear instantly while you write
9
+ - **GitHub Flavored Markdown** - Full GFM support with tables and task lists
10
+ - **Syntax Highlighting** - 100+ languages powered by Rouge
11
+ - **Zero Configuration** - Works out of the box with sensible defaults
12
+ - **Mobile Responsive** - Beautiful on desktop, tablet, and mobile
13
13
 
14
14
  ## Quick Start
15
15
 
16
- 1. Edit the markdown files in `docs/`
17
- 2. Run `docyard serve` to preview your site
18
- 3. Run `docyard build` to generate static HTML
16
+ Get up and running in under a minute:
17
+
18
+ ```bash
19
+ # Install
20
+ gem install docyard
21
+
22
+ # Initialize
23
+ docyard init
24
+
25
+ # Start dev server
26
+ docyard serve
27
+ ```
28
+
29
+ Visit `http://localhost:4200` to see your docs.
30
+
31
+
32
+ ## Example Code
33
+
34
+ Ruby with syntax highlighting:
35
+
36
+ ```ruby
37
+ class DocumentationSite
38
+ attr_reader :title, :pages
39
+
40
+ def initialize(title)
41
+ @title = title
42
+ @pages = []
43
+ end
44
+
45
+ def add_page(path, content)
46
+ pages << { path: path, content: content }
47
+ end
48
+
49
+ def build
50
+ pages.each { |page| render_page(page) }
51
+ end
52
+ end
53
+ ```
54
+
55
+
56
+ JavaScript example:
57
+
58
+ ```javascript
59
+ function buildDocs(config) {
60
+ const { title, theme } = config;
61
+ console.log(`Building ${title} with ${theme} theme`);
62
+ return { success: true };
63
+ }
64
+ ```
65
+
66
+ ## Documentation Structure
67
+
68
+ | Section | Description |
69
+ |---------|-------------|
70
+ | Getting Started | Installation and quick start guide |
71
+ | Core Concepts | Learn about file structure and markdown |
72
+
73
+ ## What's Next?
74
+
75
+ > Get started by exploring the documentation in the sidebar, or jump straight to the [Quick Start Guide](getting-started/quick-start).
76
+
77
+ ### Learn the Basics
78
+
79
+ 1. [Introduction](getting-started/introduction) - Learn what Docyard can do
80
+ 2. [Installation](getting-started/installation) - Install Docyard on your system
81
+ 3. [Quick Start](getting-started/quick-start) - Create your first site
19
82
 
20
- ## Learn More
83
+ ### Understand Core Concepts
21
84
 
22
- Check out the [Getting Started](getting-started.md) guide.
85
+ - [File Structure](core-concepts/file-structure) - How to organize your docs
86
+ - [Markdown](core-concepts/markdown) - Supported markdown features
@@ -0,0 +1,11 @@
1
+ <div class="docyard-callout docyard-callout--<%= @type %>" role="<%= %w[danger warning].include?(@type) ? 'alert' : 'note' %>">
2
+ <div class="docyard-callout__icon" aria-hidden="true">
3
+ <%= @icon_svg %>
4
+ </div>
5
+ <div class="docyard-callout__content">
6
+ <div class="docyard-callout__title"><%= @title %></div>
7
+ <div class="docyard-callout__body">
8
+ <%= @content_html %>
9
+ </div>
10
+ </div>
11
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="docyard-code-block">
2
+ <%= @code_block_html %>
3
+ <button class="docyard-code-block__copy" aria-label="Copy code to clipboard" data-code="<%= @code_text %>">
4
+ <%= @copy_icon %>
5
+ </button>
6
+ </div>
@@ -0,0 +1 @@
1
+ <span class="docyard-icon docyard-icon-<%= @name %>" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><%= @icon_data %></svg></span>
@@ -0,0 +1 @@
1
+ <span class="docyard-icon docyard-icon-file-<%= @extension %>" aria-hidden="true"><%= @svg_content %></span>
@@ -0,0 +1,11 @@
1
+ <%# External link icon %>
2
+ <% if @icon_name == :external %>
3
+ <svg class="external-icon" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 256 256">
4
+ <path d="M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z" />
5
+ </svg>
6
+ <%# Chevron icon %>
7
+ <% elsif @icon_name == :chevron %>
8
+ <svg class="nav-group-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor">
9
+ <path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"/>
10
+ </svg>
11
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <button class="nav-group-toggle" aria-expanded="true" type="button">
2
+ <span><%= @title %></span>
3
+ <%= icon(:chevron) %>
4
+ </button>
5
+ <div class="nav-group-children">
6
+ <%= @children_html %>
7
+ </div>
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= @item_content %>
3
+ </li>
@@ -0,0 +1 @@
1
+ <a href="<%= @path %>"<%= ' class="active"' if @active %>><%= @title %></a>
@@ -0,0 +1,3 @@
1
+ <ul>
2
+ <%= @list_items %>
3
+ </ul>
@@ -0,0 +1,6 @@
1
+ <div class="nav-section">
2
+ <% if @section_name %>
3
+ <div class="nav-section-title"><%= @section_name %></div>
4
+ <% end %>
5
+ <%= @section_content %>
6
+ </div>
@@ -0,0 +1,6 @@
1
+ <aside class="sidebar" role="navigation" aria-label="Documentation navigation">
2
+ <nav>
3
+ <%= @nav_content %>
4
+ </nav>
5
+ <%= @footer_html %>
6
+ </aside>
@@ -0,0 +1,11 @@
1
+ <div class="sidebar-footer">
2
+ <a href="https://github.com/sanifhimani/docyard"
3
+ target="_blank"
4
+ rel="noopener noreferrer"
5
+ class="sidebar-footer-link">
6
+ <div class="sidebar-footer-text">
7
+ <p class="sidebar-footer-title">Built with Docyard</p>
8
+ </div>
9
+ <%= icon(:external) %>
10
+ </a>
11
+ </div>