Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 5 additions & 5 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<meta property="og:type" content="website">
<meta property="og:title" content="The company | Synctune">
<meta property="og:description" content="One independent company. Room for different kinds of work. Meet Synctune and Matteo Bianchi.">
<meta property="og:url" content="https://synctune.it/about.html">
<meta property="og:url" content="https://synctune.it/about">
<meta property="og:image" content="https://synctune.it/assets/social.png">
<meta property="og:image:alt" content="Synctune's acid-citron Counterphase symbol and wordmark.">
<link rel="canonical" href="https://synctune.it/about.html">
<link rel="canonical" href="https://synctune.it/about">
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png">
<link rel="stylesheet" href="assets/styles.css">
Expand All @@ -20,9 +20,9 @@
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header wrap">
<a class="brand" href="index.html"><img src="assets/logo.svg" alt="Synctune home" width="881" height="320"></a>
<a class="brand" href="./"><img src="assets/logo.svg" alt="Synctune home" width="881" height="320"></a>
<nav class="site-nav" aria-label="Main navigation">
<a href="projects.html">All projects</a><a href="about.html" aria-current="page">The company</a><a href="#contact">Get in touch <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a href="projects">All projects</a><a href="about" aria-current="page">The company</a><a href="#contact">Get in touch <span class="arrow" aria-hidden="true">&#8599;</span></a>
</nav>
</header>
<main id="main" tabindex="-1">
Expand Down Expand Up @@ -87,7 +87,7 @@ <h2 id="privacy-title">A small website footprint.</h2>
</section>
</main>
<footer class="site-footer wrap">
<div class="footer-top"><p>Synctune. An orchestra of independent ideas. In sync.</p><nav class="footer-links" aria-label="Footer navigation"><a href="projects.html">Projects</a><a href="about.html">Company</a><a href="https://mbianchi.dev">Matteo Bianchi</a><a href="https://github.com/synctune-io">GitHub</a></nav></div>
<div class="footer-top"><p>Synctune. An orchestra of independent ideas. In sync.</p><nav class="footer-links" aria-label="Footer navigation"><a href="projects">Projects</a><a href="about">Company</a><a href="https://mbianchi.dev">Matteo Bianchi</a><a href="https://github.com/synctune-io">GitHub</a></nav></div>
<div class="footer-bottom"><span>Music / Open / Edu / Consulting / Gaming / Finance / Open Sales Engineering</span><a href="#privacy">No cookies. No tracking.</a></div>
</footer>
</body>
Expand Down
29 changes: 20 additions & 9 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ The repository root contains the finished website. There is no package manager,
framework, generator, build command or runtime service. All fonts, images, CSS
and JavaScript are local files. Do not run `npm install`.

Open `index.html` in a browser to read the site. For an HTTP preview, use any
static web server. If Python 3 is already available:
Pages link to each other by clean URL, without `.html` (`projects`,
`about#contact`). Those links need a server that maps them to files the way
GitHub Pages does, so opening `index.html` from disk shows a page but not the
links between pages. Preview with the bundled server, which uses only Node.js
built-in modules:

```sh
python3 -m http.server 8080 --bind 127.0.0.1
node scripts/serve.mjs
```

Visit `http://127.0.0.1:8080`. Stop the server with Ctrl+C.
Python is an optional preview tool, not a website dependency.
Visit `http://127.0.0.1:8080`; add `--port 3000` to use another port. Stop the
server with Ctrl+C. Like GitHub Pages, it serves `/about` from `about.html`,
still serves `.html` addresses, and answers anything else with `404.html` and
status 404. It serves only the published files. Node.js is an optional preview
tool, not a website dependency, and `scripts/` is not published.

## Set up GitHub Pages

Expand Down Expand Up @@ -68,8 +74,11 @@ standard `GITHUB_TOKEN` and GitHub's OIDC token.

The workflow does not run Jekyll. `CNAME`, `robots.txt` and `sitemap.xml` already
describe the intended hostname. Asset and internal-page links are relative,
so the content also works under a Pages repository path. Canonical and
social-preview URLs intentionally use the final custom domain.
so the content also works under a Pages repository path. Page links omit
`.html` (`projects`, `about`, `./` for the home page); GitHub Pages serves
`/about` from `about.html`, and old `.html` addresses keep working. Canonical,
social-preview and sitemap URLs intentionally use the final custom domain with
the same clean URLs, such as `https://synctune.it/projects`.

Deploy each site independently. Links to other Synctune subdomains will work
when their owners deploy those sites. Denote, Open Playlist, Open Playlist
Expand All @@ -79,8 +88,10 @@ their websites.
## Other static hosts

Publish the repository root as static files. Leave the install and build
commands empty. The site needs no environment variables, API keys, rewrites,
server functions or network API.
commands empty. The site needs no environment variables, API keys, server
functions or network API, but the host must serve clean URLs as GitHub Pages
does: `/about` from `about.html`. Enable the host's clean URL option if that is
not its default.

`404.html` is a standalone fallback. GitHub Pages uses it for missing paths;
on another host, select it as the not-found page if required.
5 changes: 4 additions & 1 deletion docs/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ The Gaming history entry briefly mentions Global Game Jam 2019 in Milan.

## Before publishing a change

Check internal pages, anchors, local assets, project destinations and the
Link pages without `.html` (`projects`, `about#privacy`, `./` for the home
page) and use the same clean URLs in canonical, `og:url` and `sitemap.xml`.
Preview with `node scripts/serve.mjs` (see [deployment](deployment.md)) and
check internal pages, anchors, local assets, project destinations and the
custom-domain files. Preview narrow and wide layouts, use the keyboard, try the
directory search and reset, and reload with JavaScript disabled. Check that the
font licenses remain present. No install or build step is required.
20 changes: 10 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header wrap">
<a class="brand" href="index.html"><img src="assets/logo.svg" alt="Synctune home" width="881" height="320"></a>
<a class="brand" href="./"><img src="assets/logo.svg" alt="Synctune home" width="881" height="320"></a>
<nav class="site-nav" aria-label="Main navigation">
<a href="projects.html">All projects</a>
<a href="about.html">The company</a>
<a href="about.html#contact">Get in touch <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a href="projects">All projects</a>
<a href="about">The company</a>
<a href="about#contact">Get in touch <span class="arrow" aria-hidden="true">&#8599;</span></a>
</nav>
</header>
<main id="main" tabindex="-1">
Expand All @@ -35,8 +35,8 @@
<h1 id="hero-title">An orchestra of independent ideas.<br><span class="accent">In sync.</span></h1>
<p>We build software for the things we care about. Making music. Owning our tools. Learning something difficult. Finding a better way to work.</p>
<div class="actions">
<a class="button" href="projects.html">Explore the projects <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a class="text-link" href="about.html">Meet Synctune</a>
<a class="button" href="projects">Explore the projects <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a class="text-link" href="about">Meet Synctune</a>
</div>
</div>
<div class="switchboard">
Expand Down Expand Up @@ -87,7 +87,7 @@ <h1 id="hero-title">An orchestra of independent ideas.<br><span class="accent">I
<div class="wrap">
<div class="section-heading">
<div><p class="eyebrow">A few things we are building</p><h2 id="selected-title">Different problems.<br>Real projects.</h2></div>
<a class="text-link" href="projects.html">See the complete portfolio <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a class="text-link" href="projects">See the complete portfolio <span class="arrow" aria-hidden="true">&#8599;</span></a>
</div>
<div class="featured-grid">
<article class="featured theme-open">
Expand Down Expand Up @@ -120,7 +120,7 @@ <h3>Denote</h3>
<div class="statement-copy">
<p>Synctune brings together Matteo Bianchi's software, creative work and independent projects. Some are open source. Some are commercial. Others are still taking shape.</p>
<p>Make your music library portable with <a href="https://music.synctune.it">Synctune Music's</a> <a href="https://open-playlist.synctune.it">Open Playlist</a> and <a href="https://op-engine.synctune.it">Open Playlist Engine</a>. Write in <a href="https://denote.synctune.it">Denote</a>, or work with coding agents in <a href="https://moguri.synctune.it">Moguri</a>.</p>
<a class="text-link" href="about.html">The company and the person behind it <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a class="text-link" href="about">The company and the person behind it <span class="arrow" aria-hidden="true">&#8599;</span></a>
</div>
</div>
</section>
Expand All @@ -133,10 +133,10 @@ <h2>Have something<br>worth building?</h2>
<div class="footer-top">
<p>Synctune. An orchestra of independent ideas. In sync.</p>
<nav class="footer-links" aria-label="Footer navigation">
<a href="projects.html">Projects</a><a href="about.html">Company</a><a href="https://mbianchi.dev">Matteo Bianchi</a><a href="https://github.com/synctune-io">GitHub</a>
<a href="projects">Projects</a><a href="about">Company</a><a href="https://mbianchi.dev">Matteo Bianchi</a><a href="https://github.com/synctune-io">GitHub</a>
</nav>
</div>
<div class="footer-bottom"><span>Music / Open / Edu / Consulting / Gaming / Finance / Open Sales Engineering</span><a href="about.html#privacy">No cookies. No tracking.</a></div>
<div class="footer-bottom"><span>Music / Open / Edu / Consulting / Gaming / Finance / Open Sales Engineering</span><a href="about#privacy">No cookies. No tracking.</a></div>
</footer>
</body>
</html>
12 changes: 6 additions & 6 deletions projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<meta property="og:type" content="website">
<meta property="og:title" content="All projects | Synctune">
<meta property="og:description" content="Explore Synctune's software, music, games and creative projects.">
<meta property="og:url" content="https://synctune.it/projects.html">
<meta property="og:url" content="https://synctune.it/projects">
<meta property="og:image" content="https://synctune.it/assets/social.png">
<meta property="og:image:alt" content="Synctune's acid-citron Counterphase symbol and wordmark.">
<link rel="canonical" href="https://synctune.it/projects.html">
<link rel="canonical" href="https://synctune.it/projects">
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="assets/apple-touch-icon.png">
<link rel="stylesheet" href="assets/styles.css">
Expand All @@ -21,9 +21,9 @@
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header wrap">
<a class="brand" href="index.html"><img src="assets/logo.svg" alt="Synctune home" width="881" height="320"></a>
<a class="brand" href="./"><img src="assets/logo.svg" alt="Synctune home" width="881" height="320"></a>
<nav class="site-nav" aria-label="Main navigation">
<a href="projects.html" aria-current="page">All projects</a><a href="about.html">The company</a><a href="about.html#contact">Get in touch <span class="arrow" aria-hidden="true">&#8599;</span></a>
<a href="projects" aria-current="page">All projects</a><a href="about">The company</a><a href="about#contact">Get in touch <span class="arrow" aria-hidden="true">&#8599;</span></a>
</nav>
</header>
<main id="main" class="wrap" tabindex="-1">
Expand Down Expand Up @@ -137,8 +137,8 @@ <h1 id="portfolio-title">Follow your<br><span class="accent">curiosity.</span></
<aside class="section" aria-label="Project availability"><p class="note">This is a hand-maintained directory, not a live release feed. Public source does not imply a finished release. Some projects still use Matteo's GitHub namespace while organization transfers are pending. Private projects have no repository link.</p></aside>
</main>
<footer class="site-footer wrap">
<div class="footer-top"><p>Synctune. An orchestra of independent ideas. In sync.</p><nav class="footer-links" aria-label="Footer navigation"><a href="projects.html">Projects</a><a href="about.html">Company</a><a href="https://mbianchi.dev">Matteo Bianchi</a><a href="https://github.com/synctune-io">GitHub</a></nav></div>
<div class="footer-bottom"><span>Music / Open / Edu / Consulting / Gaming / Finance / Open Sales Engineering</span><a href="about.html#privacy">No cookies. No tracking.</a></div>
<div class="footer-top"><p>Synctune. An orchestra of independent ideas. In sync.</p><nav class="footer-links" aria-label="Footer navigation"><a href="projects">Projects</a><a href="about">Company</a><a href="https://mbianchi.dev">Matteo Bianchi</a><a href="https://github.com/synctune-io">GitHub</a></nav></div>
<div class="footer-bottom"><span>Music / Open / Edu / Consulting / Gaming / Finance / Open Sales Engineering</span><a href="about#privacy">No cookies. No tracking.</a></div>
</footer>
</body>
</html>
119 changes: 119 additions & 0 deletions scripts/serve.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
// Local preview that serves the published files the way GitHub Pages does.
// Node built-ins only.
// node scripts/serve.mjs http://127.0.0.1:8080
// node scripts/serve.mjs --port 3000
//
// /foo serves foo.html
// /dir/ serves dir/index.html
// /dir redirects (301) to /dir/ when only dir/index.html exists
// /foo.html is still served
// anything else returns 404.html with status 404
import { createServer } from 'node:http';
import { readFile, stat } from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const portArg = process.argv.indexOf('--port');
const port = Number(portArg === -1 ? process.env.PORT || 8080 : process.argv[portArg + 1]);
const host = '127.0.0.1';
if (!Number.isInteger(port) || port < 0 || port > 65535) {
console.error(`Invalid port: ${portArg === -1 ? process.env.PORT : process.argv[portArg + 1]}`);
process.exit(1);
}

// Mirrors the public files packaged by .github/workflows/pages.yml.
const publishedDirs = ['assets'];
const publishedRootFiles = ['robots.txt', 'sitemap.xml', 'CNAME', '.nojekyll'];
const isPublished = (rel) => {
const [first, ...rest] = rel.split('/');
if (rest.length) return publishedDirs.includes(first);
return first.endsWith('.html') || publishedRootFiles.includes(first);
};

const types = {
'.html': 'text/html; charset=utf-8',
'.css': 'text/css; charset=utf-8',
'.js': 'text/javascript; charset=utf-8',
'.svg': 'image/svg+xml',
'.png': 'image/png',
'.jpg': 'image/jpeg',
'.jpeg': 'image/jpeg',
'.webp': 'image/webp',
'.avif': 'image/avif',
'.ttf': 'font/ttf',
'.ico': 'image/x-icon',
'.xml': 'application/xml; charset=utf-8',
'.txt': 'text/plain; charset=utf-8',
'.json': 'application/json; charset=utf-8',
};

async function publishedFile(rel) {
if (!rel || !isPublished(rel)) return null;
try {
return (await stat(path.join(root, rel))).isFile() ? rel : null;
} catch {
return null;
}
}

async function resolve(pathname) {
const segments = pathname.split('/').slice(1);
if (segments.some((segment) => segment === '..' || segment === '.' || segment.includes('\\') || segment.includes('\0'))) {
return { status: 404 };
}
const rel = segments.join('/');
if (rel === '' || rel.endsWith('/')) {
const file = await publishedFile(`${rel}index.html`);
return file ? { status: 200, file } : { status: 404 };
}
const exact = await publishedFile(rel);
if (exact) return { status: 200, file: exact };
const page = await publishedFile(`${rel}.html`);
if (page) return { status: 200, file: page };
if (await publishedFile(`${rel}/index.html`)) return { status: 301, location: `${pathname}/` };
return { status: 404 };
}

const server = createServer(async (request, response) => {
const url = new URL(request.url, `http://${request.headers.host || host}`);
if (request.method !== 'GET' && request.method !== 'HEAD') {
response.writeHead(405, { allow: 'GET, HEAD' }).end();
return;
}
let pathname;
try {
pathname = decodeURIComponent(url.pathname);
} catch {
pathname = null;
}
const result = pathname ? await resolve(pathname) : { status: 404 };
if (result.status === 301) {
response.writeHead(301, { location: `${encodeURI(result.location)}${url.search}` }).end();
console.log(`301 ${url.pathname}`);
return;
}
const file = result.file ?? '404.html';
let body;
try {
body = await readFile(path.join(root, file));
} catch (error) {
response.writeHead(500).end();
console.error(`500 ${url.pathname}: ${error.message}`);
return;
}
response.writeHead(result.status, {
'content-type': types[path.extname(file).toLowerCase()] ?? 'application/octet-stream',
'content-length': body.length,
'cache-control': 'no-store',
});
response.end(request.method === 'HEAD' ? undefined : body);
console.log(`${result.status} ${url.pathname}`);
});

server.on('error', (error) => {
console.error(`Preview server failed: ${error.message}`);
process.exitCode = 1;
});

server.listen(port, host, () => console.log(`Previewing on http://${host}:${port}/ (Ctrl+C to stop)`));
4 changes: 2 additions & 2 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://synctune.it/</loc></url>
<url><loc>https://synctune.it/projects.html</loc></url>
<url><loc>https://synctune.it/about.html</loc></url>
<url><loc>https://synctune.it/projects</loc></url>
<url><loc>https://synctune.it/about</loc></url>
</urlset>