hot_docs 0.0.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.
- checksums.yaml +7 -0
- data/.rubocop.yml +8 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +12 -0
- data/lib/hot_docs/version.rb +5 -0
- data/lib/hot_docs.rb +8 -0
- data/sig/hot_docs.rbs +4 -0
- data/website/.dockerignore +51 -0
- data/website/.gitattributes +9 -0
- data/website/.github/dependabot.yml +12 -0
- data/website/.github/images/hot_docs.svg +17 -0
- data/website/.github/workflows/ci.yml +90 -0
- data/website/.gitignore +37 -0
- data/website/.kamal/hooks/docker-setup.sample +3 -0
- data/website/.kamal/hooks/post-deploy.sample +14 -0
- data/website/.kamal/hooks/post-proxy-reboot.sample +3 -0
- data/website/.kamal/hooks/pre-build.sample +51 -0
- data/website/.kamal/hooks/pre-connect.sample +47 -0
- data/website/.kamal/hooks/pre-deploy.sample +109 -0
- data/website/.kamal/hooks/pre-proxy-reboot.sample +3 -0
- data/website/.kamal/secrets +17 -0
- data/website/.rubocop.yml +8 -0
- data/website/.ruby-version +1 -0
- data/website/Dockerfile +72 -0
- data/website/Gemfile +65 -0
- data/website/Gemfile.lock +394 -0
- data/website/LICENSE.txt +21 -0
- data/website/README.md +49 -0
- data/website/Rakefile +6 -0
- data/website/app/assets/images/.keep +0 -0
- data/website/app/assets/images/hot_docs_components_desktop.png +0 -0
- data/website/app/assets/images/hot_docs_components_mobile.png +0 -0
- data/website/app/assets/stylesheets/hot_docs.css +999 -0
- data/website/app/assets/stylesheets/website.css +245 -0
- data/website/app/controllers/application_controller.rb +4 -0
- data/website/app/controllers/concerns/.keep +0 -0
- data/website/app/controllers/hot_docs_controller.rb +3 -0
- data/website/app/helpers/application_helper.rb +25 -0
- data/website/app/helpers/hot_docs_helper.rb +99 -0
- data/website/app/javascript/application.js +3 -0
- data/website/app/javascript/controllers/accordion_controller.js +36 -0
- data/website/app/javascript/controllers/application.js +9 -0
- data/website/app/javascript/controllers/index.js +4 -0
- data/website/app/javascript/controllers/sidenav_controller.js +39 -0
- data/website/app/javascript/controllers/toc_controller.js +91 -0
- data/website/app/javascript/controllers/typewriter_controller.js +59 -0
- data/website/app/jobs/application_job.rb +7 -0
- data/website/app/mailers/application_mailer.rb +4 -0
- data/website/app/models/application_record.rb +3 -0
- data/website/app/models/concerns/.keep +0 -0
- data/website/app/views/hot_docs/_menu_row.html.erb +11 -0
- data/website/app/views/hot_docs/components.html.mderb +32 -0
- data/website/app/views/hot_docs/embedded.html.mderb +12 -0
- data/website/app/views/hot_docs/footer.html.mderb +13 -0
- data/website/app/views/hot_docs/helpers.html.mderb +33 -0
- data/website/app/views/hot_docs/index.html.erb +143 -0
- data/website/app/views/hot_docs/light_dark.html.mderb +29 -0
- data/website/app/views/hot_docs/markdown.html.mderb +27 -0
- data/website/app/views/hot_docs/nav.html.mderb +15 -0
- data/website/app/views/hot_docs/quickstart.html.mderb +11 -0
- data/website/app/views/hot_docs/search.html.mderb +7 -0
- data/website/app/views/hot_docs/standalone.html.mderb +11 -0
- data/website/app/views/hot_docs/static_export.html.mderb +7 -0
- data/website/app/views/hot_docs/toc.html.mderb +11 -0
- data/website/app/views/layouts/hot_docs.html.erb +175 -0
- data/website/app/views/layouts/mailer.html.erb +13 -0
- data/website/app/views/layouts/mailer.text.erb +1 -0
- data/website/app/views/layouts/website.html.erb +175 -0
- data/website/app/views/pwa/manifest.json.erb +22 -0
- data/website/app/views/pwa/service-worker.js +26 -0
- data/website/bin/brakeman +7 -0
- data/website/bin/bundle +109 -0
- data/website/bin/dev +2 -0
- data/website/bin/docker-entrypoint +14 -0
- data/website/bin/embed_hot_docs +33 -0
- data/website/bin/importmap +4 -0
- data/website/bin/jobs +6 -0
- data/website/bin/kamal +27 -0
- data/website/bin/rails +4 -0
- data/website/bin/rake +4 -0
- data/website/bin/rubocop +8 -0
- data/website/bin/setup +34 -0
- data/website/bin/thrust +5 -0
- data/website/config/application.rb +27 -0
- data/website/config/boot.rb +4 -0
- data/website/config/cable.yml +17 -0
- data/website/config/cache.yml +16 -0
- data/website/config/credentials.yml.enc +1 -0
- data/website/config/database.yml +41 -0
- data/website/config/deploy.yml +116 -0
- data/website/config/environment.rb +5 -0
- data/website/config/environments/development.rb +72 -0
- data/website/config/environments/production.rb +90 -0
- data/website/config/environments/test.rb +53 -0
- data/website/config/importmap.rb +7 -0
- data/website/config/initializers/assets.rb +7 -0
- data/website/config/initializers/content_security_policy.rb +25 -0
- data/website/config/initializers/filter_parameter_logging.rb +8 -0
- data/website/config/initializers/inflections.rb +16 -0
- data/website/config/initializers/markdown.mjs +26 -0
- data/website/config/initializers/markdown.rb +35 -0
- data/website/config/locales/en.yml +31 -0
- data/website/config/puma.rb +41 -0
- data/website/config/queue.yml +18 -0
- data/website/config/recurring.yml +10 -0
- data/website/config/routes.rb +28 -0
- data/website/config/storage.yml +34 -0
- data/website/config.ru +6 -0
- data/website/db/cable_schema.rb +11 -0
- data/website/db/cache_schema.rb +14 -0
- data/website/db/queue_schema.rb +129 -0
- data/website/db/seeds.rb +9 -0
- data/website/lib/tasks/.keep +0 -0
- data/website/log/.keep +0 -0
- data/website/public/400.html +114 -0
- data/website/public/404.html +114 -0
- data/website/public/406-unsupported-browser.html +114 -0
- data/website/public/422.html +114 -0
- data/website/public/500.html +114 -0
- data/website/public/apple-touch-icon.png +0 -0
- data/website/public/favicon.ico +0 -0
- data/website/public/hot_docs.svg +17 -0
- data/website/public/robots.txt +1 -0
- data/website/script/.keep +0 -0
- data/website/storage/.keep +0 -0
- data/website/test/application_system_test_case.rb +5 -0
- data/website/test/controllers/.keep +0 -0
- data/website/test/fixtures/files/.keep +0 -0
- data/website/test/helpers/.keep +0 -0
- data/website/test/helpers/hot_docs_helper_test.rb +94 -0
- data/website/test/integration/.keep +0 -0
- data/website/test/mailers/.keep +0 -0
- data/website/test/models/.keep +0 -0
- data/website/test/system/.keep +0 -0
- data/website/test/test_helper.rb +15 -0
- data/website/tmp/.keep +0 -0
- data/website/tmp/pids/.keep +0 -0
- data/website/tmp/storage/.keep +0 -0
- data/website/vendor/.keep +0 -0
- data/website/vendor/javascript/.keep +0 -0
- metadata +183 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Components") %>
|
2
|
+
|
3
|
+
# HotDocs: Components
|
4
|
+
|
5
|
+
HotDocs is responsive. Feel free to resize this website to see it in action.
|
6
|
+
|
7
|
+
The following screenshots show how components are laid out on different breakpoints:
|
8
|
+
|
9
|
+
## Desktop
|
10
|
+
|
11
|
+
<div class="screenshot screenshot--desktop">
|
12
|
+
<%= image_tag asset_path("hot_docs_components_desktop.png"), loading: "lazy", size: "600x385", alt: "Screenshot of this website on desktop: top = nav, left = menu, right = table of contents, bottom = footer.", class: "screenshot__image", usemap: "#imagemap-desktop" %>
|
13
|
+
|
14
|
+
<map class="imagemap" name="imagemap-desktop">
|
15
|
+
<area shape="rect" coords="0,0,600,25" href="<%= nav_path %>" alt="Link to Nav component">
|
16
|
+
<area shape="rect" coords="0,25,130,200" href="<%= nav_path %>" alt="Link to Menu component">
|
17
|
+
<area shape="rect" coords="480,25,600,200" href="<%= toc_path %>" alt="Link to Table of contents component">
|
18
|
+
<area shape="rect" coords="0,200,600,380" href="<%= footer_path %>" alt="Link to Footer component">
|
19
|
+
</map>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
## Mobile
|
23
|
+
|
24
|
+
<div class="screenshot screenshot--mobile">
|
25
|
+
<%= image_tag asset_path("hot_docs_components_mobile.png"), loading: "lazy", size: "400x1120", alt: "Screenshot of this website on mobile: top = nav, top-left = sidenav, center-top = table of contents, bottom = footer.", class: "screenshot__image", usemap: "#imagemap-mobile" %>
|
26
|
+
|
27
|
+
<map class="imagemap" name="imagemap-mobile">
|
28
|
+
<area shape="rect" coords="0,0,400,50" href="<%= nav_path %>" alt="Link to Nav component">
|
29
|
+
<area shape="rect" coords="0,60,400,100" href="<%= toc_path %>" alt="Link to Table of contents component">
|
30
|
+
<area shape="rect" coords="0,530,400,1120" href="<%= footer_path %>" alt="Link to Footer component">
|
31
|
+
</map>
|
32
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Embedded") %>
|
2
|
+
|
3
|
+
# HotDocs: Embedded
|
4
|
+
|
5
|
+
Follow these steps to embed HotDocs in an already existing Rails application:
|
6
|
+
|
7
|
+
```
|
8
|
+
curl https://raw.githubusercontent.com/3v0k4/hot-docs/refs/heads/main/bin/embed_hot_docs -o embed_hot_docs
|
9
|
+
bash embed_hot_docs
|
10
|
+
```
|
11
|
+
|
12
|
+
To customize your docs, take a look at <%= link_to "Components", components_path %>.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Footer") %>
|
2
|
+
|
3
|
+
# HotDocs: Footer
|
4
|
+
|
5
|
+
You can support HotDocs by either:
|
6
|
+
|
7
|
+
- Keeping the "Built with Rails & HotDocs" credits
|
8
|
+
- Paying for a license
|
9
|
+
|
10
|
+
## Implementation
|
11
|
+
|
12
|
+
- Html: <%= link_to raw("<code>layouts/hot_docs.html.erb</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/views/layouts/hot_docs.html.erb" %>
|
13
|
+
- Css: `.footer` in <%= link_to raw("<code>hot_docs.css</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/assets/stylesheets/hot_docs.css" %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Helpers") %>
|
2
|
+
|
3
|
+
# HotDocs: Helpers
|
4
|
+
|
5
|
+
HotDocs comes with helpers.
|
6
|
+
|
7
|
+
## `active_link_to`
|
8
|
+
|
9
|
+
Produces a `<a class="active">` if the link points to the current page.
|
10
|
+
|
11
|
+
**Code**
|
12
|
+
|
13
|
+
```erb
|
14
|
+
<%%= active_link_to "Self", root_path %>
|
15
|
+
```
|
16
|
+
|
17
|
+
**Result**
|
18
|
+
|
19
|
+
<%= active_link_to "Self", root_path %>
|
20
|
+
|
21
|
+
## `external_link_to`
|
22
|
+
|
23
|
+
Produces a `<a>` with the external link icon.
|
24
|
+
|
25
|
+
**Code**
|
26
|
+
|
27
|
+
```erb
|
28
|
+
<%%= external_link_to "Example", "example.com" %>
|
29
|
+
```
|
30
|
+
|
31
|
+
**Result**
|
32
|
+
|
33
|
+
<%= external_link_to "Example", "example.com" %>
|
@@ -0,0 +1,143 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Welcome") %>
|
2
|
+
|
3
|
+
<p class="supertitle">Stop the JavaScript madness:</p>
|
4
|
+
|
5
|
+
<h1 class="title">Write your docs with Ruby on Rails</h1>
|
6
|
+
|
7
|
+
<div class="subtitle" data-controller="typewriter" data-typewriter-phrases-value='[ "Power of Rails", "Finesse of Hotwire", "Speed of Jekyll", "Awe of Docusaurus" ]'>
|
8
|
+
<p class="subtitle__fixed">Unleash the</p>
|
9
|
+
<p class="subtitle__typewriter" data-typewriter-target="typewrite">Power of Rails</p>
|
10
|
+
<p class="subtitle__fixed">with HotDocs</p>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%= image_tag "/hot_docs.svg", class: "logo", alt: "A humanized and happy hot dog", size: "160x160" %>
|
14
|
+
|
15
|
+
<div class="actions">
|
16
|
+
<div class="actions__buttons">
|
17
|
+
<%= link_to standalone_path, class: "actions__button" do %>
|
18
|
+
<span>Start from scratch</span>
|
19
|
+
<span class="actions__footnote">(starter-kit)</span>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<%= link_to embedded_path, class: "actions__button" do %>
|
23
|
+
<span>Embed in Rails app</span>
|
24
|
+
<span class="actions__footnote">(components)</span>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<p class="actions__footnote">..or read the <%= link_to "Quickstart", quickstart_path %></p>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
|
32
|
+
<div class="benefits">
|
33
|
+
<h2>HotDocs is a set of optimized Rails components & tools for writing docs</h2>
|
34
|
+
|
35
|
+
<div class="benefits__cards">
|
36
|
+
<div class="benefits__card">
|
37
|
+
<p class="benefits__card-title">It's just Rails</p>
|
38
|
+
|
39
|
+
<p>Do you need the database? Or want to reuse code? What about Hotwire? Yes, yes, and yes! As a Rails dev, you'll feel at home.</p>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="benefits__card">
|
43
|
+
<p class="benefits__card-title">Focus on the docs</p>
|
44
|
+
|
45
|
+
<p>HotDocs covers all your bases, you only need to author the content. Markdown support (and plugins) included.</p>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class="benefits__card">
|
49
|
+
<p class="benefits__card-title">Static export 🔜</p>
|
50
|
+
|
51
|
+
<p>Export Html and Css for speed while allowing islands of dynamic Js that can interact with your backend.</p>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<div class="comparison">
|
57
|
+
<h2>Comparison with Jekyll & Docusaurus</h2>
|
58
|
+
|
59
|
+
<div class="comparison__table-wrapper">
|
60
|
+
<table class="comparison__table">
|
61
|
+
<tr>
|
62
|
+
<th></th>
|
63
|
+
<th class="comparison__who">HotDocs</th>
|
64
|
+
<th class="comparison__who">Jekyll</th>
|
65
|
+
<th class="comparison__who">Docusaurus</th>
|
66
|
+
</tr>
|
67
|
+
|
68
|
+
<tr>
|
69
|
+
<td class="comparison__what">Ruby on Rails <span class="comparison__note">(database, Hotwire, etc.)</span></td>
|
70
|
+
<td class="comparison__how">✅</td>
|
71
|
+
<td class="comparison__how">❌</td>
|
72
|
+
<td class="comparison__how">❌</td>
|
73
|
+
</tr>
|
74
|
+
|
75
|
+
<tr>
|
76
|
+
<td class="comparison__what"><%= link_to "Embed docs in an existing Rails app", embedded_path %></td>
|
77
|
+
<td class="comparison__how">✅</td>
|
78
|
+
<td class="comparison__how">❌</td>
|
79
|
+
<td class="comparison__how">❌</td>
|
80
|
+
</tr>
|
81
|
+
|
82
|
+
<tr>
|
83
|
+
<td class="comparison__what"><%= link_to "Standalone docs", standalone_path %></td>
|
84
|
+
<td class="comparison__how">✅</td>
|
85
|
+
<td class="comparison__how">✅</td>
|
86
|
+
<td class="comparison__how">✅</td>
|
87
|
+
</tr>
|
88
|
+
|
89
|
+
<tr>
|
90
|
+
<td class="comparison__what"><%= link_to "Styled components you can customize", components_path %></td>
|
91
|
+
<td class="comparison__how">✅</td>
|
92
|
+
<td class="comparison__how">✅</td>
|
93
|
+
<td class="comparison__how">✅</td>
|
94
|
+
</tr>
|
95
|
+
|
96
|
+
<tr>
|
97
|
+
<td class="comparison__what"><%= link_to "Markdown", markdown_path %></td>
|
98
|
+
<td class="comparison__how">🚀</td>
|
99
|
+
<td class="comparison__how">👍</td>
|
100
|
+
<td class="comparison__how">🚀</td>
|
101
|
+
</tr>
|
102
|
+
|
103
|
+
<tr>
|
104
|
+
<td class="comparison__what"><%= link_to "Static export", static_export_path %></td>
|
105
|
+
<td class="comparison__how">🔜 🚀</td>
|
106
|
+
<td class="comparison__how">👍</td>
|
107
|
+
<td class="comparison__how">🚀</td>
|
108
|
+
</tr>
|
109
|
+
|
110
|
+
<tr>
|
111
|
+
<td class="comparison__what"><%= link_to "Search", search_path %></td>
|
112
|
+
<td class="comparison__how">🔜 ✅</td>
|
113
|
+
<td class="comparison__how">🔌</td>
|
114
|
+
<td class="comparison__how">🔌</td>
|
115
|
+
</tr>
|
116
|
+
|
117
|
+
<tr>
|
118
|
+
<td class="comparison__what"><%= link_to "Light / Dark", light_dark_path %></td>
|
119
|
+
<td class="comparison__how">🔜 ✅</td>
|
120
|
+
<td class="comparison__how">🔌</td>
|
121
|
+
<td class="comparison__how">✅</td>
|
122
|
+
</tr>
|
123
|
+
|
124
|
+
<tr>
|
125
|
+
<td class="comparison__what"><%= external_link_to "Open source", "https://github.com/3v0k4/hot_docs" %></td>
|
126
|
+
<td class="comparison__how">✅</td>
|
127
|
+
<td class="comparison__how">✅</td>
|
128
|
+
<td class="comparison__how">✅</td>
|
129
|
+
</tr>
|
130
|
+
|
131
|
+
<tr>
|
132
|
+
<td class="comparison__what">Free <span class="comparison__note">(if you keep the "Built with HotDocs" in the footer)</span></td>
|
133
|
+
<td class="comparison__how">✅</td>
|
134
|
+
<td class="comparison__how">✅</td>
|
135
|
+
<td class="comparison__how">✅</td>
|
136
|
+
</tr>
|
137
|
+
|
138
|
+
<tr>
|
139
|
+
<td colspan="4">Anything missing? Suggestions? <%= external_link_to "Contribute", "https://github.com/3v0k4/hot_docs" %></td>
|
140
|
+
</tr>
|
141
|
+
</table>
|
142
|
+
</div>
|
143
|
+
</div>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Light / Dark") %>
|
2
|
+
|
3
|
+
# HotDocs: Light / Dark 🔜
|
4
|
+
|
5
|
+
Light / Dark is not yet available.
|
6
|
+
|
7
|
+
You can chime in on <%= external_link_to "this GitHub discussion", "https://github.com/3v0k4/hot_docs/discussions/9" %> to let us know you want it or to share wishes and feedback.
|
8
|
+
|
9
|
+
<hr />
|
10
|
+
|
11
|
+
The Light / Dark theme is implemented with Css variables and a data attribute on `<html>`:
|
12
|
+
- `<html data-theme="light">`
|
13
|
+
- `<html data-theme="dark">`
|
14
|
+
|
15
|
+
## Implementation
|
16
|
+
|
17
|
+
Each component in <%= link_to raw("<code>hot_docs.css</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/assets/stylesheets/hot_docs.css" %> comes with variables for both themes.
|
18
|
+
|
19
|
+
For example, the `.footer` styles start with:
|
20
|
+
|
21
|
+
```
|
22
|
+
:root {
|
23
|
+
--footer-background-color: #e9e9e9;
|
24
|
+
}
|
25
|
+
|
26
|
+
[data-theme=dark]:root {
|
27
|
+
--footer-background-color: #444444;
|
28
|
+
}
|
29
|
+
```
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Markdown") %>
|
2
|
+
|
3
|
+
# HotDocs: Markdown
|
4
|
+
|
5
|
+
**Warning:** The runtime needs <%= external_link_to raw("<code>deno</code>"), "https://deno.com/" %> to compile markdown files.
|
6
|
+
|
7
|
+
Markdown support is currently under development. You can chime in on <%= external_link_to "this GitHub discussion", "https://github.com/3v0k4/hot_docs/discussions/7" %> to share wishes and feedback.
|
8
|
+
|
9
|
+
HotDocs supports templates ending in `.mderb`: you can mix markdown and erb in the same template.
|
10
|
+
|
11
|
+
Behind the curtains, `.mderb` templates are compiled first as `.erb` and second as `.md` with <%= external_link_to "unifiedjs", "https://unifiedjs.com/" %>. This gives you access to a truckload of <%= external_link_to "plugins", "https://unifiedjs.com/explore/package/" %> that you can configure in <%= external_link_to "`config/initializers/markdown.mjs`", "https://github.com/3v0k4/hot_docs/blob/main/config/initializers/markdown.mjs" %>.
|
12
|
+
|
13
|
+
For example, if you want all the external links in your `.mderb`s to open in a new tab, just throw in [rehype-external-links](https://github.com/rehypejs/rehype-external-links)!
|
14
|
+
|
15
|
+
## Adding `deno` to Heroku
|
16
|
+
|
17
|
+
You can check if deno is already installed in your Heroku app with:
|
18
|
+
|
19
|
+
```bash
|
20
|
+
heroku buildpacks
|
21
|
+
```
|
22
|
+
|
23
|
+
If deno is not yet installed, you can do so with:
|
24
|
+
|
25
|
+
```
|
26
|
+
heroku buildpacks:add --index 1 https://github.com/chibat/heroku-buildpack-deno.git
|
27
|
+
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Nav / Sidenav") %>
|
2
|
+
|
3
|
+
# HotDocs: Nav / Sidenav
|
4
|
+
|
5
|
+
The Nav (top) and Sidenav (hamburger on mobile) contents are declared in <%= link_to raw("<code>hot_docs_helper</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/helpers/hot_docs_helper.rb" %>:
|
6
|
+
- `nav_left_items`: left part of the nav on desktop and sidenav on mobile
|
7
|
+
- `nav_right_items`: right part of the nav on desktop and sidenav on mobile
|
8
|
+
- `menu_items`: sidenav on mobile
|
9
|
+
|
10
|
+
## Implementation
|
11
|
+
|
12
|
+
- Html: <%= link_to raw("<code>layouts/hot_docs.html.erb</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/views/layouts/hot_docs.html.erb" %>
|
13
|
+
- Css: `.nav` and `.sidenav` in <%= link_to raw("<code>hot_docs.css</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/assets/stylesheets/hot_docs.css" %>
|
14
|
+
- JavaScript: <%= link_to raw("<code>sidenav_controller.js</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/javascript/controllers/sidenav_controller.js" %>
|
15
|
+
- Ruby: <%= link_to raw("<code>hot_docs_helper.rb</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/helpers/hot_docs_helper.rb" %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Quickstart") %>
|
2
|
+
|
3
|
+
# HotDocs: Quickstart
|
4
|
+
|
5
|
+
There are 2 ways to get started with HotDocs:
|
6
|
+
- <%= link_to "Embed HotDocs in an already existing Rails application", embedded_path %>
|
7
|
+
- <%= link_to "Create a new Rails application for your docs", standalone_path %>
|
8
|
+
|
9
|
+
If you are in doubt, embed if you already have an app, otherwise create a new one.
|
10
|
+
|
11
|
+
Switching from one to the other is easy, so keep it simple!
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Search") %>
|
2
|
+
|
3
|
+
# HotDocs: Search 🔜
|
4
|
+
|
5
|
+
Search is not yet available.
|
6
|
+
|
7
|
+
You can chime in on <%= external_link_to "this GitHub discussion", "https://github.com/3v0k4/hot_docs/discussions/8" %> to let us know you want it or to share wishes and feedback.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Standalone") %>
|
2
|
+
|
3
|
+
# HotDocs: Standalone
|
4
|
+
|
5
|
+
Clone the repository that powers this website as a starting point:
|
6
|
+
|
7
|
+
```
|
8
|
+
git clone https://github.com/3v0k4/hot-docs
|
9
|
+
```
|
10
|
+
|
11
|
+
To customize your docs, take a look at <%= link_to "Components", components_path %>.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Static export") %>
|
2
|
+
|
3
|
+
# HotDocs: Static export 🔜
|
4
|
+
|
5
|
+
Static export is not yet available.
|
6
|
+
|
7
|
+
You can chime in on <%= external_link_to "this GitHub discussion", "https://github.com/3v0k4/hot_docs/discussions/10" %> to let us know you want it or to share wishes and feedback.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= content_for(:title, "HotDocs: Table of contents") %>
|
2
|
+
|
3
|
+
# HotDocs: Table of contents
|
4
|
+
|
5
|
+
The table of contents is autogenerated from the headings in your view.
|
6
|
+
|
7
|
+
## Implementation
|
8
|
+
|
9
|
+
- Html: <%= link_to raw("<code>layouts/hot_docs.html.erb</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/views/layouts/hot_docs.html.erb" %>
|
10
|
+
- Css: `.toc` in <%= link_to raw("<code>hot_docs.css</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/assets/stylesheets/hot_docs.css" %>
|
11
|
+
- JavaScript: <%= link_to raw("<code>toc_controller.js</code>"), "https://github.com/3v0k4/hot_docs/blob/main/app/javascript/controllers/toc_controller.js" %>
|
@@ -0,0 +1,175 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html data-theme="light">
|
3
|
+
<head>
|
4
|
+
<title><%= content_for(:title) || "HotDocs" %></title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
7
|
+
<meta name="mobile-web-app-capable" content="yes">
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
<%= csp_meta_tag %>
|
10
|
+
|
11
|
+
<%= yield :head %>
|
12
|
+
|
13
|
+
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
|
14
|
+
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
|
15
|
+
|
16
|
+
<!-- favicons generated with the favicon_factory gem -->
|
17
|
+
<link rel="icon" href="/hot_docs.svg" type="image/svg+xml">
|
18
|
+
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
19
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
20
|
+
|
21
|
+
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
22
|
+
<%= stylesheet_link_tag :hot_docs, "data-turbo-track": "reload" %>
|
23
|
+
<%= javascript_importmap_tags %>
|
24
|
+
</head>
|
25
|
+
|
26
|
+
<body>
|
27
|
+
<nav class="nav" data-controller="sidenav" data-sidenav-open-class-value="sidenav--open" data-sidenav-main-section-class-value="sidenav__sections--main">
|
28
|
+
<div class="nav__section">
|
29
|
+
<button class="nav__toggle" type="button" aria-label="Toggle navigation" aria-expanded="false" data-action="click->sidenav#open">
|
30
|
+
<svg viewBox="0 0 30 30" aria-hidden="true">
|
31
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path>
|
32
|
+
</svg>
|
33
|
+
</button>
|
34
|
+
|
35
|
+
<%= link_to root_path, class: "nav__brand" do %>
|
36
|
+
<div class="nav__logo-wrapper">
|
37
|
+
<img class="nav__logo" src="/hot_docs.svg" alt="A humanized and happy hot dog" height="32" width="32" />
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<span class="nav__title">HotDocs</span>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<div class="nav__links">
|
44
|
+
<% nav_left_items("nav__link").each do |item| %>
|
45
|
+
<%= item %>
|
46
|
+
<% end %>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div class="nav__section">
|
51
|
+
<div class="nav__links">
|
52
|
+
<% nav_right_items("nav__link").each do |item| %>
|
53
|
+
<%= item %>
|
54
|
+
<% end %>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="sidenav-backdrop"></div>
|
59
|
+
<div class="sidenav">
|
60
|
+
<div class="sidenav__header">
|
61
|
+
<%= link_to root_path, class: "nav__brand" do %>
|
62
|
+
<div class="nav__logo-wrapper">
|
63
|
+
<img class="nav__logo" src="/hot_docs.svg" alt="A humanized and happy hot dog" height="32" width="32" />
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<span class="nav__title">HotDocs</span>
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<button aria-label="Close navigation" class="sidenav__toggle" type="button" data-action="click->sidenav#close">
|
70
|
+
<svg viewBox="0 0 15 15">
|
71
|
+
<g stroke="currentColor" stroke-width="1.2">
|
72
|
+
<path d="M.75.75l13.5 13.5M14.25.75L.75 14.25"></path>
|
73
|
+
</g>
|
74
|
+
</svg>
|
75
|
+
</button>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div class="sidenav__sections" data-sidenav-target="sections">
|
79
|
+
<div class="sidenav__section">
|
80
|
+
<ul class="menu__section">
|
81
|
+
<% (nav_left_items("menu__link") + nav_right_items("menu__link")).each do |item| %>
|
82
|
+
<li>
|
83
|
+
<div class="menu__row">
|
84
|
+
<%= item %>
|
85
|
+
</div>
|
86
|
+
</li>
|
87
|
+
<% end %>
|
88
|
+
</ul>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div class="sidenav__section">
|
92
|
+
<div class="menu__section">
|
93
|
+
<button type="button" class="sidenav__back-button" data-action="click->sidenav#back">← Back to main menu</button>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<%= menu %>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
</nav>
|
101
|
+
|
102
|
+
<div class="content">
|
103
|
+
<aside class="menu">
|
104
|
+
<div class="menu__sections">
|
105
|
+
<%= menu %>
|
106
|
+
</div>
|
107
|
+
</aside>
|
108
|
+
|
109
|
+
<main data-controller="toc" class="main">
|
110
|
+
<div class="central">
|
111
|
+
<details name="toc" class="toc">
|
112
|
+
<summary class="toc__label">Table of contents</summary>
|
113
|
+
|
114
|
+
<ul class="toc__entries" data-toc-target="toc">
|
115
|
+
<template data-toc-target="tocTemplate">
|
116
|
+
<li><a id class="toc__link" href></a></li>
|
117
|
+
</template>
|
118
|
+
</ul>
|
119
|
+
</details>
|
120
|
+
|
121
|
+
<article class="article" data-toc-target="article">
|
122
|
+
<%= yield %>
|
123
|
+
</article>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div class="sidetoc">
|
127
|
+
<ul class="sidetoc__entries" data-toc-target="sidetoc">
|
128
|
+
<template data-toc-target="sidetocTemplate">
|
129
|
+
<li><a id class="sidetoc__link" href></a></li>
|
130
|
+
</template>
|
131
|
+
</ul>
|
132
|
+
</div>
|
133
|
+
</main>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<footer class="footer">
|
137
|
+
<div class="footer__sections">
|
138
|
+
<div class="footer__section">
|
139
|
+
<p class="footer__heading">Contribute</p>
|
140
|
+
|
141
|
+
<ul>
|
142
|
+
<li><%= external_link_to "Source Code", "https://github.com/3v0k4/hot_docs", class: "footer__link" %></li>
|
143
|
+
</ul>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div class="footer__section">
|
147
|
+
<p class="footer__heading">Community</p>
|
148
|
+
|
149
|
+
<ul>
|
150
|
+
<li><%= external_link_to "GitHub Discussions", "https://github.com/3v0k4/hot_docs/discussions", class: "footer__link" %></li>
|
151
|
+
</ul>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="footer__section">
|
155
|
+
<p class="footer__heading">(il)Legal</p>
|
156
|
+
|
157
|
+
<ul>
|
158
|
+
<li>Nothing to see here.</li>
|
159
|
+
</ul>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div class="footer__section">
|
163
|
+
<p class="footer__heading">HotDocs</p>
|
164
|
+
|
165
|
+
<p>Write your docs with Ruby on Rails.</p>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<img class="footer__logo" src="/hot_docs.svg" alt="A humanized and happy hot dog" height="150" width="150" />
|
170
|
+
|
171
|
+
<!-- Buy a license to remove the credits -->
|
172
|
+
<p class="credits">Built with Rails & <a class="credits__link" href="https://hotdocsrails.com">HotDocs<img class="credits__logo" src="/hot_docs.svg" alt="A humanized and happy hot dog" height="32" width="32" /></a></p>
|
173
|
+
</footer>
|
174
|
+
</body>
|
175
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|