Skip to content

Visualize Your Ideas With Code

feat(docs): add logo (#23)

Jacob78698e40a428
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index c5874170..e0edb4ae 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -2,6 +2,9 @@ name: Deploy Documentation to GitHub Pages
on: workflow_dispatch
+env:
+ HUSKY: 0
+
jobs:
deploy:
name: Deploy
diff --git a/commitlint.config.js b/commitlint.config.js
index 18a72a55..ac197cac 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -1,6 +1,6 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
- 'scope-enum': [2, 'always', ['core', 'ui']],
+ 'scope-enum': [2, 'always', ['core', 'ui', 'docs']],
},
};
diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.js
index 99789f4c..b828bf8d 100644
--- a/packages/docs/docusaurus.config.js
+++ b/packages/docs/docusaurus.config.js
@@ -27,6 +27,7 @@ const config = {
logo: {
alt: 'Motion Canvas Logo',
src: 'img/logo.svg',
+ srcDark: 'img/logo_dark.svg',
},
items: [
{
@@ -113,6 +114,7 @@ const config = {
{
routeBasePath: '/',
sidebarPath: 'sidebars.js',
+ exclude: ['**/api/*.md'],
editUrl: ({versionDocsDirPath, docPath}) =>
`https://github.com/motion-canvas/motion-canvas/blob/main/${versionDocsDirPath}/${docPath}`,
},
@@ -151,7 +153,7 @@ const config = {
'../core/src/types',
'../core/src/utils',
],
- tsconfig: '../core/tsconfig.json',
+ tsconfig: '../core/tsconfig.build.json',
},
],
],
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index ab8b8c38..e705f209 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -10,6 +10,7 @@ const sidebars = {
collapsed: false,
link: {
type: 'generated-index',
+ slug: 'api',
},
items: [{type: 'autogenerated', dirName: 'api/modules'}],
},
@@ -18,6 +19,7 @@ const sidebars = {
label: 'Classes',
link: {
type: 'generated-index',
+ slug: 'api/classes',
},
items: [{type: 'autogenerated', dirName: 'api/classes'}],
},
@@ -26,6 +28,7 @@ const sidebars = {
label: 'Enumerations',
link: {
type: 'generated-index',
+ slug: 'api/enums',
},
items: [{type: 'autogenerated', dirName: 'api/enums'}],
},
@@ -34,6 +37,7 @@ const sidebars = {
label: 'Interfaces',
link: {
type: 'generated-index',
+ slug: 'api/interfaces',
},
items: [{type: 'autogenerated', dirName: 'api/interfaces'}],
},
diff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsx
index 2b4d46e2..bfdae31d 100644
--- a/packages/docs/src/pages/index.tsx
+++ b/packages/docs/src/pages/index.tsx
@@ -32,10 +32,7 @@ function HomepageHeader() {
export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
return (
- <Layout
- title={`Hello from ${siteConfig.title}`}
- description="Description will go into a meta tag in <head />"
- >
+ <Layout description={siteConfig.tagline}>
<HomepageHeader />
<main>
<HomepageFeatures />
diff --git a/packages/docs/static/img/favicon.ico b/packages/docs/static/img/favicon.ico
index c01d54bc..757ab0ff 100644
Binary files a/packages/docs/static/img/favicon.ico and b/packages/docs/static/img/favicon.ico differ
diff --git a/packages/docs/static/img/logo.svg b/packages/docs/static/img/logo.svg
index 922ec0bc..82fd7a5e 100644
--- a/packages/docs/static/img/logo.svg
+++ b/packages/docs/static/img/logo.svg
@@ -1,3 +1 @@
-<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
- <circle cx="100" cy="100" r="100" fill="#141414"/>
-</svg>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><defs><style>.b{fill:#99c47a;}.c{fill:#ff6470;}.d{fill:#ffc66d;}.e{fill:#404040;}.f{fill:#68abdf;}</style></defs><rect class="e" x="23.41" y="19.41" width="4" height="12" rx="2" ry="2" transform="translate(-10.53 25.41) rotate(-45)"/><rect class="f" x="24.12" y="11.22" width="4" height="10" rx="2" ry="2" transform="translate(-3.82 23.22) rotate(-45)"/><rect class="b" x="17.05" y="7.15" width="4" height="4" rx="2" ry="2" transform="translate(-.89 16.15) rotate(-45)"/><rect class="d" x="12.45" y="7.95" width="4" height="13" rx="2" ry="2" transform="translate(-5.99 14.45) rotate(-45)"/><rect class="c" x="12.1" y="16" width="4" height="16" rx="2" ry="2" transform="translate(-12.84 17) rotate(-45)"/><rect class="e" x="22.31" y="26.38" width="4" height="12" rx="2" ry="2" transform="translate(6.5 68.74) rotate(-117)"/><rect class="e" x="28.6" y="29.58" width="4" height="12" rx="2" ry="2" transform="translate(66.38 65.94) rotate(171)"/><rect class="e" x="33.58" y="24.6" width="4" height="12" rx="2" ry="2" transform="translate(71.37 .24) rotate(99)"/><rect class="e" x="30.38" y="18.31" width="4" height="12" rx="2" ry="2" transform="translate(14.57 -12.05) rotate(27)"/></svg>
\ No newline at end of file
diff --git a/packages/docs/static/img/logo_dark.svg b/packages/docs/static/img/logo_dark.svg
new file mode 100644
index 00000000..8a55e307
--- /dev/null
+++ b/packages/docs/static/img/logo_dark.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><defs><style>.b{fill:#99c47a;}.c{fill:#ff6470;}.d{fill:#ffc66d;}.e{fill:#68abdf;}.f{fill:#f2f2f2;}</style></defs><rect class="f" x="23.41" y="19.41" width="4" height="12" rx="2" ry="2" transform="translate(-10.53 25.41) rotate(-45)"/><rect class="e" x="24.12" y="11.22" width="4" height="10" rx="2" ry="2" transform="translate(-3.82 23.22) rotate(-45)"/><rect class="b" x="17.05" y="7.15" width="4" height="4" rx="2" ry="2" transform="translate(-.89 16.15) rotate(-45)"/><rect class="d" x="12.45" y="7.95" width="4" height="13" rx="2" ry="2" transform="translate(-5.99 14.45) rotate(-45)"/><rect class="c" x="12.1" y="16" width="4" height="16" rx="2" ry="2" transform="translate(-12.84 17) rotate(-45)"/><rect class="f" x="22.31" y="26.38" width="4" height="12" rx="2" ry="2" transform="translate(6.5 68.74) rotate(-117)"/><rect class="f" x="28.6" y="29.58" width="4" height="12" rx="2" ry="2" transform="translate(66.38 65.94) rotate(171)"/><rect class="f" x="33.58" y="24.6" width="4" height="12" rx="2" ry="2" transform="translate(71.37 .24) rotate(99)"/><rect class="f" x="30.38" y="18.31" width="4" height="12" rx="2" ry="2" transform="translate(14.57 -12.05) rotate(27)"/></svg>
\ No newline at end of file