2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-07-06 02:52:02 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
d73ae7fb99
fix: routing for index pages 2025-06-12 19:52:33 -04:00
681e1127f4
fix: hilbish icon url 2025-06-12 19:44:42 -04:00
51d8e7b42e
fix: links on nav 2025-06-12 19:42:12 -04:00

View File

@ -116,16 +116,12 @@ pub fn main() {
|> ssg.add_static_dir("static")
|> ssg.add_static_route("/", create_page(index.page()))
|> list.fold(posts, _, fn(config, post) {
let route = case { post.1 }.name {
"_index" -> post.0 |> string.drop_end("_index" |> string.length())
_ -> post.0
}
let page = case is_doc_page(post.0) {
True -> doc.page(post.1, doc_pages)
False -> doc.page(post.1, doc_pages)
}
ssg.add_static_route(config, route, create_page(page))
io.debug(post.0)
ssg.add_static_route(config, post.0, create_page(page))
})
|> ssg.use_index_routes
|> ssg.build
@ -160,7 +156,7 @@ fn nav() -> element.Element(a) {
[attribute.href("/"), attribute.class("flex items-center gap-1")],
[
html.img([
attribute.src("/hilbish-flower.png"),
attribute.src(conf.base_url_join("hilbish-flower.png")),
attribute.class("h-16"),
]),
html.span([attribute.class("self-center text-3xl font-medium")], [
@ -173,10 +169,18 @@ fn nav() -> element.Element(a) {
html.div(
[attribute.class("flex gap-3 dark:text-pink-300 text-pink-600")],
[
html.a([attribute.href("/")], [element.text("Home")]),
html.a([attribute.href("/install")], [element.text("Install")]),
html.a([attribute.href("/docs")], [element.text("Docs")]),
html.a([attribute.href("/blog")], [element.text("Blog")]),
html.a([attribute.href(conf.base_url_join(""))], [
element.text("Home"),
]),
html.a([attribute.href(conf.base_url_join("/install"))], [
element.text("Install"),
]),
html.a([attribute.href(conf.base_url_join("/docs"))], [
element.text("Docs"),
]),
html.a([attribute.href(conf.base_url_join("/blog"))], [
element.text("Blog"),
]),
],
),
],
@ -199,7 +203,7 @@ fn footer() -> element.Element(a) {
],
[
html.img([
attribute.src("/hilbish-flower.png"),
attribute.src(conf.base_url_join("hilbish-flower.png")),
attribute.class("h-24"),
]),
html.span([attribute.class("self-center text-6xl")], [