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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Thumbs.db

# Node
node_modules/
.worktrees/
docs/.astro/
docs/.wrangler/
docs/dist/
Expand Down
430 changes: 79 additions & 351 deletions README.md

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@ export default defineConfig({
href: 'https://github.com/anycap-ai/anycap',
},
],
editLink: {
baseUrl: 'https://github.com/anycap-ai/anycap/edit/main/docs/',
},
lastUpdated: true,
disable404Route: true,
customCss: ['./src/styles/custom.css'],
components: {
Head: './src/components/Head.astro',
},
head: [
{ tag: 'meta', attrs: { name: 'theme-color', content: '#f9faf5' } },
{ tag: 'meta', attrs: { name: 'theme-color', content: '#f4f5f0' } },
{ tag: 'meta', attrs: { name: 'color-scheme', content: 'light dark' } },
{
tag: 'meta',
Expand Down Expand Up @@ -74,11 +71,13 @@ export default defineConfig({
label: 'Capabilities',
items: [
{ label: 'Overview', link: '/capabilities/' },
{ label: 'Models', link: '/capabilities/models/' },
{ label: 'Image', link: '/capabilities/image/' },
{ label: 'Video', link: '/capabilities/video/' },
{ label: 'Audio', link: '/capabilities/audio/' },
{ label: 'Music', link: '/capabilities/music/' },
{ label: 'Media understanding', link: '/capabilities/media-understanding/' },
{ label: 'Web search and crawl', link: '/capabilities/web/' },
{ label: 'Music and audio', link: '/capabilities/audio/' },
{ label: 'Drive and Page', link: '/capabilities/delivery/' },
{ label: 'Annotate and Draw', link: '/capabilities/collaboration/' },
{ label: 'Snapshots', link: '/capabilities/snapshots/' },
Expand Down
46 changes: 46 additions & 0 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"dependencies": {
"@astrojs/sitemap": "3.7.3",
"@astrojs/starlight": "0.41.3",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource/space-mono": "^5.2.6",
"astro": "7.1.3"
},
"devDependencies": {
Expand Down
Binary file added docs/public/assets/geist-pixel-square.woff2
Binary file not shown.
16 changes: 12 additions & 4 deletions docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/scripts/audit-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { extname, join, relative, resolve } from 'node:path';

const dist = resolve('dist');
const canonicalOrigin = 'https://docs.anyware.ai';
const expectedIndexablePages = 28;
const expectedIndexablePages = 30;
const errors = [];

async function walk(directory) {
Expand Down
31 changes: 30 additions & 1 deletion docs/scripts/prepare-assets.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mkdir, rm } from 'node:fs/promises';
import { copyFile, mkdir, rm } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import sharp from 'sharp';

Expand All @@ -7,12 +7,41 @@ const source = fileURLToPath(new URL('../../assets/hero.png', import.meta.url));
const destinationDirectory = fileURLToPath(new URL('../public/assets/', import.meta.url));
const destination = fileURLToPath(new URL('../public/assets/social-card.png', import.meta.url));
const legacyDestination = fileURLToPath(new URL('../public/assets/hero.png', import.meta.url));
const grainDestination = fileURLToPath(new URL('../public/assets/grain.png', import.meta.url));
const grainSize = 200;
const interSource = fileURLToPath(
new URL('../node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2', import.meta.url)
);
const interDestination = fileURLToPath(new URL('../public/assets/inter-latin-wght-normal.woff2', import.meta.url));
const spaceMonoSource = fileURLToPath(
new URL('../node_modules/@fontsource/space-mono/files/space-mono-latin-700-normal.woff2', import.meta.url)
);
const spaceMonoDestination = fileURLToPath(new URL('../public/assets/space-mono-700.woff2', import.meta.url));

await mkdir(destinationDirectory, { recursive: true });
await rm(legacyDestination, { force: true });
await copyFile(interSource, interDestination);
await copyFile(spaceMonoSource, spaceMonoDestination);
const grainPixels = Buffer.alloc(grainSize * grainSize * 3);

for (let index = 0; index < grainPixels.length; index += 3) {
const value = Math.floor(Math.random() * 256);
grainPixels[index] = value;
grainPixels[index + 1] = value;
grainPixels[index + 2] = value;
}

await sharp(grainPixels, {
raw: { width: grainSize, height: grainSize, channels: 3 },
})
.png({ compressionLevel: 9, effort: 10 })
.toFile(grainDestination);
await sharp(source)
.resize(1200, 630, { fit: 'cover', position: 'centre' })
.png({ compressionLevel: 9, effort: 10 })
.toFile(destination);

console.log(`Prepared docs asset: ${destination.replace(`${docsRoot}/`, '')} (1200x630)`);
console.log(`Prepared docs font: ${interDestination.replace(`${docsRoot}/`, '')}`);
console.log(`Prepared docs font: ${spaceMonoDestination.replace(`${docsRoot}/`, '')}`);
console.log(`Prepared docs texture: ${grainDestination.replace(`${docsRoot}/`, '')} (${grainSize}x${grainSize})`);
Loading
Loading