Skip to content

Commit c8da77e

Browse files
committed
Make the site work with a different baseurl
1 parent 52241cf commit c8da77e

27 files changed

+58
-58
lines changed

404.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ layout: default
66
<div class="container w-container">
77
<div class="width-container">
88
<div class="flex-center m-hero">
9-
<img src="/images/404-illustration.svg" alt="" class="_404-illustration">
9+
<img src="{{ site.baseurl }}/images/404-illustration.svg" alt="" class="_404-illustration">
1010
<h1 class="_404-heading">Error: 404</h1>
1111
<h3 class="_404-sub-heading">Page Not Found</h3>
1212
<a href="index.html">
13-
Go to Main Page<img src="/images/right-arrow.svg" alt="" class="arrow-icon">
13+
Go to Main Page<img src="{{ site.baseurl }}/images/right-arrow.svg" alt="" class="arrow-icon">
1414
</a>
1515
</div>
1616
</div>

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ title: Bytecode Alliance
1717
email: hello@bytecodealliance.org
1818
description: >- # this means to ignore newlines until "baseurl:"
1919
Welcome to the Bytecode Alliance
20-
baseurl: "/" # the subpath of your site, e.g. /blog
20+
# baseurl: "/" # the subpath of your site, e.g. /blog
2121
url: "https://bytecodealliance.org" # the base hostname & protocol for your site, e.g. http://example.com
2222
locale: en_US # language_territory is the default
2323
twitter_username: bytecodeallies

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
</footer>
77
<script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.4.1.min.220afd743d.js" type="text/javascript"
88
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
9-
<script src="/js/webflow.js" type="text/javascript"></script>
9+
<script src="{{ site.baseurl }}/js/webflow.js" type="text/javascript"></script>

_includes/head.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<meta charset="utf-8">
33
<title>Bytecode Alliance</title>
44
<meta content="width=device-width, initial-scale=1" name="viewport">
5-
<link href="/css/normalize.css" rel="stylesheet" type="text/css">
6-
<link href="/css/webflow.css" rel="stylesheet" type="text/css">
7-
<link href="/css/style.css" rel="stylesheet" type="text/css">
5+
<link href="{{ site.baseurl }}/css/normalize.css" rel="stylesheet" type="text/css">
6+
<link href="{{ site.baseurl }}/css/webflow.css" rel="stylesheet" type="text/css">
7+
<link href="{{ site.baseurl }}/css/style.css" rel="stylesheet" type="text/css">
88
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script>
99
<script
1010
type="text/javascript">WebFont.load({ google: { families: ["IBM Plex Sans:regular,italic,500,500italic"] } });</script>
1111
<script
1212
type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>
13-
<link href="/images/favicon.png" rel="shortcut icon" type="image/x-icon">
14-
<link href="/images/webclip.png" rel="apple-touch-icon">
13+
<link href="{{ site.baseurl }}/images/favicon.png" rel="shortcut icon" type="image/x-icon">
14+
<link href="{{ site.baseurl }}/images/webclip.png" rel="apple-touch-icon">
1515
{%- if jekyll.environment == 'production' and site.google_analytics -%}
1616
{%- include google-analytics.html -%}
1717
{%- endif -%}

_includes/nav.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
<nav data-collapse="medium" data-animation="default" data-duration="400" class="nav w-nav">
2-
<div class="container w-container"><a href="/" class="brand w-nav-brand w--current"><img
3-
src="/images/bytecode-alliance-logo.svg" width="164" alt="Bytecode Alliance logo"></a>
2+
<div class="container w-container"><a href="{{ site.baseurl }}/" class="brand w-nav-brand w--current"><img
3+
src="{{ site.baseurl }}/images/bytecode-alliance-logo.svg" width="164" alt="Bytecode Alliance logo"></a>
44
<nav role="navigation" class="nav--menu w-nav-menu">
5-
<a href="/mission" class="nav-link w-nav-link">Mission &amp; Values</a>
6-
<a href="/press/formation" class="nav-link w-nav-link">Press Releases</a>
7-
<a href="/articles" class="nav-link w-nav-link">Articles</a>
5+
<a href="{{ site.baseurl }}/mission" class="nav-link w-nav-link">Mission &amp; Values</a>
6+
<a href="{{ site.baseurl }}/press/formation" class="nav-link w-nav-link">Press Releases</a>
7+
<a href="{{ site.baseurl }}/articles" class="nav-link w-nav-link">Articles</a>
88
<a href="https://github.com/bytecodealliance/" class="github-link w-inline-block"><img
9-
src="/images/github-icon.svg" alt="" class="github"></a></nav>
9+
src="{{ site.baseurl }}/images/github-icon.svg" alt="" class="github"></a></nav>
1010
<div class="menu-button w-nav-button">
1111
<div class="w-icon-nav-menu"></div>
1212
</div>
1313
</div>
1414
</nav>
1515
<nav data-collapse="medium" data-animation="default" data-duration="200" class="nav-mobile w-nav">
16-
<div class="container w-container"><a href="/" class="brand w-nav-brand w--current"><img
17-
src="/images/bytecode-alliance-logo.svg" width="164" alt="Bytecode Alliance logo"></a>
16+
<div class="container w-container"><a href="{{ site.baseurl }}/" class="brand w-nav-brand w--current"><img
17+
src="{{ site.baseurl }}/images/bytecode-alliance-logo.svg" width="164" alt="Bytecode Alliance logo"></a>
1818
<nav role="navigation" class="nav--menu w-nav-menu">
19-
<a href="/mission" class="nav-link m-link w-nav-link">Mission &amp; Values</a>
19+
<a href="{{ site.baseurl }}/mission" class="nav-link m-link w-nav-link">Mission &amp; Values</a>
2020
<div class="separate"></div>
21-
<a href="/press/formation" class="nav-link m-link w-nav-link">Press Releases</a>
21+
<a href="{{ site.baseurl }}/press/formation" class="nav-link m-link w-nav-link">Press Releases</a>
2222
<div class="separate"></div>
23-
<a href="/articles" class="nav-link m-link w-nav-link">Articles</a>
23+
<a href="{{ site.baseurl }}/articles" class="nav-link m-link w-nav-link">Articles</a>
2424
<div class="separate"></div>
2525
<a href="https://github.com/bytecodealliance/" class="nav-link github w-nav-link">GitHub</a>
2626
<div class="separate"></div>

_posts/2019-11-21-multi-value-all-the-wasm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ And then additionally, when targeting Wasm, we also use a few more moving parts:
181181

182182
Here's a summary of the toolchain's pipeline, showing the inputs and outputs between tools:
183183

184-
<a href="/articles/img/rust-wasm-toolchain.svg"><img src="/articles/img/rust-wasm-toolchain.svg" alt="A diagram showing the pipeline of the Rust and Wasm toolchain." width="1088" height="143" class="alignleft size-full wp-image-34027" role="img" /></a>
184+
<a href="{{ site.baseurl }}/articles/img/rust-wasm-toolchain.svg"><img src="{{ site.baseurl }}/articles/img/rust-wasm-toolchain.svg" alt="A diagram showing the pipeline of the Rust and Wasm toolchain." width="1088" height="143" class="alignleft size-full wp-image-34027" role="img" /></a>
185185

186186
My goal is to unlock interface types with multi-value functions. For now, I haven't been focusing on code size wins from generating multi-value blocks. For my purposes, I only need to introduce multi-value functions at the edges of the Wasm module that talk to interface adapters; I don't need to make all function bodies use the optimal multi-value instruction sequence constructs. Therefore, I decided to have `wasm-bindgen`'s post-processor rewrite certain functions to use multi-value returns, rather than add support in LLVM.<sup id="back-llvm-multi-value">[0](#foot-note-llvm-multi-value)</sup> With this approach I only needed to add support to the following tools:
187187

@@ -518,7 +518,7 @@ Ok, so at this point, we can generate multi-value Wasm binaries with the Rust an
518518

519519
Enter [Wasmtime][], the WebAssembly runtime built on top of [the Cranelift code generator][cranelift]. Wasmtime translates WebAssembly into Cranelift's IR with the `cranelift-wasm` crate, and then Cranelift compiles the IR down to native machine code.
520520

521-
<a href="/articles/img/wasmtime-and-cranelift.svg"><img src="/articles/img/wasmtime-and-cranelift.svg" alt="Pipeline from a Wasm binary through Wasmtime and Cranelift to native code" width="887" height="169" class="alignleft size-full wp-image-34026" role="img" /></a>
521+
<a href="img/wasmtime-and-cranelift.svg"><img src="img/wasmtime-and-cranelift.svg" alt="Pipeline from a Wasm binary through Wasmtime and Cranelift to native code" width="887" height="169" class="alignleft size-full wp-image-34026" role="img" /></a>
522522

523523
Implementing multi-value Wasm support in Wasmtime and Cranelift roughly involved two steps:
524524

articles/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ layout: article
77
<li>
88
{% avatar user=post.github_name size=75 %}
99
<div>
10-
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
10+
<h2><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h2>
1111
{{ post.excerpt }}
1212
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
1313
<aside>Posted on {{ post.date | date: date_format }}</aside>

0 commit comments

Comments
 (0)