Skip to content

Commit

Permalink
chore: move docs folders for gh pages, fix a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Apr 2, 2024
1 parent 0a45dd5 commit 626f020
Show file tree
Hide file tree
Showing 53 changed files with 66 additions and 5,220 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ xcuserdata/
__tests__/__output

# build output
dist/
docs/
# generated types
.astro/
1 change: 1 addition & 0 deletions docs/astro.config.mjs → docs-src/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import starlightConfig from './starlight-config';

// https://astro.build/config
export default defineConfig({
outDir: '../docs', // necessary folder for Github Pages
integrations: [starlight(starlightConfig)],
markdown: {
remarkPlugins: [remarkPlayground],
Expand Down
File renamed without changes
Binary file added docs-src/public/meta-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Binary file added docs-src/src/assets/meta-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
8 changes: 8 additions & 0 deletions docs-src/src/components/Head.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
import Default from '@astrojs/starlight/components/Head.astro';
import type { Props } from '@astrojs/starlight/props';
---
<Default {...Astro.props}>
<slot />
</Default>
<script src="../load-playground"></script>
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ class SdPlayground extends LitElement {
min-height: 28px;
margin-left: 10px;
}
/** screen-reader only CSS */
sl-select::part(form-control-label) {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}
`;
}

Expand Down Expand Up @@ -144,8 +159,8 @@ class SdPlayground extends LitElement {
? html`
<sl-select
class="output-select"
name="pets"
id="pet-select"
name="output-select"
label="Select output file"
value="${this.outputFiles[0]}"
@sl-change=${(ev: Event) => {
ev.stopPropagation();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/src/styles.css → docs-src/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* Dark mode colors. */
:root {
--sl-color-accent-low: #0a6e6b;
--sl-color-accent-low: #074947;
--sl-color-accent: #3fc6bf;
--sl-color-accent-high: #80d9d6;
}

/* Light mode colors. */
:root[data-theme='light'] {
--sl-color-accent-low: #80d9d6;
--sl-color-accent: #3fc6bf;
--sl-color-accent-high: #0fb6b0;
--sl-color-accent-low: #55b3af;
--sl-color-accent: #047771;
--sl-color-accent-high: #07524f;
}

table code {
Expand Down
File renamed without changes.
42 changes: 32 additions & 10 deletions docs/starlight-config.ts → docs-src/starlight-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
editLink: {
baseUrl: 'https://github.com/amzn/style-dictionary/edit/v4/src/content/docs/',
},
favicon: 'favicon.png',
favicon: '/favicon.png',
social: {
github: 'https://github.com/amzn/style-dictionary',
slack:
Expand Down Expand Up @@ -102,15 +102,37 @@ export default {
],
},
],
// head: [
// {
// tag: 'script',
// attrs: {
// type: 'module',
// src: '/src/load-playground.ts',
// },
// },
// ],
head: [
{
tag: 'meta',
attrs: {
name: 'keywords',
content:
'style-dictionary, style dictionary, style, dictionary, design, tokens, design tokens, design system, DTCG, W3C, Design Token Community Group',
},
},
{
tag: 'meta',
attrs: {
name: 'theme-color',
content: '#11aea7',
},
},
{
tag: 'meta',
attrs: {
name: 'og:image',
content: '/meta-img.png',
},
},
{
tag: 'meta',
attrs: {
name: 'og:image:alt',
content: 'Image of Style-Dictionary docs site',
},
},
],
customCss: ['./src/styles.css'],
components: {
Head: './src/components/Head.astro',
Expand Down
Binary file removed docs/src/assets/favicon copy.png
Binary file not shown.
214 changes: 0 additions & 214 deletions docs/src/components/Head.astro

This file was deleted.

Loading

0 comments on commit 626f020

Please sign in to comment.