Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 52532a1

Browse files
author
Barrie Hadfield
committed
matching route
1 parent 08f0604 commit 52532a1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

app/components/docs/docs_page.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ class DocsPage < Hyperloop::Router::Component
44
SidebarStore.hide
55
end
66

7-
render do
7+
render(DIV) do
8+
puts match.url
89

910
sidebar = DocsSidebar(section_store: SiteStore.sections[:docs],
1011
history: history,
1112
section: 'docs').as_node
1213
body = DocsBody(section_store: SiteStore.sections[:docs]).as_node
1314
title = "Hyperloop Documentation"
1415

16+
Route('/docs/:repo', exact: true) do
17+
puts "we have a repo"
18+
end
19+
20+
Route('/docs/:repo/:file', exact: true) do
21+
puts "we have a repo and file"
22+
end
23+
24+
Route('/docs/:repo/:file/:slug', exact: true) do
25+
puts "we have a repo and file and slug"
26+
end
27+
1528
PageLayout(sidebar_component: sidebar, body_component: body, page_title: title, loaded: SiteStore.sections[:docs].loaded?)
1629

1730
end

0 commit comments

Comments
 (0)