From acf8b588ce0a94f6d2e3317cb4f7060783bb5493 Mon Sep 17 00:00:00 2001 From: Michelle Dhanani Date: Thu, 30 Oct 2025 12:15:10 -0400 Subject: [PATCH 1/5] WIP Signed-off-by: Michelle Dhanani --- config/site.toml | 2 +- content/blog/hello.md | 17 +++++++++++++++++ content/blog/index.md | 6 ++++++ spin.toml | 10 ++++++++++ templates/blog.hbs | 24 ++++++++++++++++++++++++ templates/content_navbar.hbs | 6 +++--- 6 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 content/blog/hello.md create mode 100644 content/blog/index.md create mode 100644 templates/blog.hbs diff --git a/config/site.toml b/config/site.toml index 358dd1fd1..096507fe9 100644 --- a/config/site.toml +++ b/config/site.toml @@ -1,7 +1,7 @@ title = "Spin Docs" base_url = "" about = "Spin is an open-source multi-language framework and CLI for building and deploying WebAssembly apps." -index_site_pages = ["sitemap", "home", "changelog", "hub_list_api"] +index_site_pages = ["sitemap", "home", "changelog", "hub_list_api", "blog"] prepend_route_info = true [extra] diff --git a/content/blog/hello.md b/content/blog/hello.md new file mode 100644 index 000000000..710b5069e --- /dev/null +++ b/content/blog/hello.md @@ -0,0 +1,17 @@ +title = "HELLO WORLD" +date = "2025-10-30T15:20:11.486765Z" +template = "blog" +tags = [] + +[extra] +author = "Michelle Dhanani" +type = "post" + +--- + +This is the beginning of our community blog. Welcome to the Spin Framework Community! + + +## Let's have a good time + +More content here diff --git a/content/blog/index.md b/content/blog/index.md new file mode 100644 index 000000000..a6de6aea3 --- /dev/null +++ b/content/blog/index.md @@ -0,0 +1,6 @@ +title = "blog" +template = "blog" +date = "2025-10-29T00:22:56Z" +content_type = "application/json" + +--- diff --git a/spin.toml b/spin.toml index cec19861b..7f5841340 100644 --- a/spin.toml +++ b/spin.toml @@ -29,6 +29,11 @@ id = "trigger-hub-fileserver-static" component = "hub-fileserver-static" route = "/hub/..." +[[trigger.http]] +id = "trigger-redirect-blog-index" +component = "redirect-blog-index" +route = "/blog" + [[trigger.http]] id = "trigger-spin-version-proxy" component = "spin-version-proxy" @@ -133,3 +138,8 @@ route = "/kubernetes" [component.redirect-kubernetes] source = "modules/redirect.wasm" environment = { DESTINATION = "/deploying", STATUSCODE = "301" } + +# Redirect /blog to /blog/index +[component.redirect-blog-index] +source = "modules/redirect.wasm" +environment = { DESTINATION = "/blog/index" } diff --git a/templates/blog.hbs b/templates/blog.hbs new file mode 100644 index 000000000..c62daac31 --- /dev/null +++ b/templates/blog.hbs @@ -0,0 +1,24 @@ +{{! This adds the HTML head section and the beginning of the body. See content_top.hbs. }} +{{> content_top }} + +
+
+ +
+
+

{{{page.head.title}}}

+ {{! Since this is HTML, we use the triple-curly }} + {{{page.body}}} + {{! Remove the `!` on the line below to see how to call a Rhai script }} + {{! echo "world" }} +
+
+ +
+
+ +{{! This closes the body. See content_bottom.hbs. }} + +{{> content_cta }} + +{{> content_bottom }} \ No newline at end of file diff --git a/templates/content_navbar.hbs b/templates/content_navbar.hbs index ed31440fb..ba2ce1080 100644 --- a/templates/content_navbar.hbs +++ b/templates/content_navbar.hbs @@ -16,9 +16,9 @@