utopia 2.29.0 → 2.30.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
- checksums.yaml.gz.sig +0 -0
- data/lib/utopia/content/document.rb +21 -0
- data/lib/utopia/version.rb +1 -1
- data/setup/site/pages/_page.xnode +1 -1
- data.tar.gz.sig +1 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa5fe1e014e5d20ae6c6ffbaa8f726b6cbccf08aa4dd2b1bac371cf9ed7c1930
|
4
|
+
data.tar.gz: d8bc0da5c90f121c93f7098251513dc8ced31f2ee256ac469065e5ab248ff591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b2b3b73206fcda92d05233ff47bcae59445110e235c15b95a918344d1123be59816ca2ea39f3a5dd5cb6ca721be9c0ade13e52a281ef1ef9d5aa580518f415d
|
7
|
+
data.tar.gz: 6130dfb56637a80fb1a6e5b32bb22aa7cee7a3eaefb50b277ca4118c611c84830af79ee316ef9566720f1c1bd880f2ecf4fcc1b85021189912bceeccbb4a3cf6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -38,6 +38,27 @@ module Utopia
|
|
38
38
|
super()
|
39
39
|
end
|
40
40
|
|
41
|
+
# @returns [Path] The original request path, if known.
|
42
|
+
def request_path
|
43
|
+
Path[request.env["REQUEST_PATH"]]
|
44
|
+
end
|
45
|
+
|
46
|
+
protected def current_base_uri_path
|
47
|
+
self.current.node.uri_path
|
48
|
+
end
|
49
|
+
|
50
|
+
# Compute the relative path from the curent base uri (e.g. the node being rendered) to the request uri. This path can be used to ensure resources are loaded relative to a given path.
|
51
|
+
#
|
52
|
+
# | Relative To | Request Path | Base URI |
|
53
|
+
# |---------------|------------------------|--------------|
|
54
|
+
# | "/page" | "/index" | "" |
|
55
|
+
# | "/blog/entry" | "/blog/2025/05/my-cat" | "../.." |
|
56
|
+
#
|
57
|
+
# @returns [String] the base uri for the current page.
|
58
|
+
def base_uri(relative_to = self.current_base_uri_path)
|
59
|
+
Path[relative_to].dirname.shortest_path(request_path)
|
60
|
+
end
|
61
|
+
|
41
62
|
def [] key
|
42
63
|
@attributes[key]
|
43
64
|
end
|
data/lib/utopia/version.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
<title>Utopia</title>
|
10
10
|
<?r end ?>
|
11
11
|
|
12
|
-
<base href="#{
|
12
|
+
<base href="#{document.base_uri}"/>
|
13
13
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
14
14
|
|
15
15
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
|
2
|
-
��2E��~t�N C*8Z�W�lZ3v��.{d����t)<Z���-;t��Bc��h�����aK�݈lv
|
3
|
-
�r��>�c�E�o�_AXB%\���F���!z��q��f`_���ї�����z�qn�Җ�,�
|
1
|
+
x�F�0��:#?��N�A˖3�֚}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.30.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: 2025-
|
43
|
+
date: 2025-04-09 00:00:00.000000000 Z
|
44
44
|
dependencies:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: bake
|
metadata.gz.sig
CHANGED
Binary file
|