utopia-project 0.3.0 → 0.4.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: 85fc87afd1995b56900a8c667b2c2a114d64a220f02b49323c9b96144b6c9df9
4
- data.tar.gz: f1c9502a2078cd29d4aa2b1b39e6194429f488b325975c9814c106fa76bcd528
3
+ metadata.gz: eef5d39417b6da1e11cd8aeff16e645dbf6b1c0ae48ea93179b25410cecc69f4
4
+ data.tar.gz: 1bf148454089d81f4273d7eb22984bd8893ea6298be2db2d154e0723dffd0152
5
5
  SHA512:
6
- metadata.gz: a161d8d671a97d3dc138b80ebfd08a3dff467035268a9f06e3a3240ddfc4f4f58671e2e342d318f7d607286903921d9701af9bc09543743d9e13855dcaf37ac6
7
- data.tar.gz: 32227079b3b4f5af305c61c583135005c2b53bb5b0ae24c782c234038b0fb4cff435062b7aca6e25274096a8b4c2b83bc32b01b0e6bdd82c8ede77d8c9588001
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
@@ -0,0 +1,6 @@
1
+ getting-started:
2
+ order: 1
3
+ documentation-formatting:
4
+ order: 2
5
+ github-pages-integration:
6
+ order: 3
@@ -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
- Dir.each_child(guides_root) do |entry|
161
- guide_path = File.join(guides_root, entry)
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
 
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Utopia
24
24
  module Project
25
- VERSION = "0.3.0"
25
+ VERSION = "0.4.0"
26
26
  end
27
27
  end
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.3.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