[ci] yarn format

This commit is contained in:
FredKSchott 2021-08-02 06:40:02 +00:00 committed by GitHub Actions
parent 94f89a3c88
commit 877f9d2702
3 changed files with 10 additions and 11 deletions

View file

@ -2,7 +2,7 @@ import type { FunctionalComponent } from 'preact';
import { h } from 'preact'; import { h } from 'preact';
import './LanguageSelect.css'; import './LanguageSelect.css';
const LanguageSelect: FunctionalComponent<{lang: string}> = ({lang}) => { const LanguageSelect: FunctionalComponent<{ lang: string }> = ({ lang }) => {
return ( return (
<div class="language-select-wrapper"> <div class="language-select-wrapper">
<svg <svg

View file

@ -1,12 +1,12 @@
export const SIDEBAR = { export const SIDEBAR = {
'en': [ en: [
{ text: 'Setup', header: true }, { text: 'Setup', header: true },
{ text: 'Getting Started', link: 'getting-started' }, { text: 'Getting Started', link: 'getting-started' },
{ text: 'Quickstart', link: 'quick-start' }, { text: 'Quickstart', link: 'quick-start' },
{ text: 'Installation', link: 'installation' }, { text: 'Installation', link: 'installation' },
{ text: 'Examples', link: 'examples' }, { text: 'Examples', link: 'examples' },
{ text: 'Astro vs. X', link: 'comparing-astro-vs-other-tools' }, { text: 'Astro vs. X', link: 'comparing-astro-vs-other-tools' },
{ text: 'Basics', header: true }, { text: 'Basics', header: true },
{ text: 'Project Structure', link: 'core-concepts/project-structure' }, { text: 'Project Structure', link: 'core-concepts/project-structure' },
{ text: 'Components', link: 'core-concepts/astro-components' }, { text: 'Components', link: 'core-concepts/astro-components' },
@ -14,7 +14,7 @@ export const SIDEBAR = {
{ text: 'Layouts', link: 'core-concepts/layouts' }, { text: 'Layouts', link: 'core-concepts/layouts' },
{ text: 'Collections', link: 'core-concepts/collections' }, { text: 'Collections', link: 'core-concepts/collections' },
{ text: 'Partial Hydration', link: 'core-concepts/component-hydration' }, { text: 'Partial Hydration', link: 'core-concepts/component-hydration' },
{ text: 'Guides', header: true }, { text: 'Guides', header: true },
{ text: 'Styling & CSS', link: 'guides/styling' }, { text: 'Styling & CSS', link: 'guides/styling' },
{ text: 'Data Fetching', link: 'guides/data-fetching' }, { text: 'Data Fetching', link: 'guides/data-fetching' },
@ -22,7 +22,7 @@ export const SIDEBAR = {
{ text: 'Supported Imports', link: 'guides/imports' }, { text: 'Supported Imports', link: 'guides/imports' },
{ text: 'Deploy a Website', link: 'guides/deploy' }, { text: 'Deploy a Website', link: 'guides/deploy' },
{ text: 'Publish a Component', link: 'guides/publish-to-npm' }, { text: 'Publish a Component', link: 'guides/publish-to-npm' },
{ text: 'Reference', header: true }, { text: 'Reference', header: true },
{ text: 'Built-In Components', link: 'reference/builtin-components' }, { text: 'Built-In Components', link: 'reference/builtin-components' },
{ text: 'API Reference', link: 'reference/api-reference' }, { text: 'API Reference', link: 'reference/api-reference' },
@ -33,18 +33,17 @@ export const SIDEBAR = {
}, },
{ text: 'Renderer Reference', link: 'reference/renderer-reference' }, { text: 'Renderer Reference', link: 'reference/renderer-reference' },
], ],
'nl': [ nl: [
{ text: 'Welkom', header: true }, { text: 'Welkom', header: true },
{ text: 'Beginnen', link: 'nl/getting-started' }, { text: 'Beginnen', link: 'nl/getting-started' },
], ],
'fi': [ fi: [
{ text: 'Tervetuloa', header: true }, { text: 'Tervetuloa', header: true },
{ text: 'Aloittaminen', link: 'fi/getting-started' }, { text: 'Aloittaminen', link: 'fi/getting-started' },
{ text: 'Pika-aloitus', link: 'fi/quick-start' }, { text: 'Pika-aloitus', link: 'fi/quick-start' },
{ text: 'Asennus', link: 'fi/installation' }, { text: 'Asennus', link: 'fi/installation' },
], ],
} };
export const SITE = { export const SITE = {
title: 'Astro Documentation', title: 'Astro Documentation',

View file

@ -1,4 +1,4 @@
export function getLanguageFromURL(pathname:string) { export function getLanguageFromURL(pathname: string) {
const langCodeMatch = pathname.match(/\/([a-z]{2})\//); const langCodeMatch = pathname.match(/\/([a-z]{2})\//);
return langCodeMatch ? langCodeMatch[1] : 'en'; return langCodeMatch ? langCodeMatch[1] : 'en';
} }