markdowndocs 0.4.0 → 0.5.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 +4 -4
- data/CHANGELOG.md +39 -0
- data/app/views/markdowndocs/docs/_breadcrumb.html.erb +5 -5
- data/app/views/markdowndocs/docs/_card.html.erb +3 -3
- data/app/views/markdowndocs/docs/_mode_switcher.html.erb +6 -3
- data/app/views/markdowndocs/docs/_navigation.html.erb +7 -7
- data/app/views/markdowndocs/docs/index.html.erb +13 -13
- data/app/views/markdowndocs/docs/show.html.erb +7 -7
- data/lib/markdowndocs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1dea93a9abe255c4c491211a174eea97d253c4a817d7bd5811b21dab335e3052
|
|
4
|
+
data.tar.gz: 2ef4fd88793a8600f815a7bfe4826c3fb312ab4dda38771b3cc5b8163a33929c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65669141ca36724f5e9d70ac6ed57d252ee93c33087d0d602391131049c2e4d258733f398d0c9dfcadeaa5f4ffd2b8a27ed55e4e083472848b67c3a9b16f3c4b
|
|
7
|
+
data.tar.gz: 135b31877bd880d9716f9dd897a25c57c162dfe434be98914e24df9da12ee5b4dc5dce20c061c2e1dc87db0d38eafbbb57912d60a4b845ee0863db0995951e35
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.5.0] - 2026-05-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Dark mode support across all docs templates. Every `bg-*`, `text-*`, and
|
|
13
|
+
`border-*` class now has a paired `dark:` variant chosen for WCAG 2.2 AAA
|
|
14
|
+
contrast (7:1) on dark surfaces. Host apps with `class="dark"` on `<html>`
|
|
15
|
+
(or `prefers-color-scheme: dark`) will see proper dark theming without
|
|
16
|
+
needing to override gem views.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Bumped indigo link colors from `text-indigo-600` to `text-indigo-700` (light)
|
|
21
|
+
and `text-indigo-300` (dark) so links pass AAA contrast on both surfaces.
|
|
22
|
+
- Selected-state mode-switcher cyan text bumped from `text-cyan-700`/`-800` to
|
|
23
|
+
`text-cyan-900` (light) and `text-cyan-100` (dark) for AAA against the
|
|
24
|
+
selected card's `bg-cyan-50`/`bg-cyan-900/40` background.
|
|
25
|
+
- `prose-indigo` content area now also applies `dark:prose-invert` so the
|
|
26
|
+
rendered Markdown body inverts cleanly in dark mode.
|
|
27
|
+
|
|
28
|
+
## [0.4.0] - 2026-03-20
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Engine now uses its own layout instead of inheriting the host app's layout, eliminating route helper conflicts caused by `isolate_namespace`. Host apps can override at `app/views/layouts/markdowndocs/application.html.erb` or configure via `config.layout`.
|
|
33
|
+
- Supports `content_for` blocks (`:docs_header`, `:docs_footer`, `:head`, `:title`) for customization.
|
|
34
|
+
- Removed `ensure_host_route_helpers` `before_action` — no longer needed with isolated layout.
|
|
35
|
+
|
|
36
|
+
## [0.3.1] - 2026-03-20
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Fenced code block content is now indexed as a low-boost (0.5x) search field, making class names, methods, and config keys in examples discoverable.
|
|
41
|
+
- Visible cards are now reordered by MiniSearch relevance score within each category.
|
|
42
|
+
- Search debounce reduced from 150ms to 50ms for snappier results.
|
|
43
|
+
|
|
8
44
|
## [0.3.0] - 2026-03-20
|
|
9
45
|
|
|
10
46
|
### Added
|
|
@@ -96,6 +132,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
96
132
|
- i18n support for all UI strings
|
|
97
133
|
- Install generator (`rails generate markdowndocs:install`)
|
|
98
134
|
|
|
135
|
+
[0.5.0]: https://github.com/dschmura/markdowndocs/releases/tag/v0.5.0
|
|
136
|
+
[0.4.0]: https://github.com/dschmura/markdowndocs/releases/tag/v0.4.0
|
|
137
|
+
[0.3.1]: https://github.com/dschmura/markdowndocs/releases/tag/v0.3.1
|
|
99
138
|
[0.3.0]: https://github.com/dschmura/markdowndocs/releases/tag/v0.3.0
|
|
100
139
|
[0.2.3]: https://github.com/dschmura/markdowndocs/releases/tag/v0.2.3
|
|
101
140
|
[0.2.2]: https://github.com/dschmura/markdowndocs/releases/tag/v0.2.2
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
]
|
|
8
8
|
%>
|
|
9
9
|
<nav aria-label="Breadcrumb" class="mb-6">
|
|
10
|
-
<ol class="flex items-center space-x-2 text-sm text-gray-
|
|
10
|
+
<ol class="flex items-center space-x-2 text-sm text-gray-700 dark:text-slate-300">
|
|
11
11
|
<% breadcrumb_items.each_with_index do |item, index| %>
|
|
12
12
|
<li class="flex items-center">
|
|
13
13
|
<% if index > 0 %>
|
|
14
|
-
<svg class="w-4 h-4 mx-2 text-gray-700" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
14
|
+
<svg class="w-4 h-4 mx-2 text-gray-700 dark:text-slate-300" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
15
15
|
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
|
16
16
|
</svg>
|
|
17
17
|
<% end %>
|
|
18
18
|
|
|
19
19
|
<% if item[:current] %>
|
|
20
|
-
<span class="font-medium text-gray-900" aria-current="page"><%= item[:name] %></span>
|
|
20
|
+
<span class="font-medium text-gray-900 dark:text-slate-100" aria-current="page"><%= item[:name] %></span>
|
|
21
21
|
<% elsif item[:path] %>
|
|
22
|
-
<%= link_to item[:name], item[:path], class: "hover:text-indigo-
|
|
22
|
+
<%= link_to item[:name], item[:path], class: "hover:text-indigo-700 dark:hover:text-indigo-300 transition-colors" %>
|
|
23
23
|
<% else %>
|
|
24
|
-
<span class="text-gray-700"><%= item[:name] %></span>
|
|
24
|
+
<span class="text-gray-700 dark:text-slate-300"><%= item[:name] %></span>
|
|
25
25
|
<% end %>
|
|
26
26
|
</li>
|
|
27
27
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (doc:) %>
|
|
2
|
-
<div class="bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow duration-200 p-6 h-full flex flex-col">
|
|
3
|
-
<h3 class="text-lg font-semibold text-gray-900 mb-2 hover:text-indigo-
|
|
2
|
+
<div class="bg-white dark:bg-slate-800 rounded-lg shadow-sm hover:shadow-md transition-shadow duration-200 p-6 h-full flex flex-col">
|
|
3
|
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-slate-100 mb-2 hover:text-indigo-700 dark:hover:text-indigo-300 transition-colors">
|
|
4
4
|
<%= link_to doc.title, markdowndocs.doc_path(doc.slug) %>
|
|
5
5
|
</h3>
|
|
6
|
-
<p class="text-gray-
|
|
6
|
+
<p class="text-gray-700 dark:text-slate-300 text-sm line-clamp-3"><%= doc.description %></p>
|
|
7
7
|
</div>
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
id="docs-mode-switcher"
|
|
4
4
|
class="
|
|
5
5
|
bg-white
|
|
6
|
+
dark:bg-slate-800
|
|
6
7
|
rounded-lg
|
|
7
8
|
border
|
|
8
9
|
border-slate-200
|
|
10
|
+
dark:border-slate-700
|
|
9
11
|
p-4
|
|
10
12
|
"
|
|
11
13
|
data-controller="docs-mode"
|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
text-sm
|
|
16
18
|
font-medium
|
|
17
19
|
text-slate-700
|
|
20
|
+
dark:text-slate-300
|
|
18
21
|
mb-3
|
|
19
22
|
">
|
|
20
23
|
<%= t("markdowndocs.viewing_mode") %>
|
|
@@ -46,13 +49,13 @@
|
|
|
46
49
|
border-2
|
|
47
50
|
transition-all
|
|
48
51
|
duration-150
|
|
49
|
-
<%= (current_mode == mode) ? 'border-cyan-500 bg-cyan-50' : 'border-slate-200 hover:border-slate-300 hover:bg-slate-50' %>
|
|
52
|
+
<%= (current_mode == mode) ? 'border-cyan-500 bg-cyan-50 dark:bg-cyan-900/40 dark:border-cyan-400' : 'border-slate-200 hover:border-slate-300 hover:bg-slate-50 dark:border-slate-700 dark:hover:border-slate-500 dark:hover:bg-slate-700' %>
|
|
50
53
|
"
|
|
51
54
|
>
|
|
52
55
|
<span class="
|
|
53
56
|
block
|
|
54
57
|
font-medium
|
|
55
|
-
<%= (current_mode == mode) ? 'text-cyan-
|
|
58
|
+
<%= (current_mode == mode) ? 'text-cyan-900 dark:text-cyan-100' : 'text-slate-900 dark:text-slate-100' %>
|
|
56
59
|
">
|
|
57
60
|
<%= t("markdowndocs.modes.#{mode}", default: mode.titleize) %>
|
|
58
61
|
</span>
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
<p class="
|
|
62
65
|
text-xs
|
|
63
66
|
mt-1
|
|
64
|
-
<%= (current_mode == mode) ? 'text-cyan-
|
|
67
|
+
<%= (current_mode == mode) ? 'text-cyan-900 dark:text-cyan-100' : 'text-slate-700 dark:text-slate-300' %>
|
|
65
68
|
">
|
|
66
69
|
<%= description %>
|
|
67
70
|
</p>
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
9
9
|
<% if toc_items.length >= 3 %>
|
|
10
|
-
<div class="bg-white rounded-lg shadow-sm p-6">
|
|
10
|
+
<div class="bg-white dark:bg-slate-800 rounded-lg shadow-sm p-6">
|
|
11
11
|
<nav aria-label="Table of Contents">
|
|
12
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-4">On this page</h2>
|
|
12
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-slate-100 mb-4">On this page</h2>
|
|
13
13
|
<ul class="space-y-2">
|
|
14
14
|
<% toc_items.each do |item| %>
|
|
15
15
|
<li class="<%= 'ml-4' if item[:level] == 3 %>">
|
|
16
|
-
<a href="#<%= item[:slug] %>" class="text-sm text-gray-
|
|
16
|
+
<a href="#<%= item[:slug] %>" class="text-sm text-gray-700 dark:text-slate-300 hover:text-indigo-700 dark:hover:text-indigo-300 transition-colors block py-1">
|
|
17
17
|
<%= item[:text] %>
|
|
18
18
|
</a>
|
|
19
19
|
</li>
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
<% end %>
|
|
25
25
|
|
|
26
26
|
<% if related_docs.any? %>
|
|
27
|
-
<div class="bg-white rounded-lg shadow-sm p-6 related-docs">
|
|
28
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-4">Related Documentation</h2>
|
|
27
|
+
<div class="bg-white dark:bg-slate-800 rounded-lg shadow-sm p-6 related-docs">
|
|
28
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-slate-100 mb-4">Related Documentation</h2>
|
|
29
29
|
<ul class="space-y-3">
|
|
30
30
|
<% related_docs.each do |related_doc| %>
|
|
31
31
|
<li>
|
|
32
|
-
<%= link_to related_doc.title, markdowndocs.doc_path(related_doc.slug), class: "text-sm text-indigo-
|
|
33
|
-
<p class="text-xs text-gray-
|
|
32
|
+
<%= link_to related_doc.title, markdowndocs.doc_path(related_doc.slug), class: "text-sm text-indigo-700 dark:text-indigo-300 hover:text-indigo-800 dark:hover:text-indigo-200 font-medium transition-colors" %>
|
|
33
|
+
<p class="text-xs text-gray-700 dark:text-slate-300 mt-1"><%= related_doc.description %></p>
|
|
34
34
|
</li>
|
|
35
35
|
<% end %>
|
|
36
36
|
</ul>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="min-h-screen bg-gray-50">
|
|
1
|
+
<div class="min-h-screen bg-gray-50 dark:bg-slate-900">
|
|
2
2
|
<div class="max-w-7xl mx-auto px-4 py-12
|
|
3
3
|
sm:px-6
|
|
4
4
|
lg:px-8"
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
<% end %>>
|
|
9
9
|
<!-- Hero Section -->
|
|
10
10
|
<div class="text-center mb-12">
|
|
11
|
-
<h1 class="text-4xl font-bold text-gray-900 mb-4">Documentation</h1>
|
|
12
|
-
<p class="text-xl text-gray-
|
|
11
|
+
<h1 class="text-4xl font-bold text-gray-900 dark:text-slate-100 mb-4">Documentation</h1>
|
|
12
|
+
<p class="text-xl text-gray-700 dark:text-slate-300">Browse our comprehensive documentation and guides</p>
|
|
13
13
|
|
|
14
14
|
<% if @search_enabled %>
|
|
15
15
|
<!-- Search input -->
|
|
16
16
|
<div class="mt-6 max-w-lg mx-auto">
|
|
17
17
|
<div class="relative">
|
|
18
|
-
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
18
|
+
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-700 dark:text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
19
19
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
20
20
|
</svg>
|
|
21
21
|
<input
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
data-docs-search-target="input"
|
|
24
24
|
data-action="input->docs-search#search"
|
|
25
25
|
placeholder="<%= t("markdowndocs.search_placeholder", default: "Search documentation...") %>"
|
|
26
|
-
class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 shadow-sm text-gray-900 placeholder-gray-400 transition-colors
|
|
26
|
+
class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 dark:border-slate-700 shadow-sm bg-white dark:bg-slate-800 text-gray-900 dark:text-slate-100 placeholder-gray-700 dark:placeholder-slate-400 transition-colors
|
|
27
27
|
focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"
|
|
28
28
|
autocomplete="off" />
|
|
29
29
|
</div>
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
<!-- No results message -->
|
|
36
36
|
<% if @search_enabled %>
|
|
37
37
|
<div data-docs-search-target="noResults" class="hidden text-center py-12">
|
|
38
|
-
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
38
|
+
<svg class="mx-auto h-12 w-12 text-gray-700 dark:text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
39
39
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
40
40
|
</svg>
|
|
41
|
-
<h3 class="mt-2 text-sm font-medium text-gray-900"><%= t("markdowndocs.no_search_results", default: "No matching documents") %></h3>
|
|
42
|
-
<p class="mt-1 text-sm text-gray-
|
|
41
|
+
<h3 class="mt-2 text-sm font-medium text-gray-900 dark:text-slate-100"><%= t("markdowndocs.no_search_results", default: "No matching documents") %></h3>
|
|
42
|
+
<p class="mt-1 text-sm text-gray-700 dark:text-slate-300"><%= t("markdowndocs.try_different_search", default: "Try a different search term") %></p>
|
|
43
43
|
</div>
|
|
44
44
|
<% end %>
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<% if docs.any? %>
|
|
49
49
|
<div id="<%= category.parameterize %>" class="mb-12 scroll-mt-6"
|
|
50
50
|
<% if @search_enabled %>data-docs-search-target="category"<% end %>>
|
|
51
|
-
<h2 class="text-2xl font-semibold text-gray-900 mb-6"><%= category %></h2>
|
|
51
|
+
<h2 class="text-2xl font-semibold text-gray-900 dark:text-slate-100 mb-6"><%= category %></h2>
|
|
52
52
|
<div class="grid grid-cols-1 gap-6
|
|
53
53
|
md:grid-cols-2
|
|
54
54
|
lg:grid-cols-3">
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
<% end %>
|
|
64
64
|
<% else %>
|
|
65
65
|
<!-- Empty State -->
|
|
66
|
-
<div class="bg-white rounded-lg shadow-sm">
|
|
66
|
+
<div class="bg-white dark:bg-slate-800 rounded-lg shadow-sm">
|
|
67
67
|
<div class="px-4 py-5
|
|
68
68
|
sm:p-6">
|
|
69
69
|
<div class="text-center py-12">
|
|
70
|
-
<svg class="mx-auto h-12 w-12 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
70
|
+
<svg class="mx-auto h-12 w-12 text-gray-700 dark:text-slate-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
71
71
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
|
72
72
|
</svg>
|
|
73
|
-
<h3 class="mt-2 text-sm font-medium text-gray-900">No documentation available</h3>
|
|
74
|
-
<p class="mt-1 text-sm text-gray-700">Documentation will appear here once markdown files are added.</p>
|
|
73
|
+
<h3 class="mt-2 text-sm font-medium text-gray-900 dark:text-slate-100">No documentation available</h3>
|
|
74
|
+
<p class="mt-1 text-sm text-gray-700 dark:text-slate-300">Documentation will appear here once markdown files are added.</p>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<div class="min-h-screen bg-gray-50">
|
|
1
|
+
<div class="min-h-screen bg-gray-50 dark:bg-slate-900">
|
|
2
2
|
<div class="max-w-7xl mx-auto px-4 py-12
|
|
3
3
|
sm:px-6
|
|
4
4
|
lg:px-8">
|
|
5
5
|
<!-- Back link -->
|
|
6
6
|
<div class="mb-6">
|
|
7
|
-
<%= link_to markdowndocs.root_path, class: "inline-flex items-center text-indigo-
|
|
8
|
-
hover:text-indigo-
|
|
7
|
+
<%= link_to markdowndocs.root_path, class: "inline-flex items-center text-indigo-700 transition-colors
|
|
8
|
+
hover:text-indigo-800 dark:text-indigo-300 dark:hover:text-indigo-200" do %>
|
|
9
9
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
10
10
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" />
|
|
11
11
|
</svg>
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
<button
|
|
22
22
|
id="sidebar-toggle"
|
|
23
23
|
type="button"
|
|
24
|
-
class="w-full px-4 py-2 bg-white rounded-lg shadow-sm text-gray-700 transition-colors flex items-center justify-between
|
|
25
|
-
hover:bg-gray-50"
|
|
24
|
+
class="w-full px-4 py-2 bg-white dark:bg-slate-800 rounded-lg shadow-sm text-gray-700 dark:text-slate-300 transition-colors flex items-center justify-between
|
|
25
|
+
hover:bg-gray-50 dark:hover:bg-slate-700"
|
|
26
26
|
aria-label="<%= t("markdowndocs.navigation_sidebar") %>"
|
|
27
27
|
aria-expanded="false"
|
|
28
28
|
aria-controls="mobile-sidebar"
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
lg:grid-cols-12">
|
|
67
67
|
<!-- Main content -->
|
|
68
68
|
<main class="lg:col-span-8">
|
|
69
|
-
<article class="bg-white rounded-lg shadow-sm p-8">
|
|
70
|
-
<div class="prose prose-indigo max-w-none">
|
|
69
|
+
<article class="bg-white dark:bg-slate-800 rounded-lg shadow-sm p-8">
|
|
70
|
+
<div class="prose prose-indigo dark:prose-invert max-w-none">
|
|
71
71
|
<%= raw @rendered_content %>
|
|
72
72
|
</div>
|
|
73
73
|
</article>
|
data/lib/markdowndocs/version.rb
CHANGED