utopia-project 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/utopia/project.rb +2 -2
- data/lib/utopia/project/version.rb +1 -1
- data/pages/controller.rb +0 -4
- data/pages/guides/index.xnode +1 -1
- data/pages/index.xnode +29 -7
- data/public/_static/site.css +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: 85fc87afd1995b56900a8c667b2c2a114d64a220f02b49323c9b96144b6c9df9
|
4
|
+
data.tar.gz: f1c9502a2078cd29d4aa2b1b39e6194429f488b325975c9814c106fa76bcd528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a161d8d671a97d3dc138b80ebfd08a3dff467035268a9f06e3a3240ddfc4f4f58671e2e342d318f7d607286903921d9701af9bc09543743d9e13855dcaf37ac6
|
7
|
+
data.tar.gz: 32227079b3b4f5af305c61c583135005c2b53bb5b0ae24c782c234038b0fb4cff435062b7aca6e25274096a8b4c2b83bc32b01b0e6bdd82c8ede77d8c9588001
|
data/README.md
CHANGED
@@ -10,6 +10,14 @@ My goal is to provide task-centric documentation, and to continually improve the
|
|
10
10
|
|
11
11
|
With that in mind, this web application provides such a model and will evolve over time to suit my requirements and the needs of my users.
|
12
12
|
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Execute the following in your project:
|
16
|
+
|
17
|
+
~~~ bash
|
18
|
+
bundle add utopia-project
|
19
|
+
~~~
|
20
|
+
|
13
21
|
## Usage
|
14
22
|
|
15
23
|
Please see the <a href="https://socketry.github.io/utopia-project/">project documentation</a> or run it locally using `bake utopia:project:serve`.
|
data/lib/utopia/project.rb
CHANGED
@@ -62,8 +62,8 @@ module Utopia
|
|
62
62
|
builder.use Rack::ShowExceptions unless UTOPIA.testing?
|
63
63
|
end
|
64
64
|
|
65
|
-
|
66
|
-
builder.use Utopia::Static, root:
|
65
|
+
# We serve static files from the project root:
|
66
|
+
builder.use Utopia::Static, root: root
|
67
67
|
|
68
68
|
builder.use Utopia::Static, root: PUBLIC_ROOT
|
69
69
|
|
data/pages/controller.rb
CHANGED
@@ -7,10 +7,6 @@ on 'index' do
|
|
7
7
|
if readme_path = @base.path_for('README.md')
|
8
8
|
@document = Kramdown::Document.new(File.read(readme_path), syntax_highlighter: nil)
|
9
9
|
|
10
|
-
if title = @document.root.children.shift
|
11
|
-
@title = title.children.first.value
|
12
|
-
end
|
13
|
-
|
14
10
|
start = @document.root.children.index{|node| node.children.first&.value == "Usage"}
|
15
11
|
finish = start + 1
|
16
12
|
|
data/pages/guides/index.xnode
CHANGED
data/pages/index.xnode
CHANGED
@@ -1,9 +1,31 @@
|
|
1
1
|
<content:page>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
<?r
|
3
|
+
if document = self[:document]
|
4
|
+
children = document.root.children
|
5
|
+
|
6
|
+
if children.first.type == :header
|
7
|
+
header = children.shift
|
8
|
+
title = header.children.first
|
9
|
+
case title.type
|
10
|
+
when :text
|
11
|
+
?><content:heading>#{title.value}</content:heading><?r
|
12
|
+
when :img
|
13
|
+
self.document.attributes[:title] ||= title.attr["alt"]
|
14
|
+
?><header><img src="#{title.attr["src"]}" /></header><?r
|
15
|
+
else
|
16
|
+
?><content:heading>Project</content:heading><?r
|
17
|
+
end
|
18
|
+
else
|
19
|
+
?><content:heading>Project</content:heading><?r
|
20
|
+
end
|
21
|
+
|
22
|
+
?>#{MarkupString.raw document.to_html}<?r
|
23
|
+
else
|
24
|
+
?>
|
25
|
+
<content:heading>Project</content:heading>
|
26
|
+
|
27
|
+
<p>This project does not have a README.md file.</p>
|
28
|
+
<?r
|
29
|
+
end
|
30
|
+
?>
|
9
31
|
</content:page>
|
data/public/_static/site.css
CHANGED