Skip to content

Commit 88708f0

Browse files
flynnduismmichelleN
authored andcommitted
adding the blog listing template and rhai
Signed-off-by: Ronan Flynn-Curran <[email protected]>
1 parent 7778788 commit 88708f0

File tree

9 files changed

+13070
-6074
lines changed

9 files changed

+13070
-6074
lines changed

config/site.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title = "Spin Docs"
22
base_url = ""
33
about = "Spin is an open-source multi-language framework and CLI for building and deploying WebAssembly apps."
4-
index_site_pages = ["sitemap", "home", "changelog", "hub_list_api", "blog"]
4+
index_site_pages = ["sitemap", "home", "changelog", "hub_list_api", "main"]
55
prepend_route_info = true
66

77
[extra]
@@ -13,3 +13,6 @@ twitter = "https://twitter.com/spinframework"
1313
favicon = "/static/image/icon/favicon.png"
1414
twitter_card_type = "summary"
1515
twitter_card = "/static/image/twitter_card_summary.png"
16+
17+
# Misc variable
18+
blog_pagition_offset = "17" # Used to control the numer of posts per page in blog list

content/blog/hello.md

Lines changed: 135 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title = "HELLO WORLD"
1+
title = "Hello World"
22
date = "2025-10-30T12:00:00Z"
33
template = "blog"
44

@@ -8,9 +8,139 @@ type = "post"
88

99
---
1010

11-
This is the beginning of our community blog. Welcome to the Spin Framework Community!
12-
<!-- Ideally, for SEO there should be an image after the first paragraph or two -->
11+
This is the beginning of our community blog. Welcome to the Spin Framework Community! This introductory paragraph demonstrates how body text appears with our new Medium-inspired typography. The comfortable 18px font size and 1.58 line height create an optimal reading experience.
1312

14-
## Let's have a good time
13+
Typography is the craft of endowing human language with a durable visual form. When done well, it enhances the reading experience without drawing attention to itself. Our new blog layout emphasizes readability through thoughtful spacing, appropriate font sizes, and a narrow reading pane that prevents eye strain.
1514

16-
More content here
15+
## Understanding Typography Fundamentals
16+
17+
Good typography serves the content. It's not about making things look "designed" but about creating a seamless reading experience. The key principles include proper hierarchy, consistent spacing, and appropriate line length. Research suggests that lines between 50-75 characters are optimal for reading comfort.
18+
19+
### The Importance of Hierarchy
20+
21+
Headings establish visual hierarchy and help readers scan content quickly. Notice how this H3 heading is smaller than the H2 above, creating a clear content structure. Each level should be visually distinct but harmonious with the overall design.
22+
23+
#### Fourth Level Headings
24+
25+
Even at the fourth level, headings maintain the typographic rhythm. They're smaller still, but remain bold and clear, guiding readers through nested sections of content.
26+
27+
## Working with Lists
28+
29+
Lists are essential for organizing information. Here's an unordered list demonstrating proper spacing and readability:
30+
31+
- **WebAssembly** enables running compiled code at near-native speed in web browsers
32+
- **Spin Framework** provides a lightweight runtime for building and deploying WebAssembly applications
33+
- **Component Model** standardizes how WebAssembly modules communicate and share functionality
34+
- **WASI** (WebAssembly System Interface) allows Wasm to interact with system resources safely
35+
36+
Ordered lists work equally well for sequential information:
37+
38+
1. First, install the Spin CLI on your development machine
39+
2. Create a new Spin application using `spin new`
40+
3. Write your application logic in your preferred language
41+
4. Build the application with `spin build`
42+
5. Deploy locally with `spin up` or to Fermyon Cloud
43+
44+
Nested lists maintain proper indentation:
45+
46+
- Backend technologies
47+
- Go provides excellent performance for system-level programming
48+
- Rust ensures memory safety without garbage collection
49+
- Python offers rapid development and extensive libraries
50+
- Frontend frameworks
51+
- Vue.js for progressive web applications
52+
- React for component-based UIs
53+
- Svelte for compiled, lightweight applications
54+
55+
## Code Examples
56+
57+
Inline code like `spin build` or `const greeting = "Hello World"` integrates seamlessly with body text. For longer examples, code blocks provide syntax highlighting:
58+
59+
```rust
60+
use spin_sdk::{
61+
http::{Request, Response},
62+
http_component,
63+
};
64+
65+
#[http_component]
66+
fn handle_request(req: Request) -> Response {
67+
Response::builder()
68+
.status(200)
69+
.header("content-type", "text/plain")
70+
.body("Hello, World!")
71+
.build()
72+
}
73+
```
74+
75+
Here's a JavaScript example:
76+
77+
```javascript
78+
async function fetchData(url) {
79+
try {
80+
const response = await fetch(url);
81+
const data = await response.json();
82+
return data;
83+
} catch (error) {
84+
console.error('Error fetching data:', error);
85+
throw error;
86+
}
87+
}
88+
```
89+
90+
And a command-line example:
91+
92+
```bash
93+
# Install Spin
94+
curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash
95+
96+
# Create a new application
97+
spin new http-rust my-app
98+
cd my-app
99+
100+
# Build and run
101+
spin build
102+
spin up
103+
```
104+
105+
## Blockquotes for Emphasis
106+
107+
Blockquotes highlight important information or quotations:
108+
109+
> The best way to predict the future is to invent it. This principle applies perfectly to WebAssembly and the Spin Framework—we're not just waiting for the future of serverless, we're building it today.
110+
111+
Longer blockquotes maintain readability:
112+
113+
> Typography exists to honor content. When text is beautifully presented, readers engage more deeply with ideas. The Medium platform understood this intuitively, creating a reading experience that prioritized comfort and clarity over flashy design. Our blog adopts these same principles.
114+
115+
## Links and References
116+
117+
Links should be [clearly marked and understandable](https://developer.fermyon.com) in context. Learn more about [Spin Framework](https://github.com/fermyon/spin) or explore the [WebAssembly specification](https://webassembly.org/).
118+
119+
## Emphasis and Strong Text
120+
121+
Use *italic emphasis* for subtle highlighting and **bold text** for stronger emphasis. Combine them ***sparingly*** for maximum impact. The key is restraint—too much emphasis dilutes its effectiveness.
122+
123+
## Tables for Data
124+
125+
| Language | Spin Support | Compile Target | Use Case |
126+
|----------|--------------|----------------|----------|
127+
| Rust | Excellent | wasm32-wasi | Systems programming, high performance |
128+
| Go | Good | wasm32-wasi | Network services, APIs |
129+
| JavaScript | Good | SpiderMonkey | Familiar syntax, quick prototyping |
130+
| Python | Experimental | wasm32-wasi | Data processing, scripting |
131+
132+
## Horizontal Rules
133+
134+
Use horizontal rules sparingly to separate major sections:
135+
136+
---
137+
138+
## Images and Media
139+
140+
Images enhance content when used purposefully. They should support the narrative rather than distract from it. Captions provide context and attribution.
141+
142+
## Conclusion
143+
144+
Great typography isn't about following strict rules—it's about understanding principles and applying them thoughtfully. Our blog design prioritizes readability through careful attention to font size, line height, line length, and spacing. The result is a comfortable reading experience that lets the content shine.
145+
146+
Whether you're writing about WebAssembly, serverless computing, or web development, these typographic foundations ensure your message reaches readers clearly and effectively. Welcome to the Spin Framework community blog—we're excited to share ideas, tutorials, and insights with you.

0 commit comments

Comments
 (0)