utopia-project 0.3.0 → 0.4.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/guides/getting-started/README.md +31 -0
- data/guides/links.yaml +6 -0
- data/lib/utopia/project/base.rb +6 -7
- data/lib/utopia/project/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eef5d39417b6da1e11cd8aeff16e645dbf6b1c0ae48ea93179b25410cecc69f4
|
4
|
+
data.tar.gz: 1bf148454089d81f4273d7eb22984bd8893ea6298be2db2d154e0723dffd0152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ddc7844454bcc5b7b0c311e2c4e56a17a3d8609502c115fc24ec27a2153824f0cb08080c4825a9271270ad2aff945ed40448674f0b66848e250c076f84050a3
|
7
|
+
data.tar.gz: 4b2ed3f8b72cdab39c7a5dd9e75b62a7c1a2b47c56bfde0057881e2041b4ed10ff732bd8e71acf74df70b276e76e037cb4d61e67518e7c8d0902ee448fefc0d2
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Getting Started
|
2
|
+
|
3
|
+
This guide explains how to use `utopia-project` for your own project.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Firstly, add the gem to your project:
|
8
|
+
|
9
|
+
~~~ bash
|
10
|
+
$ bundle add utopia-project
|
11
|
+
~~~
|
12
|
+
|
13
|
+
## Start Local Server
|
14
|
+
|
15
|
+
Start the local server to preview documentation:
|
16
|
+
|
17
|
+
~~~ bash
|
18
|
+
$ bake utopia:project:serve
|
19
|
+
~~~
|
20
|
+
|
21
|
+
Right now, this server does not reload the code index, so you will need to restart the server to update the code index. This will be fixed in the future.
|
22
|
+
|
23
|
+
## Generate Static Site
|
24
|
+
|
25
|
+
You can generate a static copy of your documentation into the `docs/` folder:
|
26
|
+
|
27
|
+
~~~ bash
|
28
|
+
$ bake utopia:project:static
|
29
|
+
~~~
|
30
|
+
|
31
|
+
You can check the [guide for GitHub Pages](../github-pages-integration/index) which gives more details on how to deploy the static site using GitHub.
|
data/guides/links.yaml
ADDED
data/lib/utopia/project/base.rb
CHANGED
@@ -21,6 +21,8 @@
|
|
21
21
|
# THE SOFTWARE.
|
22
22
|
|
23
23
|
require 'utopia/path'
|
24
|
+
require 'utopia/content/links'
|
25
|
+
|
24
26
|
require 'trenni/reference'
|
25
27
|
require 'decode'
|
26
28
|
|
@@ -56,6 +58,8 @@ module Utopia
|
|
56
58
|
@source_path = Utopia::Path["/source"]
|
57
59
|
|
58
60
|
@index = Decode::Index.new
|
61
|
+
|
62
|
+
@links = Utopia::Content::Links.new(@root)
|
59
63
|
end
|
60
64
|
|
61
65
|
# The file-system path to the root of the project.
|
@@ -150,15 +154,10 @@ module Utopia
|
|
150
154
|
end
|
151
155
|
|
152
156
|
def guides
|
153
|
-
guides_root = File.expand_path("guides", @root)
|
154
|
-
|
155
|
-
# There are no guides if there is no directory:
|
156
|
-
return unless File.directory?(guides_root)
|
157
|
-
|
158
157
|
return to_enum(:guides) unless block_given?
|
159
158
|
|
160
|
-
|
161
|
-
guide_path = File.join(
|
159
|
+
@links.index("/guides").each do |link|
|
160
|
+
guide_path = File.join(@root, link.path)
|
162
161
|
|
163
162
|
next unless File.directory?(guide_path)
|
164
163
|
|
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -194,7 +194,9 @@ files:
|
|
194
194
|
- bake/utopia/project.rb
|
195
195
|
- gems.rb
|
196
196
|
- guides/documentation-formatting/README.md
|
197
|
+
- guides/getting-started/README.md
|
197
198
|
- guides/github-pages-integration/README.md
|
199
|
+
- guides/links.yaml
|
198
200
|
- lib/utopia/project.rb
|
199
201
|
- lib/utopia/project/base.rb
|
200
202
|
- lib/utopia/project/guide.rb
|