-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobservablehq.config.js
More file actions
69 lines (61 loc) · 3.07 KB
/
observablehq.config.js
File metadata and controls
69 lines (61 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import {slugMap} from "./src/lang-map.js";
// Observable Framework configuration
export default {
title: "The D-AI-LY",
// Base path for subdirectory deployment (dshkol.com/thedaily)
base: "/thedaily",
// GoatCounter analytics
head: `<script data-goatcounter="https://dshkol.goatcounter.com/count" async src="https://gc.zgo.at/count.js"></script>`,
root: "docs",
output: "dist",
style: "style.css",
// Clean, minimal theme
theme: "light",
// Disable sidebar and TOC for article-focused layout
sidebar: false,
toc: false,
search: true,
pager: false,
// Clean header matching the original static site
// Note: Links use defined base path (/thedaily) for subdirectory deployment
header: `<div style="display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.8125rem; letter-spacing: 0.02em; padding: 0.5rem 0; border-bottom: 3px solid #AF3C43; margin-bottom: 1.5rem;">
<a id="home-link" href="/" style="font-weight: 600; text-decoration: none; color: #AF3C43; text-transform: uppercase;">The D-AI-LY</a>
<span style="color: #999;">|</span>
<span style="color: #666; text-transform: uppercase; font-size: 0.6875rem;">An AI-Generated Statistical Bulletin</span>
<span style="flex: 1;"></span>
<a id="explore-link" href="/en/explore/" style="text-decoration: none; color: #666; font-size: 0.75rem;">Explore</a>
<a id="lang-en" href="/en/" style="text-decoration: none; color: #666; font-size: 0.75rem; margin-left: 0.75rem;">English</a>
<a id="lang-fr" href="/fr/" style="text-decoration: none; color: #666; font-size: 0.75rem; margin-left: 0.75rem;">Français</a>
</div>
<script>
(function() {
const base = '/thedaily';
const slugMap = ${JSON.stringify(slugMap)};
const path = window.location.pathname;
const enMatch = path.match(/\\/thedaily\\/en\\/([^\\/]+)/);
const frMatch = path.match(/\\/thedaily\\/fr\\/([^\\/]+)/);
const exploreLink = document.getElementById('explore-link');
if (enMatch) {
const enSlug = enMatch[1];
const frSlug = slugMap[enSlug] || enSlug;
document.getElementById('lang-fr').href = base + '/fr/' + frSlug + '/';
document.getElementById('lang-en').href = path;
exploreLink.href = base + '/en/explore/';
} else if (frMatch) {
const frSlug = frMatch[1];
const enSlug = Object.keys(slugMap).find(k => slugMap[k] === frSlug) || frSlug;
document.getElementById('lang-en').href = base + '/en/' + enSlug + '/';
document.getElementById('lang-fr').href = path;
exploreLink.href = base + '/fr/explore/';
exploreLink.textContent = 'Explorer';
} else if (path.includes('/fr/')) {
exploreLink.href = base + '/fr/explore/';
exploreLink.textContent = 'Explorer';
}
})();
</script>`,
footer: `<p style="font-size: 0.75rem; color: #999; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #ddd;">
Data: <a href="https://www.statcan.gc.ca" style="color: #666;">Statistics Canada</a>.
Generated by an experimental AI system. Not an official publication.
</p>`
};