utopia-project 0.26.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bac9a3bea3d8034fb1424e91cc4190c8b8f55c08013651c7ffd1a9992a960d97
4
- data.tar.gz: 6540896758867b7939b453f82164488118d4b2f427f991edb4ae694e9ab65fb2
3
+ metadata.gz: 7571eadd6ab883d2405f012181f6079c01c3775a9678e8529920b7768445c7b3
4
+ data.tar.gz: 967608452801fd109a543d90d0b5bc7d5020148e90e2ccf9d87052160f43a893
5
5
  SHA512:
6
- metadata.gz: fa363f52ff5f4f13bdfd2cf3038ce57f91b16b59457ec66272f685d45ba4e55a950f15d245d59989472ae415fc7fc39496a00dcc8080a3a0748894627d1f2805
7
- data.tar.gz: 5eff03c8af06dbe727a24f599c5e1c6d1421f579a869eb33f3d0a14f3bb37ecc0b00adb89820912882e623fe4a334138df005b46bf7ae322ea9a7638fb0c8ac3
6
+ metadata.gz: 832377189cf4125315baf88d81691e6dea3173cfdbef2a7ccb291cadb7fe8f62186561374d5295c2ee1f68860c4c5cd911c3a6409431acc70fae9de75cba5f45
7
+ data.tar.gz: c886453e9447576f9983f7dd476f09042bbb7df9ea1af627896ecee051162d276544e6d7f56b60bc2d3a2893f455210337f9af7eef677217870c59ca58dc5bce
checksums.yaml.gz.sig CHANGED
Binary file
@@ -57,3 +57,23 @@ def static(output_path: "docs", force: true)
57
57
 
58
58
  FileUtils.touch File.expand_path(".nojekyll", output_path)
59
59
  end
60
+
61
+ # Extract a description for the project.
62
+ def description(root: context.root)
63
+ require 'markly'
64
+
65
+ readme_path = File.join(root, "readme.md")
66
+ if File.exist?(readme_path)
67
+ document = Markly.parse(File.read(readme_path))
68
+ child = document.first_child
69
+
70
+ if child&.type == :header
71
+ title = child.first_child.string_content
72
+
73
+ # First sentence
74
+ if introduction = child.next
75
+ $stdout.puts introduction.to_plaintext[/.*?\./]
76
+ end
77
+ end
78
+ end
79
+ end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Utopia
7
7
  module Project
8
- VERSION = "0.26.0"
8
+ VERSION = "0.27.0"
9
9
  end
10
10
  end
data/pages/_header.xnode CHANGED
@@ -7,8 +7,8 @@
7
7
  end
8
8
 
9
9
  if link = links(path.dirname, name: path.last, locale: localization.current_locale, indices: true).first
10
- if replace = link[:replace]&.to_sym
11
- ?> &rsaquo; #{link.to_href(content: controller[:base].public_send(replace))}<?r
10
+ if replace = link[:replace]&.to_sym and base = controller[:base]
11
+ ?> &rsaquo; #{link.to_href(content: base.public_send(replace))}<?r
12
12
  else
13
13
  ?> &rsaquo; #{link.to_href}<?r
14
14
  end
data/pages/controller.rb CHANGED
@@ -5,11 +5,12 @@
5
5
 
6
6
  prepend Actions
7
7
 
8
- on 'index' do
8
+ on '**' do
9
9
  @base = Utopia::Project::Base.instance
10
-
10
+ end
11
+
12
+ on 'index' do
11
13
  if @document = @base.readme_document
12
-
13
14
  @document.replace_section("Usage") do |header|
14
15
  header.insert_after(@document.html_node("<content:usage/>"))
15
16
  end
@@ -5,13 +5,7 @@
5
5
 
6
6
  prepend Actions
7
7
 
8
- on 'index' do
9
- @base = Utopia::Project::Base.instance
10
- end
11
-
12
8
  on '**/*/index' do |request, path|
13
- @base = Utopia::Project::Base.instance
14
-
15
9
  name = path.components[-2]
16
10
 
17
11
  @guide = @base.guides.find do |guide|
@@ -5,13 +5,7 @@
5
5
 
6
6
  prepend Actions
7
7
 
8
- on 'index' do
9
- @base = Utopia::Project::Base.instance
10
- end
11
-
12
8
  on '**/*/index' do |request, path|
13
- @base = Utopia::Project::Base.instance
14
-
15
9
  @lexical_path = path.components.dup
16
10
  # Remove the last "index" part:
17
11
  @lexical_path.pop
@@ -1,2 +1,2 @@
1
1
  // This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
2
- Syntax.brushes.dependency("trenni","xml");Syntax.brushes.dependency("trenni","ruby");Syntax.register("trenni",function(a){a.push({pattern:/((<\?r)([\s\S]*?)(\?>))/gm,matches:Syntax.extractMatches({klass:"ruby-tag",allow:["keyword","ruby"]},{klass:"keyword"},{brush:"ruby"},{klass:"keyword"})});a.push({pattern:/((#{)([\s\S]*?)(}))/gm,matches:Syntax.extractMatches({klass:"ruby-tag",allow:["keyword","ruby"]},{klass:"keyword"},{brush:"ruby"},{klass:"keyword"})});a.derives("xml")});
2
+ Syntax.brushes.dependency("xrb","xml");Syntax.brushes.dependency("xrb","ruby");Syntax.register("xrb",function(a){a.push({pattern:/((<\?r)([\s\S]*?)(\?>))/gm,matches:Syntax.extractMatches({klass:"ruby-tag",allow:["keyword","ruby"]},{klass:"keyword"},{brush:"ruby"},{klass:"keyword"})});a.push({pattern:/((#{)([\s\S]*?)(}))/gm,matches:Syntax.extractMatches({klass:"ruby-tag",allow:["keyword","ruby"]},{klass:"keyword"},{brush:"ruby"},{klass:"keyword"})});a.derives("xml")});
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -40,7 +40,7 @@ cert_chain:
40
40
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
41
41
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
42
42
  -----END CERTIFICATE-----
43
- date: 2024-06-28 00:00:00.000000000 Z
43
+ date: 2024-07-24 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: decode
@@ -166,7 +166,6 @@ files:
166
166
  - pages/source/index.xnode
167
167
  - pages/source/show.xnode
168
168
  - public/.DS_Store
169
- - public/.nojekyll
170
169
  - public/_components/.DS_Store
171
170
  - public/_components/jquery-litebox/jquery.litebox.css
172
171
  - public/_components/jquery-litebox/jquery.litebox.gallery.css
@@ -248,6 +247,7 @@ files:
248
247
  - public/_static/icon.png
249
248
  - public/_static/links.js
250
249
  - public/_static/site.css
250
+ - public/robots.txt
251
251
  - readme.md
252
252
  - template/Gemfile
253
253
  - template/config.ru
metadata.gz.sig CHANGED
Binary file
File without changes