Skip to content

Commit

Permalink
Add sitemap and canonical links to website
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaines committed Aug 28, 2024
1 parent 7219eb3 commit 6b07659
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
6 changes: 6 additions & 0 deletions packages/website/.parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@parcel/config-default",
"transformers": {
"sitemap.txt": ["@parcel/transformer-raw"]
}
}
3 changes: 2 additions & 1 deletion packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"source": [
"src/index.html",
"src/api/index.html"
"src/api/index.html",
"src/sitemap.txt"
],
"scripts": {
"build": "parcel build --no-cache --no-autoinstall",
Expand Down
3 changes: 2 additions & 1 deletion packages/website/src/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Viz.js - API</title>
<link rel="stylesheet" href="../styles/api.css">
<link rel="canonical" href="https://viz-js.com/api/">
</head>
<body>

Expand All @@ -14,7 +15,7 @@

<nav>
<ul>
<li><a href="/api">API</a></li>
<li><a href="/api/">API</a></li>
<li><a href="https://github.com/mdaines/viz-js">GitHub</a></li>
</ul>
</nav>
Expand Down
27 changes: 14 additions & 13 deletions packages/website/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Viz.js</title>
<link rel="stylesheet" href="./styles/app.css">
<link rel="canonical" href="https://viz-js.com/">
</head>
<body>

<div class="wrap">
<header>
<a href="/"><img src="./images/logo.svg" class="logo" alt="Viz.js" width="70" height="32"></a>
<div class="wrap">
<header>
<a href="/"><img src="./images/logo.svg" class="logo" alt="Viz.js" width="70" height="32"></a>

<nav>
<ul>
<li><a href="/api">API</a></li>
<li><a href="https://github.com/mdaines/viz-js">GitHub</a></li>
</ul>
</nav>
</header>
<nav>
<ul>
<li><a href="/api/">API</a></li>
<li><a href="https://github.com/mdaines/viz-js">GitHub</a></li>
</ul>
</nav>
</header>

<div id="app">
<div id="app">
</div>
</div>
</div>

<script type="module" src="./index.jsx"></script>
<script type="module" src="./index.jsx"></script>

</body>
</html>
4 changes: 4 additions & 0 deletions packages/website/src/sitemap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://viz-js.com/
https://viz-js.com/index.html
https://viz-js.com/api/
https://viz-js.com/api/index.html

0 comments on commit 6b07659

Please sign in to comment.