Split configs and add Hooks
Fixes icon color being wrong Adds hooks based off of paullaros work News section which generates RSS Dynamic meta with frontmatter support Automatic sitemap Co-Authored-By: Paul Laros <1512219+paullaros@users.noreply.github.com>
BIN
.github/assets/logo.png
vendored
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.7 KiB |
@ -45,10 +45,10 @@
|
||||
<div>
|
||||
<p align="center">
|
||||
<a href="https://github.com/tachiyomiorg/tachiyomi/">
|
||||
<img src="https://github-readme-stats.vercel.app/api/pin/?username=tachiyomiorg&repo=tachiyomi&bg_color=161B22&text_color=c9d1d9&title_color=5A67D8&icon_color=5A67D8&border_radius=8&hide_border=true" alt="Android App">
|
||||
<img src="https://github-readme-stats.vercel.app/api/pin/?username=tachiyomiorg&repo=tachiyomi&bg_color=161B22&text_color=c9d1d9&title_color=818CF8&icon_color=818CF8&border_radius=8&hide_border=true" alt="Android App">
|
||||
</a>
|
||||
<a href="https://github.com/tachiyomiorg/tachiyomi-extensions/">
|
||||
<img src="https://github-readme-stats.vercel.app/api/pin/?username=tachiyomiorg&repo=tachiyomi-extensions&bg_color=161B22&text_color=c9d1d9&title_color=5A67D8&icon_color=5A67D8&border_radius=8&hide_border=true" alt="App Extensions">
|
||||
<img src="https://github-readme-stats.vercel.app/api/pin/?username=tachiyomiorg&repo=tachiyomi-extensions&bg_color=161B22&text_color=c9d1d9&title_color=818CF8&icon_color=818CF8&border_radius=8&hide_border=true" alt="App Extensions">
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
83
package-lock.json
generated
@ -8,11 +8,16 @@
|
||||
"name": "tachiyomi-website",
|
||||
"version": "3.0.0",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"vitepress-plugin-auto-sidebar": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"feed": "^4.2.2",
|
||||
"markdownlint": "^0.29.0",
|
||||
"markdownlint-cli": "^0.35.0",
|
||||
"prettier": "^3.0.0",
|
||||
"sentences-per-line": "^0.2.1",
|
||||
"sitemap": "^7.1.1",
|
||||
"vitepress": "^1.0.0-beta.5",
|
||||
"vue": "^3.3.4"
|
||||
}
|
||||
@ -296,6 +301,21 @@
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.45",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz",
|
||||
"integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/web-bluetooth": {
|
||||
"version": "0.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.17.tgz",
|
||||
@ -665,6 +685,12 @@
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
||||
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
@ -815,6 +841,18 @@
|
||||
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/feed": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz",
|
||||
"integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/focus-trap": {
|
||||
"version": "7.5.2",
|
||||
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.2.tgz",
|
||||
@ -1218,6 +1256,12 @@
|
||||
"run-con": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/search-insights": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.7.0.tgz",
|
||||
@ -1334,6 +1378,25 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/sitemap": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz",
|
||||
"integrity": "sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "^17.0.5",
|
||||
"@types/sax": "^1.2.1",
|
||||
"arg": "^5.0.0",
|
||||
"sax": "^1.2.4"
|
||||
},
|
||||
"bin": {
|
||||
"sitemap": "dist/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0",
|
||||
"npm": ">=5.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
@ -1549,6 +1612,14 @@
|
||||
"vitepress": "bin/vitepress.js"
|
||||
}
|
||||
},
|
||||
"node_modules/vitepress-plugin-auto-sidebar": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vitepress-plugin-auto-sidebar/-/vitepress-plugin-auto-sidebar-1.1.0.tgz",
|
||||
"integrity": "sha512-LgkpjKVlNlQS54PFv5R/Y4+CHtHoXsJ3xgyVTKNi0sG1fXUmViKCg3Hnl9eo/SfNn894qsNRXoNneQmRBP2Lmw==",
|
||||
"engines": {
|
||||
"node": "^14.13.1 || ^16.7.0 || >=18"
|
||||
}
|
||||
},
|
||||
"node_modules/vitepress/node_modules/vite": {
|
||||
"version": "4.4.0-beta.3",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.0-beta.3.tgz",
|
||||
@ -1734,6 +1805,18 @@
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/xml-js": {
|
||||
"version": "1.6.11",
|
||||
"resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz",
|
||||
"integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"sax": "^1.2.4"
|
||||
},
|
||||
"bin": {
|
||||
"xml-js": "bin/cli.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,12 @@
|
||||
"lint:mdl": "markdownlint \"**/*.md\" \".github/**/*.md\" --enable sentences-per-line --disable MD025 MD033"
|
||||
},
|
||||
"devDependencies": {
|
||||
"feed": "^4.2.2",
|
||||
"markdownlint": "^0.29.0",
|
||||
"markdownlint-cli": "^0.35.0",
|
||||
"prettier": "^3.0.0",
|
||||
"sentences-per-line": "^0.2.1",
|
||||
"sitemap": "^7.1.1",
|
||||
"vitepress": "^1.0.0-beta.5",
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
@ -34,5 +36,8 @@
|
||||
"*": [
|
||||
"prettier --write --ignore-unknown"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"vitepress-plugin-auto-sidebar": "^1.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,165 +0,0 @@
|
||||
import { defineConfig, loadEnv } from "vitepress";
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default ({ mode }) => {
|
||||
// Load app-level env vars to node-level env vars.
|
||||
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
|
||||
|
||||
return defineConfig({
|
||||
lang: "en-US",
|
||||
title: "Tachiyomi",
|
||||
description: "Free and open source manga reader for Android",
|
||||
|
||||
lastUpdated: true,
|
||||
cleanUrls: true,
|
||||
|
||||
// Base directory, enabling override ability needed for GitHub Pages
|
||||
base: process.env.VITE_BASE || "/",
|
||||
|
||||
head: [
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
name: "theme-color",
|
||||
content: "#818CF8",
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
logo: "/logo.png",
|
||||
|
||||
nav: nav(),
|
||||
|
||||
sidebar: {
|
||||
"/docs/": sidebarGuide(),
|
||||
"/forks/": sidebarGuide(),
|
||||
},
|
||||
|
||||
outline: [2, 3],
|
||||
|
||||
socialLinks: [
|
||||
{ icon: "github", link: "https://github.com/tachiyomiorg/tachiyomi" },
|
||||
{ icon: "twitter", link: "https://twitter.com/tachiyomiorg" },
|
||||
{ icon: "facebook", link: "https://facebook.com/tachiyomiorg" },
|
||||
{ icon: "discord", link: "https://discord.gg/tachiyomi" },
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: "<strong><a href='https://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Open-source Apache Licensed</a></strong> | <strong><a href='./privacy'>Privacy policy</a></strong>",
|
||||
copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`,
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: "https://github.com/xhenos/kodo/edit/v3-vitepress/src/:path",
|
||||
text: "Help us improve this page",
|
||||
},
|
||||
|
||||
lastUpdated: {
|
||||
text: "Last updated",
|
||||
formatOptions: {
|
||||
dateStyle: "long",
|
||||
timeStyle: "short",
|
||||
},
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
function nav() {
|
||||
return [
|
||||
{
|
||||
text: "Documentation",
|
||||
link: "/docs/guides/getting-started",
|
||||
activeMatch: "/docs/",
|
||||
},
|
||||
{
|
||||
text: "0.14.6",
|
||||
items: [
|
||||
{
|
||||
text: "Download",
|
||||
link: "/download",
|
||||
},
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/tachiyomiorg/tachiyomi/releases/latest",
|
||||
},
|
||||
{
|
||||
text: "Contributing",
|
||||
link: "https://github.com/tachiyomiorg/tachiyomi/blob/master/CONTRIBUTING.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function sidebarGuide() {
|
||||
return [
|
||||
{
|
||||
text: "Frequently Asked Questions",
|
||||
items: [
|
||||
{ text: "General", link: "/docs/faq/general" },
|
||||
{
|
||||
text: "Application",
|
||||
link: "/docs/faq/application/",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Library", link: "/docs/faq/application/library" },
|
||||
{
|
||||
text: "Browse",
|
||||
link: "/docs/faq/application/browse/",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "Reading with Local Source",
|
||||
link: "/docs/faq/application/browse/reading-with-local-source",
|
||||
},
|
||||
],
|
||||
},
|
||||
{ text: "Downloads", link: "/docs/faq/application/downloads" },
|
||||
{ text: "Reader", link: "/docs/faq/application/reader" },
|
||||
{ text: "User interface", link: "/docs/faq/application/user-interface" },
|
||||
{ text: "Android 11+", link: "/docs/faq/application/android-11+" },
|
||||
{ text: "Shizuku", link: "/docs/faq/application/shizuku" },
|
||||
],
|
||||
},
|
||||
{ text: "Extensions", link: "/docs/faq/extensions" },
|
||||
{ text: "Miscellaneous", link: "/docs/faq/miscellaneous" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Guides",
|
||||
items: [
|
||||
{ text: "Getting started", link: "/docs/guides/getting-started" },
|
||||
{ text: "Troubleshooting", link: "/docs/guides/troubleshooting" },
|
||||
{ text: "Source migration", link: "/docs/guides/source-migration" },
|
||||
{ text: "Backups", link: "/docs/guides/backups" },
|
||||
{ text: "Tracking", link: "/docs/guides/tracking" },
|
||||
{ text: "Categories", link: "/docs/guides/categories" },
|
||||
{ text: "Local manga", link: "/docs/guides/local-manga" },
|
||||
{ text: "Reader settings", link: "/docs/guides/reader-settings" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Contribution",
|
||||
link: "/docs/contribution",
|
||||
},
|
||||
{
|
||||
text: "Download",
|
||||
link: "/download",
|
||||
},
|
||||
{
|
||||
text: "Extensions",
|
||||
link: "/extensions",
|
||||
},
|
||||
{
|
||||
text: "Forks",
|
||||
link: "/forks/",
|
||||
},
|
||||
];
|
||||
}
|
22
src/.vitepress/config/head.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import type { HeadConfig } from "vitepress";
|
||||
|
||||
const head: HeadConfig[] = [
|
||||
["meta", { name: "theme-color", content: "#818CF8" }],
|
||||
|
||||
["meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }],
|
||||
["meta", { name: "referrer", content: "no-referrer-when-downgrade" }],
|
||||
|
||||
["link", { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
|
||||
["link", { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" }],
|
||||
["link", { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png" }],
|
||||
["link", { rel: "apple-touch-icon", type: "image/x-icon", sizes: "180x180", href: "/favicon.ico" }],
|
||||
|
||||
["meta", { name: "twitter:card", content: "summary_large_image" }],
|
||||
["meta", { name: "twitter:site", content: "@tachiyomiorg" }],
|
||||
["meta", { name: "twitter:creator", content: "@tachiyomiorg" }],
|
||||
|
||||
["meta", { property: "og:site_name", content: "Tachiyomi" }],
|
||||
["meta", { property: "og:locale", content: "en_US" }],
|
||||
];
|
||||
|
||||
export default head;
|
48
src/.vitepress/config/hooks/generateFeed.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import path from "path";
|
||||
import { writeFileSync } from "fs";
|
||||
import { Feed } from "feed";
|
||||
import { createContentLoader, type SiteConfig } from "vitepress";
|
||||
|
||||
async function generateFeed(config: SiteConfig, hostname: string) {
|
||||
const feed = new Feed({
|
||||
title: "Tachiyomi",
|
||||
description: "Free and open source manga reader for Android",
|
||||
id: hostname,
|
||||
link: hostname,
|
||||
language: "en",
|
||||
image: `${hostname}/img/logo.png`,
|
||||
favicon: `${hostname}/favicon.ico`,
|
||||
copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`,
|
||||
});
|
||||
|
||||
const posts = await createContentLoader("news/*.md", {
|
||||
excerpt: true,
|
||||
render: true,
|
||||
}).load();
|
||||
|
||||
// Filter everything that"s not of type `article` (e.g. index.md)
|
||||
const filteredPosts = posts.filter((post) => post.frontmatter.type === "article");
|
||||
|
||||
filteredPosts.sort((a, b) => +new Date(b.frontmatter.date as string) - +new Date(a.frontmatter.date as string));
|
||||
|
||||
for (const { url, excerpt, frontmatter, html } of filteredPosts) {
|
||||
const fullUrl = `${hostname}${url}`;
|
||||
|
||||
// Strip `​` from `html` string
|
||||
const content = html?.replace(/​/g, "");
|
||||
|
||||
feed.addItem({
|
||||
title: frontmatter.title,
|
||||
id: fullUrl,
|
||||
link: fullUrl,
|
||||
// description: excerpt,
|
||||
description: frontmatter.description,
|
||||
content: content,
|
||||
date: frontmatter.date,
|
||||
});
|
||||
}
|
||||
|
||||
writeFileSync(path.join(config.outDir, "feed.rss"), feed.rss2());
|
||||
}
|
||||
|
||||
export default generateFeed;
|
43
src/.vitepress/config/hooks/generateMeta.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import type { HeadConfig, TransformContext } from "vitepress";
|
||||
|
||||
const generateMeta = (context: TransformContext, hostname: string) => {
|
||||
const head: HeadConfig[] = [];
|
||||
const { pageData } = context;
|
||||
|
||||
const url = `${hostname}/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, "$2")}`;
|
||||
|
||||
head.push(["link", { rel: "canonical", href: url }]);
|
||||
|
||||
head.push(["meta", { property: "og:url", content: url }]);
|
||||
head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]);
|
||||
head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]);
|
||||
head.push(["meta", { property: "og:description", content: pageData.frontmatter.description }]);
|
||||
|
||||
head.push(["meta", { name: "twitter:url", content: url }]);
|
||||
head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]);
|
||||
head.push(["meta", { name: "twitter:description", content: pageData.frontmatter.description }]);
|
||||
|
||||
if (pageData.frontmatter.image) {
|
||||
head.push(["meta", { property: "og:image", content: `${hostname}/${pageData.frontmatter.image}` }]);
|
||||
head.push(["meta", { name: "twitter:image", content: `${hostname}/${pageData.frontmatter.image}` }]);
|
||||
}
|
||||
|
||||
if (pageData.frontmatter.tag) {
|
||||
head.push(["meta", { property: "article:tag", content: pageData.frontmatter.tag }]);
|
||||
}
|
||||
|
||||
if (pageData.frontmatter.date) {
|
||||
head.push(["meta", { property: "article:published_time", content: pageData.frontmatter.date }]);
|
||||
}
|
||||
|
||||
if (pageData.lastUpdated && pageData.frontmatter.lastUpdated !== false) {
|
||||
head.push([
|
||||
"meta",
|
||||
{ property: "article:modified_time", content: new Date(pageData.lastUpdated).toISOString() },
|
||||
]);
|
||||
}
|
||||
|
||||
return head;
|
||||
};
|
||||
|
||||
export default generateMeta;
|
22
src/.vitepress/config/hooks/generateSitemap.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { createContentLoader } from "vitepress";
|
||||
import type { SiteConfig } from "vitepress";
|
||||
|
||||
import { createWriteStream } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { SitemapStream } from "sitemap";
|
||||
|
||||
const generateSitemap = async (context: SiteConfig, hostname: string) => {
|
||||
const { outDir } = context;
|
||||
|
||||
const sitemap = new SitemapStream({ hostname: hostname });
|
||||
const pages = await createContentLoader("**/*.md").load();
|
||||
const writeStream = createWriteStream(resolve(outDir, "sitemap.xml"));
|
||||
|
||||
sitemap.pipe(writeStream);
|
||||
pages.forEach((page) => sitemap.write(page.url.replace(/index$/g, "").replace(/^\/src/, "")));
|
||||
sitemap.end();
|
||||
|
||||
await new Promise((r) => writeStream.on("finish", r));
|
||||
};
|
||||
|
||||
export default generateSitemap;
|
31
src/.vitepress/config/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { defineConfig, loadEnv } from "vitepress";
|
||||
|
||||
import theme from "./theme";
|
||||
import head from "./head";
|
||||
|
||||
import generateMeta from "./hooks/generateMeta";
|
||||
import generateSitemap from "./hooks/generateSitemap";
|
||||
import generateFeed from "./hooks/generateFeed";
|
||||
|
||||
const hostname: string = "https://kodo.moe";
|
||||
|
||||
export default ({ mode }) => {
|
||||
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
|
||||
|
||||
return defineConfig({
|
||||
appearance: "dark",
|
||||
lastUpdated: true,
|
||||
cleanUrls: true,
|
||||
base: process.env.VITE_BASE || "/",
|
||||
lang: "en-US",
|
||||
title: "Tachiyomi",
|
||||
description: "Free and open source manga reader for Android",
|
||||
head,
|
||||
themeConfig: theme,
|
||||
transformHead: async (context) => generateMeta(context, hostname),
|
||||
buildEnd: async (context) => {
|
||||
generateSitemap(context, hostname);
|
||||
generateFeed(context, hostname);
|
||||
},
|
||||
});
|
||||
};
|
26
src/.vitepress/config/navigation/navbar.ts
Normal file
@ -0,0 +1,26 @@
|
||||
const nav = [
|
||||
{
|
||||
text: "Documentation",
|
||||
link: "/docs/guides/getting-started",
|
||||
activeMatch: "/docs/",
|
||||
},
|
||||
{
|
||||
text: "0.14.6",
|
||||
items: [
|
||||
{
|
||||
text: "Download",
|
||||
link: "/download",
|
||||
},
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/tachiyomiorg/tachiyomi/releases/latest",
|
||||
},
|
||||
{
|
||||
text: "Contributing",
|
||||
link: "https://github.com/tachiyomiorg/tachiyomi/blob/master/CONTRIBUTING.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default nav;
|
75
src/.vitepress/config/navigation/sidebar.ts
Normal file
@ -0,0 +1,75 @@
|
||||
import { getSidebar } from "vitepress-plugin-auto-sidebar";
|
||||
|
||||
const sidebar = {
|
||||
"/docs/": defaultSidebar(),
|
||||
"/forks/": defaultSidebar(),
|
||||
"/news/": getSidebar({ contentRoot: "/src/", contentDirs: ["news"], collapsed: false }),
|
||||
};
|
||||
|
||||
function defaultSidebar() {
|
||||
return [
|
||||
{
|
||||
text: "Frequently Asked Questions",
|
||||
items: [
|
||||
{ text: "General", link: "/docs/faq/general" },
|
||||
{
|
||||
text: "Application",
|
||||
link: "/docs/faq/application/",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Library", link: "/docs/faq/application/library" },
|
||||
{
|
||||
text: "Browse",
|
||||
link: "/docs/faq/application/browse/",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "Reading with Local Source",
|
||||
link: "/docs/faq/application/browse/reading-with-local-source",
|
||||
},
|
||||
],
|
||||
},
|
||||
{ text: "Downloads", link: "/docs/faq/application/downloads" },
|
||||
{ text: "Reader", link: "/docs/faq/application/reader" },
|
||||
{ text: "User interface", link: "/docs/faq/application/user-interface" },
|
||||
{ text: "Android 11+", link: "/docs/faq/application/android-11+" },
|
||||
{ text: "Shizuku", link: "/docs/faq/application/shizuku" },
|
||||
],
|
||||
},
|
||||
{ text: "Extensions", link: "/docs/faq/extensions" },
|
||||
{ text: "Miscellaneous", link: "/docs/faq/miscellaneous" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Guides",
|
||||
items: [
|
||||
{ text: "Getting started", link: "/docs/guides/getting-started" },
|
||||
{ text: "Troubleshooting", link: "/docs/guides/troubleshooting" },
|
||||
{ text: "Source migration", link: "/docs/guides/source-migration" },
|
||||
{ text: "Backups", link: "/docs/guides/backups" },
|
||||
{ text: "Tracking", link: "/docs/guides/tracking" },
|
||||
{ text: "Categories", link: "/docs/guides/categories" },
|
||||
{ text: "Local manga", link: "/docs/guides/local-manga" },
|
||||
{ text: "Reader settings", link: "/docs/guides/reader-settings" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Contribution",
|
||||
link: "/docs/contribution",
|
||||
},
|
||||
{
|
||||
text: "Download",
|
||||
link: "/download",
|
||||
},
|
||||
{
|
||||
text: "Extensions",
|
||||
link: "/extensions",
|
||||
},
|
||||
{
|
||||
text: "Forks",
|
||||
link: "/forks/",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
export default sidebar;
|
45
src/.vitepress/config/theme.ts
Normal file
@ -0,0 +1,45 @@
|
||||
import type { DefaultTheme } from "vitepress";
|
||||
|
||||
import nav from "./navigation/navbar";
|
||||
import sidebar from "./navigation/sidebar";
|
||||
|
||||
const themeConfig: DefaultTheme.Config = {
|
||||
logo: "/img/logo-128px.png",
|
||||
|
||||
nav: nav,
|
||||
sidebar: sidebar,
|
||||
|
||||
outline: [2, 3],
|
||||
|
||||
socialLinks: [
|
||||
{ icon: "github", link: "https://github.com/tachiyomiorg/tachiyomi" },
|
||||
{ icon: "twitter", link: "https://twitter.com/tachiyomiorg" },
|
||||
{ icon: "facebook", link: "https://facebook.com/tachiyomiorg" },
|
||||
{ icon: "discord", link: "https://discord.gg/tachiyomi" },
|
||||
],
|
||||
|
||||
footer: {
|
||||
message:
|
||||
"<strong><a href='https://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Open-source Apache Licensed</a></strong> | <strong><a href='./privacy'>Privacy policy</a></strong>",
|
||||
copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`,
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: "https://github.com/xhenos/kodo/edit/v3-vitepress/src/:path",
|
||||
text: "Help us improve this page",
|
||||
},
|
||||
|
||||
lastUpdated: {
|
||||
text: "Last updated",
|
||||
formatOptions: {
|
||||
dateStyle: "long",
|
||||
timeStyle: "short",
|
||||
},
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
};
|
||||
|
||||
export default themeConfig;
|
10
src/news/updated-website.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
type: article
|
||||
title: Updated website
|
||||
description: We've got a fresh new website we hope will be even easier to use
|
||||
date: 2023-07-20
|
||||
---
|
||||
|
||||
# Updated website
|
||||
|
||||
We've got a fresh new website we hope will be even easier to use
|
BIN
src/public/favicon-16x16.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
src/public/favicon-32x32.png
Normal file
After Width: | Height: | Size: 683 B |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 15 KiB |
BIN
src/public/img/logo-128px.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
src/public/img/logo.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
@ -1,6 +1,6 @@
|
||||
<svg height="80" viewbox="0 0 48 48" width="80" x="0.0" y="0.0">
|
||||
<g transform="translate(0.000000,0.000000) scale(0.013200,-0.013200)">
|
||||
<path class="st0" d="M1761.7-8.5l-305-5l13.3-163.3c6.7-88.3,13.3-198.3,13.3-245v-83.3H800H116.7l5-298.3l5-298.3l111.7,11.7 c253.3,23.3,1691.7,30,2436.7,11.7c426.7-11.7,786.7-23.3,800-26.7c21.7-6.7,25,33.3,25,296.7v303.3l-638.3-6.7 c-350-3.3-663.3,0-696.7,5l-58.3,11.7l5,250c5,213.3,1.7,248.3-20,245C2078.3-1.9,1930-6.9,1761.7-8.5z" fill="currentColor" fill-rule="nonzero"></path>
|
||||
<path class="st0" d="M816.7-1290.2c-213.3-83.3-266.7-111.7-263.3-135c1.7-16.7,36.7-121.7,78.3-233.3 c96.7-255,206.7-640,276.7-963.3c30-136.7,56.7-251.7,58.3-255c3.3-3.3,138.3,41.7,303.3,100l298.3,105l-20,100 c-58.3,280-413.3,1393.3-445,1390C1091.7-1183.5,963.3-1231.9,816.7-1290.2z" fill="currentColor" fill-rule="nonzero"></path>
|
||||
<path class="st0" d="M2376.7-1458.5c-173.3-695-381.7-1386.7-451.7-1501.7l-31.7-51.7l-288.3-5c-333.3-5-1521.7,15-1571.7,26.7 c-31.7,8.3-33.3,0-33.3-300v-310l83.3,10c46.7,5,863.3,15,1816.7,20l1733.3,11.7v293.3v293.3l-141.7-11.7 c-78.3-5-325-11.7-548.3-11.7c-318.3-1.7-403.3,3.3-396.7,20c5,10,36.7,83.3,70,161.7C2725-2560.2,3110-1375.2,3090-1356.9 c-6.7,6.7-543.3,156.7-608.3,171.7C2448.3-1178.5,2441.7-1196.9,2376.7-1458.5z" fill="currentColor" fill-rule="nonzero"></path>
|
||||
<path class="st0" d="M1761.7-8.5l-305-5l13.3-163.3c6.7-88.3,13.3-198.3,13.3-245v-83.3H800H116.7l5-298.3l5-298.3l111.7,11.7 c253.3,23.3,1691.7,30,2436.7,11.7c426.7-11.7,786.7-23.3,800-26.7c21.7-6.7,25,33.3,25,296.7v303.3l-638.3-6.7 c-350-3.3-663.3,0-696.7,5l-58.3,11.7l5,250c5,213.3,1.7,248.3-20,245C2078.3-1.9,1930-6.9,1761.7-8.5z" fill="#818CF8" fill-rule="nonzero"></path>
|
||||
<path class="st0" d="M816.7-1290.2c-213.3-83.3-266.7-111.7-263.3-135c1.7-16.7,36.7-121.7,78.3-233.3 c96.7-255,206.7-640,276.7-963.3c30-136.7,56.7-251.7,58.3-255c3.3-3.3,138.3,41.7,303.3,100l298.3,105l-20,100 c-58.3,280-413.3,1393.3-445,1390C1091.7-1183.5,963.3-1231.9,816.7-1290.2z" fill="#818CF8" fill-rule="nonzero"></path>
|
||||
<path class="st0" d="M2376.7-1458.5c-173.3-695-381.7-1386.7-451.7-1501.7l-31.7-51.7l-288.3-5c-333.3-5-1521.7,15-1571.7,26.7 c-31.7,8.3-33.3,0-33.3-300v-310l83.3,10c46.7,5,863.3,15,1816.7,20l1733.3,11.7v293.3v293.3l-141.7-11.7 c-78.3-5-325-11.7-548.3-11.7c-318.3-1.7-403.3,3.3-396.7,20c5,10,36.7,83.3,70,161.7C2725-2560.2,3110-1375.2,3090-1356.9 c-6.7,6.7-543.3,156.7-608.3,171.7C2448.3-1178.5,2441.7-1196.9,2376.7-1458.5z" fill="#818CF8" fill-rule="nonzero"></path>
|
||||
</g></svg>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 3.8 KiB |