feat: publish HoloLake model-native living system source

This commit is contained in:
冰朔 2026-08-03 10:04:41 +08:00
commit c395dd3a99
2467 changed files with 615073 additions and 0 deletions

View file

@ -0,0 +1,119 @@
import { defineConfig } from "vitepress";
const base = process.env.VITEPRESS_BASE ?? "/";
export default defineConfig({
title: "Tolaria",
description:
"Tolaria is a local-first Markdown knowledge base with native relationships, Git history, and AI workflows.",
base,
ignoreDeadLinks: [/^\/download\/?(?:index)?$/, /^\/releases\/?(?:index)?$/],
cleanUrls: true,
head: [
["link", { rel: "icon", type: "image/png", href: `${base}landing/favicon.png` }],
["meta", { property: "og:title", content: "Tolaria" }],
[
"meta",
{
property: "og:description",
content:
"A second brain for the AI era. Free forever, local-first, Markdown-based, Git-ready, and AI-friendly.",
},
],
],
themeConfig: {
logo: { src: "/landing/tolaria-icon.png", alt: "Tolaria" },
nav: [
{ text: "Start", link: "/start/install" },
{ text: "Concepts", link: "/concepts/vaults" },
{ text: "Guides", link: "/guides/capture-a-note" },
{ text: "Templates", link: "/templates/portent" },
{ text: "Downloads", link: "https://tolaria.md/download/", target: "_self", noIcon: true },
],
search: {
provider: "local",
},
sidebar: [
{
text: "Start Here",
items: [
{ text: "Install Tolaria", link: "/start/install" },
{ text: "First Launch", link: "/start/first-launch" },
{ text: "Getting Started Vault", link: "/start/getting-started-vault" },
{ text: "Open Or Create A Vault", link: "/start/open-or-create-vault" },
],
},
{
text: "Concepts",
items: [
{ text: "Vaults", link: "/concepts/vaults" },
{ text: "Notes", link: "/concepts/notes" },
{ text: "Editor", link: "/concepts/editor" },
{ text: "Spreadsheets", link: "/concepts/spreadsheets" },
{ text: "Properties", link: "/concepts/properties" },
{ text: "Types", link: "/concepts/types" },
{ text: "Relationships", link: "/concepts/relationships" },
{ text: "Files And Media", link: "/concepts/files-and-media" },
{ text: "Inbox", link: "/concepts/inbox" },
{ text: "Git", link: "/concepts/git" },
{ text: "AI", link: "/concepts/ai" },
],
},
{
text: "Guides",
items: [
{ text: "Capture A Note", link: "/guides/capture-a-note" },
{ text: "Organize The Inbox", link: "/guides/organize-inbox" },
{ text: "Use Wikilinks", link: "/guides/use-wikilinks" },
{ text: "Use Spreadsheets", link: "/guides/use-spreadsheets" },
{ text: "Create Types", link: "/guides/create-types" },
{ text: "Build Custom Views", link: "/guides/build-custom-views" },
{ text: "Connect A Git Remote", link: "/guides/connect-a-git-remote" },
{ text: "Manage Git", link: "/guides/commit-and-push" },
{ text: "Use The AI", link: "/guides/use-ai-panel" },
{ text: "Configure AI Models", link: "/guides/configure-ai-models" },
{ text: "Use The Table Of Contents", link: "/guides/use-table-of-contents" },
{ text: "Use Media Previews", link: "/guides/use-media-previews" },
{ text: "Manage Display Preferences", link: "/guides/manage-display-preferences" },
{ text: "Use The Command Palette", link: "/guides/use-command-palette" },
],
},
{
text: "Templates",
items: [
{ text: "Portent", link: "/templates/portent" },
],
},
{
text: "Reference",
items: [
{ text: "Supported Platforms", link: "/reference/supported-platforms" },
{ text: "File Layout", link: "/reference/file-layout" },
{ text: "Frontmatter Fields", link: "/reference/frontmatter-fields" },
{ text: "Spreadsheet File Format", link: "/reference/spreadsheet-format" },
{ text: "Spreadsheet Formulas", link: "/reference/spreadsheet-functions" },
{ text: "View Filters", link: "/reference/view-filters" },
{ text: "Keyboard Shortcuts", link: "/reference/keyboard-shortcuts" },
{ text: "Release Channels", link: "/reference/release-channels" },
{ text: "Contribute", link: "/reference/contribute" },
{ text: "Docs Maintenance", link: "/reference/docs-maintenance" },
],
},
{
text: "Troubleshooting",
items: [
{ text: "Vault Not Loading", link: "/troubleshooting/vault-not-loading" },
{ text: "Git Authentication", link: "/troubleshooting/git-auth" },
{ text: "AI Agent Not Found", link: "/troubleshooting/ai-agent-not-found" },
{ text: "Model Provider Connection", link: "/troubleshooting/model-provider-connection" },
{ text: "Sync Conflicts", link: "/troubleshooting/sync-conflicts" },
],
},
],
footer: {
message: "Free and open source. Local-first, Git-first, and Markdown-based.",
copyright:
"Tolaria is AGPL-3.0-or-later. The Tolaria name and logo remain covered by the project trademark policy.",
},
},
});

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,212 @@
<script setup lang="ts">
import DefaultTheme from "vitepress/theme";
import { onBeforeUnmount, onMounted, ref, watchEffect } from "vue";
import { useData } from "vitepress";
const { frontmatter } = useData();
const fallbackGithubStars = "9,946";
const githubStars = ref(fallbackGithubStars);
const githubStarsCacheKey = "tolaria:github-stars";
const githubStarsCacheTtlMs = 60 * 60 * 1000;
const githubRepoApiUrl = "https://api.github.com/repos/refactoringhq/tolaria";
type GithubStarsCache = {
stars: number;
savedAt: number;
};
const formatGithubStars = (stars: number) =>
new Intl.NumberFormat("en-US").format(stars);
const scrollClass = "tolaria-scrolled";
const landingPageClass = "tolaria-landing-page";
const updateScrollClass = () => {
document.documentElement.classList.toggle(scrollClass, window.scrollY > 8);
};
const readCachedGithubStars = (): GithubStarsCache | null => {
try {
const rawCache = window.localStorage.getItem(githubStarsCacheKey);
if (!rawCache) {
return null;
}
const parsedCache = JSON.parse(rawCache) as Partial<GithubStarsCache>;
if (
typeof parsedCache.stars !== "number" ||
typeof parsedCache.savedAt !== "number" ||
!Number.isFinite(parsedCache.stars) ||
!Number.isFinite(parsedCache.savedAt)
) {
return null;
}
return {
stars: parsedCache.stars,
savedAt: parsedCache.savedAt,
};
} catch {
return null;
}
};
const updateGithubStars = async () => {
const cachedStars = readCachedGithubStars();
if (cachedStars) {
githubStars.value = formatGithubStars(cachedStars.stars);
if (Date.now() - cachedStars.savedAt < githubStarsCacheTtlMs) {
return;
}
}
try {
const response = await fetch(githubRepoApiUrl, {
headers: { Accept: "application/vnd.github+json" },
});
if (!response.ok) {
return;
}
const repo = (await response.json()) as { stargazers_count?: unknown };
if (
typeof repo.stargazers_count !== "number" ||
!Number.isFinite(repo.stargazers_count)
) {
return;
}
window.localStorage.setItem(
githubStarsCacheKey,
JSON.stringify({
stars: repo.stargazers_count,
savedAt: Date.now(),
} satisfies GithubStarsCache),
);
githubStars.value = formatGithubStars(repo.stargazers_count);
} catch {
// Keep the cached or bundled fallback count.
}
};
watchEffect(() => {
if (typeof document === "undefined") {
return;
}
document.documentElement.classList.toggle(
landingPageClass,
Boolean(frontmatter.value.landing),
);
});
onMounted(() => {
updateScrollClass();
void updateGithubStars();
window.addEventListener("scroll", updateScrollClass, { passive: true });
});
onBeforeUnmount(() => {
window.removeEventListener("scroll", updateScrollClass);
document.documentElement.classList.remove(scrollClass);
document.documentElement.classList.remove(landingPageClass);
});
</script>
<template>
<div :class="{ 'tolaria-landing-shell': frontmatter.landing }">
<DefaultTheme.Layout>
<template #nav-bar-content-after>
<a
class="github-star-widget"
href="https://github.com/refactoringhq/tolaria"
target="_blank"
rel="noreferrer"
:aria-label="`${githubStars} GitHub stars`"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 .5C5.65.5.5 5.65.5 12c0 5.09 3.29 9.39 7.86 10.91.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.54-3.88-1.54-.52-1.33-1.28-1.68-1.28-1.68-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.76 2.7 1.25 3.36.96.1-.75.4-1.25.73-1.54-2.55-.29-5.23-1.28-5.23-5.68 0-1.25.45-2.28 1.19-3.08-.12-.29-.52-1.46.11-3.04 0 0 .97-.31 3.17 1.18A11 11 0 0 1 12 5.53c.98 0 1.97.13 2.89.39 2.2-1.49 3.17-1.18 3.17-1.18.63 1.58.23 2.75.11 3.04.74.8 1.19 1.83 1.19 3.08 0 4.41-2.69 5.38-5.25 5.67.41.36.78 1.06.78 2.14v3.18c0 .31.21.67.79.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"
/>
</svg>
<span>Star</span>
<strong>{{ githubStars }}</strong>
</a>
</template>
</DefaultTheme.Layout>
</div>
</template>
<style scoped>
.github-star-widget {
display: inline-flex;
align-items: center;
gap: 7px;
height: 34px;
margin-left: 8px;
padding: 0 10px;
border: 1px solid var(--vp-c-border);
border-radius: 7px;
color: var(--vp-c-text-1);
background: var(--vp-c-bg-soft);
font-size: 13px;
font-weight: 700;
line-height: 1;
text-decoration: none;
transition:
border-color 160ms ease,
background-color 160ms ease,
color 160ms ease;
}
.github-star-widget:hover {
color: var(--vp-c-brand-1);
border-color: color-mix(in srgb, var(--vp-c-brand-1) 38%, var(--vp-c-border));
}
.github-star-widget svg {
width: 18px;
height: 18px;
fill: currentColor;
}
.github-star-widget strong {
padding-left: 7px;
border-left: 1px solid var(--vp-c-border);
font-weight: 800;
}
@media (min-width: 1280px) {
.github-star-widget {
order: 1;
}
:global(.VPNavBar .appearance) {
order: 2;
}
}
@media (max-width: 767px) {
.github-star-widget {
height: 32px;
margin-left: 4px;
padding: 0 7px;
font-size: 12px;
}
.github-star-widget svg {
width: 17px;
height: 17px;
}
.github-star-widget span {
display: none;
}
.github-star-widget strong {
padding-left: 0;
border-left: 0;
}
}
</style>

View file

@ -0,0 +1,12 @@
import DefaultTheme from "vitepress/theme";
import LandingHome from "./LandingHome.vue";
import Layout from "./Layout.vue";
import "./styles.css";
export default {
extends: DefaultTheme,
Layout,
enhanceApp({ app }) {
app.component("LandingHome", LandingHome);
},
};

View file

@ -0,0 +1,240 @@
@font-face {
font-family: "RefactoringSans";
src: url("./assets/RefactoringSans.otf") format("opentype");
font-display: swap;
font-style: normal;
font-weight: 400 900;
}
:root {
--vp-font-family-base:
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--vp-font-family-mono: "SF Mono", "Fira Code", ui-monospace, monospace;
--tolaria-font-brand:
"RefactoringSans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
--tolaria-bg: #faf9f5;
--tolaria-surface: #ffffff;
--tolaria-surface-muted: #f7f6f3;
--tolaria-text: #1a1a18;
--tolaria-text-secondary: #6b6b60;
--tolaria-text-muted: #9b9b90;
--tolaria-border: #e5e5e0;
--tolaria-blue: #155dff;
--tolaria-blue-hover: #4a5ad6;
--tolaria-blue-soft: #e8eeff;
--vp-c-bg: var(--tolaria-surface);
--vp-c-bg-alt: var(--tolaria-surface-muted);
--vp-c-bg-elv: var(--tolaria-surface);
--vp-c-bg-soft: var(--tolaria-surface-muted);
--vp-c-text-1: var(--tolaria-text);
--vp-c-text-2: var(--tolaria-text-secondary);
--vp-c-text-3: var(--tolaria-text-muted);
--vp-c-border: var(--tolaria-border);
--vp-c-divider: var(--tolaria-border);
--vp-c-brand-1: var(--tolaria-blue);
--vp-c-brand-2: var(--tolaria-blue-hover);
--vp-c-brand-3: var(--tolaria-blue);
--vp-c-brand-soft: var(--tolaria-blue-soft);
--vp-button-brand-bg: var(--tolaria-blue);
--vp-button-brand-hover-bg: var(--tolaria-blue-hover);
--vp-button-brand-border: var(--tolaria-blue);
--vp-code-bg: #eeeeea;
--vp-code-color: var(--tolaria-text-secondary);
}
.dark {
--tolaria-bg: #1f1e1b;
--tolaria-surface: #23221f;
--tolaria-surface-muted: #191814;
--tolaria-text: #e6e1d8;
--tolaria-text-secondary: #b8b1a6;
--tolaria-text-muted: #7f776d;
--tolaria-border: #34322d;
--tolaria-blue: #78a4ff;
--tolaria-blue-hover: #9bbeff;
--tolaria-blue-soft: rgba(120, 164, 255, 0.16);
--vp-c-bg: #1f1e1b;
--vp-c-bg-alt: #191814;
--vp-c-bg-elv: #23221f;
--vp-c-bg-soft: #23221f;
--vp-c-text-1: #e6e1d8;
--vp-c-text-2: #b8b1a6;
--vp-c-text-3: #7f776d;
--vp-c-border: #34322d;
--vp-c-divider: #34322d;
--vp-c-brand-1: #78a4ff;
--vp-c-brand-2: #9bbeff;
--vp-c-brand-3: #78a4ff;
--vp-c-brand-soft: rgba(120, 164, 255, 0.16);
--vp-code-bg: #2d2b27;
--vp-code-color: #d8d1c6;
}
html,
body,
#app {
background: var(--vp-c-bg);
}
html.tolaria-landing-page,
html.tolaria-landing-page body,
html.tolaria-landing-page #app {
background: var(--tolaria-bg);
}
.VPNavBarTitle .logo {
width: auto;
height: 28px;
}
.VPNavBarTitle .title {
color: var(--vp-c-text-1);
font-family: var(--tolaria-font-brand);
font-size: 22px;
font-weight: 800;
letter-spacing: 0;
}
.tolaria-landing-shell {
--vp-c-bg: var(--tolaria-bg);
--vp-nav-bg-color: var(--tolaria-bg);
}
.tolaria-landing-shell .VPNav,
.tolaria-landing-shell .VPNavBar,
.tolaria-landing-shell .VPNavBar:not(.has-sidebar):not(.home.top),
.tolaria-landing-shell .VPNavBar:not(.home.top) .content-body,
.tolaria-landing-shell .VPNavBar .content-body {
background: var(--tolaria-bg);
background-color: var(--tolaria-bg);
backdrop-filter: blur(14px);
}
.tolaria-landing-shell .VPNavBar .wrapper,
.tolaria-landing-shell .VPNavBar .container {
width: min(100%, 1280px);
max-width: 1280px;
margin-right: auto;
margin-left: auto;
}
.tolaria-landing-shell .VPNavBar .wrapper {
padding-right: 20px;
padding-left: 20px;
}
.tolaria-landing-shell .landing-container {
width: min(100%, 1280px);
}
@media (min-width: 768px) {
.tolaria-landing-shell .VPNavBar .wrapper {
padding-right: 40px;
padding-left: 40px;
}
}
.tolaria-landing-shell .VPNavBar .divider,
.tolaria-landing-shell .VPNavBar .divider-line {
display: none;
background-color: transparent;
}
.tolaria-landing-shell .VPNavBar .divider-line {
opacity: 0;
transition: opacity 160ms ease;
}
.VPNavBar {
position: relative;
z-index: calc(var(--vp-z-index-nav) + 2);
}
.tolaria-landing-shell .VPLocalNav {
display: none;
}
.VPNavScreen {
display: block !important;
visibility: visible !important;
opacity: 1 !important;
bottom: auto !important;
height: calc(100vh - var(--vp-nav-height) - var(--vp-layout-top-height, 0px)) !important;
z-index: calc(var(--vp-z-index-nav) + 1);
background: var(--vp-c-bg);
}
.tolaria-scrolled .tolaria-landing-shell .VPNav {
box-shadow: 0 10px 24px rgba(26, 26, 24, 0.06);
}
.tolaria-scrolled .tolaria-landing-shell .VPNavBar .divider-line {
opacity: 1;
}
.DocSearch-Button {
border-radius: 999px;
}
.tolaria-landing-shell .DocSearch-Button {
border: 1px solid var(--tolaria-border);
background: var(--tolaria-surface);
}
.vp-doc h1,
.vp-doc h2,
.vp-doc h3 {
letter-spacing: 0;
}
.vp-doc a,
.VPNavBarMenuLink.active,
.VPLink.active {
color: var(--vp-c-brand-1);
}
.vp-doc table {
display: table;
width: 100%;
}
.vp-doc th {
color: var(--vp-c-text-1);
background: var(--vp-c-bg-soft);
}
.vp-doc td,
.vp-doc th {
border-color: var(--vp-c-divider);
}
.tolaria-landing-shell .VPContent,
.tolaria-landing-shell .VPPage,
.tolaria-landing-shell .VPDoc,
.tolaria-landing-shell .VPDoc .container,
.tolaria-landing-shell .VPDoc .content,
.tolaria-landing-shell .VPDoc .content-container,
.tolaria-landing-shell .VPDoc .main,
.tolaria-landing-shell .vp-doc {
max-width: none;
padding: 0;
margin: 0;
}
@media (min-width: 960px) {
.tolaria-landing-shell .VPContent {
padding-top: var(--vp-nav-height);
}
}
.tolaria-landing-shell .vp-doc > div {
width: 100%;
}
.tolaria-landing-shell .vp-doc a {
text-decoration: none;
}
.tolaria-landing-shell .VPFooter {
display: none;
}