Skip to content
Open
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
34 changes: 19 additions & 15 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'astro/config';
import react from "@astrojs/react";
import starlight from "@astrojs/starlight";
import starlightTypeDoc, { typeDocSidebarGroup } from 'starlight-typedoc';
import fs from 'node:fs'

import sitemap from '@astrojs/sitemap';

Expand Down Expand Up @@ -47,20 +48,23 @@ export default defineConfig({
'./src/layouts/colorvars.css',
],
plugins: [
// Generate the documentation.
starlightTypeDoc({
entryPoints: ['./fabric.js/fabric.ts'],
tsconfig: './fabric.js/typedoc.config.json',
typeDoc: {
plugin: ['typedoc-plugin-no-inherit'],
readme: 'none',
gitRemote: 'https://github.com/fabricjs/fabric.js/blob',
entryFileName: 'index.md',
includeVersion: true,
sourceLinkExternal: true,
sourceLinkTemplate: 'https://github.com/fabricjs/fabric.js/blob/{gitRevision}/{path}#L{line}',
},
}),
],
// Generate the documentation only if local sources exist.
// This avoids dev crashes when `fabric.js` sources are not checked out.
(fs.existsSync(new URL('./fabric.js/fabric.ts', import.meta.url)) &&
fs.existsSync(new URL('./fabric.js/typedoc.config.json', import.meta.url))) &&
starlightTypeDoc({
entryPoints: ['./fabric.js/fabric.ts'],
tsconfig: './fabric.js/typedoc.config.json',
typeDoc: {
plugin: ['typedoc-plugin-no-inherit'],
readme: 'none',
gitRemote: 'https://github.com/fabricjs/fabric.js/blob',
entryFileName: 'index.md',
includeVersion: true,
sourceLinkExternal: true,
sourceLinkTemplate: 'https://github.com/fabricjs/fabric.js/blob/{gitRevision}/{path}#L{line}',
},
}),
].filter(Boolean),
}), react(), sitemap()],
});
5 changes: 5 additions & 0 deletions src/components/Header/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
Api specs
</a>
</li>
<li>
<a href="/resources">
Resources
</a>
</li>
<li>
<a href="/team">
Team
Expand Down
27 changes: 27 additions & 0 deletions src/components/Resources/Resources.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
import './resources.css';
const links = [
{
link: 'https://github.com/cs-open/react-fabric',
description:
' - A high-extensibility library with a composite style, built with React',
name: '@cs-open/react-fabric',
},
];
---

<section id="resources">
<h2>Resources</h2>
<ul>
{
links.map((link) => (
<li>
<a href={link.link} target="_blank" class="resource-label">
{link.name}
</a>{' '}
&nbsp;<span class="resource-value">{link.description}</span>
</li>
))
}
</ul>
</section>
10 changes: 10 additions & 0 deletions src/components/Resources/resources.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#resources {
display: flex;
flex-direction: column;
align-items: center;
justify-items: center;

}
#resources .resource-label{
color: var(--primary-color)
}
13 changes: 13 additions & 0 deletions src/pages/resources.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
import Layout from '../layouts/Layout.astro';
import ResourcesList from '../components/Resources/Resources.astro';
---

<Layout
title="Fabric.js Javascript Resources"
description="Using fabricjs related projects"
>
<main>
<ResourcesList />
</main>
</Layout>