bridgetown-docs-template 0.1.0 → 0.1.1
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/LICENSE.md +21 -0
- data/README.md +18 -6
- data/bridgetown-docs-preview.jpg +0 -0
- data/components/bridgetown_docs_template/navigation_component.erb +5 -3
- data/components/bridgetown_docs_template/navigation_component.rb +11 -0
- data/lib/bridgetown-docs-template/version.rb +1 -1
- data/lib/bridgetown-docs-template.rb +8 -5
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e25b58275496d7e549ee2e2b8767503b9662155bb304ff841220c7a98e717602
|
4
|
+
data.tar.gz: 9a4340673cc51d38dfd7ad6b0d09789f1562b17b71d790ded82692dd8e014caf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3bb451677cbf1f182ddbbcfcab7f10a0e5d404626779fb4814b75ce168a3e8f07d81c3147ac68e2072dbcb934b9a8ea194a9bdc0b8f0819217c4ede8f61ba3d
|
7
|
+
data.tar.gz: 4c5a6754d232934431113b3b8c2e11ceadb0ccffe308f6eb875b31cd2812a17e56d737f8425cb6a0216be82bdc28bfafe2a98f86d3a79e537549e95aafabf2fa
|
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Spinal Developers
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
A Bridgetown documentation site theme, built with Tailwind CSS.
|
4
4
|
|
5
5
|
|
6
|
-
<img src="https://
|
6
|
+
<img src="https://github.com/spinalcms/bridgetown-docs-template/blob/main/bridgetown-docs-preview.jpg?raw=true" alt="preview of the Bridgetown documentation theme, built with Tailwind CSS" />
|
7
7
|
|
8
8
|
|
9
|
-
## Sponsored By [Spinal](https://spinalcms.com/)
|
9
|
+
## Sponsored By [Spinal](https://spinalcms.com/cms-for-bridgetown/)
|
10
10
|
|
11
|
-
<a href="https://spinalcms.com/" target="_blank">
|
12
|
-
<img src="https://user-images.githubusercontent.com/988051/183079316-af747ef2-42a9-47d8-9a0c-488ed4b6a689.jpg" alt="Spinal CMS logo" width="
|
11
|
+
<a href="https://spinalcms.com/cms-for-bridgetown/" target="_blank">
|
12
|
+
<img src="https://user-images.githubusercontent.com/988051/183079316-af747ef2-42a9-47d8-9a0c-488ed4b6a689.jpg" alt="Spinal CMS logo" width="200"/>
|
13
13
|
</a>
|
14
14
|
|
15
15
|
|
@@ -21,6 +21,12 @@ Run this command to add this plugin to your site's Gemfile:
|
|
21
21
|
$ bundle add bridgetown-docs-template -g bridgetown_plugins
|
22
22
|
```
|
23
23
|
|
24
|
+
Then add the initializer to your configuration in `config/initializers.rb`:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
init :"bridgetown-docs-template"
|
28
|
+
```
|
29
|
+
|
24
30
|
|
25
31
|
## Requirements
|
26
32
|
|
@@ -34,7 +40,7 @@ There are a few requirements for this theme to run.
|
|
34
40
|
|
35
41
|
The following frontmatter is expected in your collection resources:
|
36
42
|
|
37
|
-
- layout: bridgetown_docs_template/layout
|
43
|
+
- layout: `bridgetown_docs_template/layout`
|
38
44
|
- title
|
39
45
|
- description
|
40
46
|
- category
|
@@ -42,7 +48,7 @@ The following frontmatter is expected in your collection resources:
|
|
42
48
|
If you want to show the “video” or “quick links” section—likely in your docs root, add `show_videotour: true` and `show_quicklinks: true` to your root's markdown file.
|
43
49
|
|
44
50
|
|
45
|
-
### Add the gem's path in the `content` array, like so:
|
51
|
+
### Add the gem's path in the `content` array of your Tailwind CSS config, like so:
|
46
52
|
|
47
53
|
```js
|
48
54
|
content: [
|
@@ -66,6 +72,12 @@ The plugin will automatically use any of the following metadata variables if the
|
|
66
72
|
- email
|
67
73
|
|
68
74
|
|
75
|
+
## Related repo's
|
76
|
+
- [Documentation theme built with Tailwind CSS](https://github.com/SpinalCMS/docs-template)
|
77
|
+
- [11ty documentation template using Tailwind CSS](https://github.com/SpinalCMS/11ty-docs-template)
|
78
|
+
- [Astro documentation template using Tailwind CSS](https://github.com/SpinalCMS/astro-docs-template)
|
79
|
+
|
80
|
+
|
69
81
|
## Contributing
|
70
82
|
|
71
83
|
1. Fork it (https://github.com/spinalcms/bridgetown-docs-template/fork)
|
Binary file
|
@@ -8,9 +8,9 @@
|
|
8
8
|
<div class="fixed top-[3.5rem] h-screen shadow-xl px-4 left-0 hidden peer-checked:block lg:relative lg:top-0 lg:h-auto lg:px-0 lg:block lg:flex-none lg:shadow-none">
|
9
9
|
<div class="absolute inset-y-0 right-0 w-full lg:w-[50vw] bg-white lg:bg-slate-50"></div>
|
10
10
|
|
11
|
-
<nav class="sticky top-[4.5rem] w-64
|
12
|
-
<ul role="list" class="-ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto py-7 pl-0.5 space-y-8">
|
13
|
-
<%
|
11
|
+
<nav class="sticky top-[4.5rem] w-64 text-base lg:text-sm xl:w-72">
|
12
|
+
<ul role="list" class="-ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto py-7 pl-0.5 pr-8 space-y-8 xl:pr-16">
|
13
|
+
<% grouped_and_sorted_documentation_resources.each do |resource| %>
|
14
14
|
<li>
|
15
15
|
<h3 class="font-semibold tracking-tight text-slate-900">
|
16
16
|
<%= resource.fetch("name", "No Category").titleize %>
|
@@ -18,6 +18,8 @@
|
|
18
18
|
|
19
19
|
<ul role="list" class="pl-3 mt-3 space-y-2">
|
20
20
|
<% sort(resource.fetch("items", []), "order").each do |item| %>
|
21
|
+
<% next if !item.published? %>
|
22
|
+
|
21
23
|
<li>
|
22
24
|
<a href="<%= url_for(item) %>" class="text-slate-900 hover:text-slate-800">
|
23
25
|
<%= item.data.title %>
|
@@ -2,4 +2,15 @@ class BridgetownDocsTemplate::NavigationComponent < Bridgetown::Component
|
|
2
2
|
def initialize(resources)
|
3
3
|
@resources = resources
|
4
4
|
end
|
5
|
+
|
6
|
+
def grouped_and_sorted_documentation_resources
|
7
|
+
group_by(@resources, "section")
|
8
|
+
.sort_by { |resources| documentation_sections_order.find_index(resources["name"]) }
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def documentation_sections_order
|
14
|
+
[]
|
15
|
+
end
|
5
16
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "bridgetown"
|
4
|
+
require "bridgetown-docs-template/version"
|
4
5
|
|
5
|
-
Bridgetown
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
)
|
6
|
+
Bridgetown.initializer :"bridgetown-docs-template" do |config|
|
7
|
+
config.source_manifest(
|
8
|
+
origin: BridgetownDocsTemplate,
|
9
|
+
components: File.expand_path("../components", __dir__),
|
10
|
+
layouts: File.expand_path("../layouts", __dir__)
|
11
|
+
)
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-docs-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spinal CMS Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -68,9 +68,11 @@ files:
|
|
68
68
|
- ".rubocop.yml"
|
69
69
|
- CHANGELOG.md
|
70
70
|
- Gemfile
|
71
|
+
- LICENSE.md
|
71
72
|
- LICENSE.txt
|
72
73
|
- README.md
|
73
74
|
- Rakefile
|
75
|
+
- bridgetown-docs-preview.jpg
|
74
76
|
- bridgetown-docs-template.gemspec
|
75
77
|
- components/bridgetown_docs_template/content_footer_component.erb
|
76
78
|
- components/bridgetown_docs_template/content_footer_component.rb
|
@@ -92,7 +94,7 @@ homepage: https://github.com/spinalcms/bridgetown-docs-template
|
|
92
94
|
licenses:
|
93
95
|
- MIT
|
94
96
|
metadata:
|
95
|
-
yarn-add: bridgetown-docs-template@0.1.
|
97
|
+
yarn-add: bridgetown-docs-template@0.1.1
|
96
98
|
post_install_message:
|
97
99
|
rdoc_options: []
|
98
100
|
require_paths:
|
@@ -108,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
110
|
- !ruby/object:Gem::Version
|
109
111
|
version: '0'
|
110
112
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.4.7
|
112
114
|
signing_key:
|
113
115
|
specification_version: 4
|
114
116
|
summary: A minimal Bridgetown template for a documentation site using Tailwind CSS.
|