Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update website and zine (Zig 0.13) and fix broken links #229

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions website/build.zig
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const std = @import("std");
const zine = @import("zine");

pub fn build(b: *std.Build) !void {
pub fn build(b: *std.Build) void {
// zine.scriptyReferenceDocs(b, "content/documentation/scripty/index.md");
try zine.addWebsite(b, .{
zine.website(b, .{
.layouts_dir_path = "layouts",
.content_dir_path = "content",
.static_dir_path = "static",
.site = .{
.base_url = "https://microzig.tech",
.title = "Zig Embedded Group",
},
.host_url = "https://microzig.tech",
.title = "Zig Embedded Group",
});
}
4 changes: 2 additions & 2 deletions website/build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
.paths = .{"."},
.dependencies = .{
.zine = .{
.url = "https://github.com/kristoff-it/zine/archive/03f80646b83cadb2e693ff5d97445d3e16c8e222.tar.gz",
.hash = "1220e3e4938edf652776349c45b3bb58774d540a050034488ff8dab7dbe410cc2977",
.url = "git+https://github.com/kristoff-it/zine#e21b179b78de54ab48efe38d2378e87a56cb3542",
.hash = "1220781f118454bbc87d7efbd244b4d1ef029e76a6113ddf4752a6f3cd85879dbb3b",
Comment on lines +7 to +8
Copy link
Contributor

@EliSauder EliSauder Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest going with the tagged release since kristoff has made one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the Zig package system to know what advantage we get from using a different URL.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main version is using a well defined release version that the library creator has determined is good to go rather than a specific commit. If we want to stick with a commit that is alright, I just think using explicit versions tends to make more sense to me. Using zon, you can do something like ...#v0.4.1 as the # just expects a particular git ref.

},
},
}
12 changes: 6 additions & 6 deletions website/content/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
{
"title": "Home",
"date": "2020-07-06T00:00:00",
"author": "Felix Queißner",
"draft": false,
"layout": "getting-started.html",
"tags": []
.title = "Home",
.date = "2020-07-06T00:00:00",
MatthiasPortzel marked this conversation as resolved.
Show resolved Hide resolved
.author = "Felix Queißner",
.draft = false,
.layout = "getting-started.html",
.tags = []
}
---
Dummy, full text is implemented in the HTML file for now.
12 changes: 6 additions & 6 deletions website/content/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
{
"title": "Home",
"date": "2020-07-06T00:00:00",
"author": "Felix Queißner",
"draft": false,
"layout": "index.html",
"tags": []
.title = "Home",
.date = "2020-07-06T00:00:00",
.author = "Felix Queißner",
.draft = false,
.layout = "index.html",
.tags = []
}
---
Dummy, full text is implemented in the HTML file for now.
14 changes: 7 additions & 7 deletions website/content/tutorials/01-embedded-basics.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
{
"title": "Embedded Basics",
"date": "2020-07-06T00:00:00",
"author": "Felix Queißner",
"draft": false,
"layout": "tutorial.html",
"tags": []
.title = "Embedded Basics",
.date = "2020-07-06T00:00:00",
.author = "Felix Queißner",
.draft = false,
.layout = "tutorial.html",
.tags = []
}
---
# Embedded Basics
Expand Down Expand Up @@ -43,4 +43,4 @@ An important characteristic that's often required for an embedded system is "rea
This is simply the ability for the system to respond to an input within a hard deadline, Eg. automatic breaks for a car.
A general operating system like Linux is not suitable for these applications because it uses time sharing when scheduling tasks/programs, and unreliably responds to important signals.

## MORE COMING SOON
## MORE COMING SOON
14 changes: 7 additions & 7 deletions website/content/tutorials/02-embedded-programming.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
{
"title": "Embedded Basics",
"date": "2020-07-06T00:00:00",
"author": "Felix Queißner",
"draft": false,
"layout": "tutorial.html",
"tags": []
.title = "Embedded Basics",
.date = "2020-07-06T00:00:00",
.author = "Felix Queißner",
.draft = false,
.layout = "tutorial.html",
.tags = []
}
---
# Embedded Programming
Expand Down Expand Up @@ -60,7 +60,7 @@ The RAM will contain garbage after startup. Our variables aren't initialized and

To do this, we first have to tell the compiler to store our pre-initialized data somewhere in flash memory, so we can copy it into RAM at startup. This is done via the linker script:

```ld
```
MatthiasPortzel marked this conversation as resolved.
Show resolved Hide resolved
/* This section declares two memory regions:
* flash: 512k of non-writeable memory at position 0,
* ram: 32k of writeable memory at position 256M
Expand Down
9 changes: 4 additions & 5 deletions website/layouts/getting-started.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<extend template="base.html"/>
<extend template="base.html">

<title id="title" var="$page.title"></title>

<div id="content">
<nav id="intro-nav">
<h1><a href="/">zig embedded group</a> -&nbsp;learn</h1>
<img src="img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
<img src="/img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
</nav>

<div id="intro-grid">
Expand All @@ -30,8 +30,7 @@ <h2>generic zig learning material</h2>
<ul class="bars">
<li><a href="https://ziglang.org/documentation/master/">Language reference</a></li>
<li><a href="https://ziglearn.org/">Ziglearn</a></li>
<li><a href="https://github.com/ratfactor/ziglings">Ziglings</a></li>
<!-- <li><a href=""></a></li> -->
<li><a href="https://codeberg.org/ziglings/exercises/">Ziglings</a></li>
</ul>
</div>

Expand All @@ -51,6 +50,6 @@ <h2>external tutorials</h2>
</div>

<footer>
<img src="img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
<img src="/img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
</footer>
</div>
12 changes: 6 additions & 6 deletions website/layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<extend template="base.html"/>
<extend template="base.html">

<title id="title" var="$page.title"></title>

<div id="content">
<nav id="intro-nav">
<h1>zig embedded group</h1>
<img src="img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
<img src="/img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
</nav>

<div id="intro-grid">
Expand All @@ -32,7 +32,7 @@ <h2><svg viewBox="0 0 24 24">
</svg>important links</h2>

<ul class="bars">
<li><strong><a href="getting-started.htm">documentation / getting started</a></strong></li>
<li><strong><a href="/getting-started/">documentation / getting started</a></strong></li>
<li><a href="https://github.com/ZigEmbeddedGroup/">code</a></li>
<li><a href="https://ziglang.org/">Zig programming language</a></li>
</ul>
Expand Down Expand Up @@ -68,8 +68,8 @@ <h2><svg viewBox="0 0 24 24">
<ul class="bars">
<li><a href="https://github.com/ZigEmbeddedGroup/microzig/">microzig - Cross-Device Embedded
Framework</a></li>
<li><a href="https://github.com/ZigEmbeddedGroup/regz/">regz - SVD and ATDF Code Generator</a></li>
<li><a href="https://github.com/ZigEmbeddedGroup/uf2">uf2 - Generate UF2 files in your build</a></li>
<li><a href="https://github.com/ZigEmbeddedGroup/microzig/tree/main/tools/regz">regz - SVD and ATDF Code Generator</a></li>
<li><a href="https://github.com/ZigEmbeddedGroup/microzig/tree/main/tools/uf2">uf2 - Generate UF2 files in your build</a></li>
<li><a href="https://github.com/orgs/ZigEmbeddedGroup/repositories">read more…</a></li>
</ul>
</div>
Expand All @@ -91,6 +91,6 @@ <h2><svg viewBox="0 0 24 24">
</div>

<footer>
<img src="img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
<img src="/img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
</footer>
</div>
8 changes: 4 additions & 4 deletions website/layouts/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">

<head>
<title id="title"><super/> - Zig Embedded Group</title>
<title id="title"><super> - Zig Embedded Group</title>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand All @@ -18,11 +18,11 @@
<meta property="og:title" content="$page.title">
<meta property="og:type" content="website">

<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/style.css">
</head>

<body>
<div id="content"><super/></div>
<div id="content"><super></div>
</body>

</html>
</html>
6 changes: 3 additions & 3 deletions website/layouts/tutorial.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<extend template="base.html"/>
<extend template="base.html">

<title id="title" var="$page.title"></title>

<div id="content">
<nav id="intro-nav">
<h1>zig embedded group</h1>
<img src="img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
<img src="/img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
</nav>


<div id="page" var="$page.content"></div>

<footer>
<img src="img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
<img src="/img/ember.svg" alt="vectorized Ember, the awesome zeg mascot!">
</footer>
</div>
Loading
Loading