mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] yarn format
This commit is contained in:
parent
94f89a3c88
commit
877f9d2702
3 changed files with 10 additions and 11 deletions
|
@ -2,7 +2,7 @@ import type { FunctionalComponent } from 'preact';
|
|||
import { h } from 'preact';
|
||||
import './LanguageSelect.css';
|
||||
|
||||
const LanguageSelect: FunctionalComponent<{lang: string}> = ({lang}) => {
|
||||
const LanguageSelect: FunctionalComponent<{ lang: string }> = ({ lang }) => {
|
||||
return (
|
||||
<div class="language-select-wrapper">
|
||||
<svg
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
export const SIDEBAR = {
|
||||
'en': [
|
||||
en: [
|
||||
{ text: 'Setup', header: true },
|
||||
{ text: 'Getting Started', link: 'getting-started' },
|
||||
{ text: 'Quickstart', link: 'quick-start' },
|
||||
{ text: 'Installation', link: 'installation' },
|
||||
{ text: 'Examples', link: 'examples' },
|
||||
{ text: 'Astro vs. X', link: 'comparing-astro-vs-other-tools' },
|
||||
|
||||
|
||||
{ text: 'Basics', header: true },
|
||||
{ text: 'Project Structure', link: 'core-concepts/project-structure' },
|
||||
{ text: 'Components', link: 'core-concepts/astro-components' },
|
||||
|
@ -14,7 +14,7 @@ export const SIDEBAR = {
|
|||
{ text: 'Layouts', link: 'core-concepts/layouts' },
|
||||
{ text: 'Collections', link: 'core-concepts/collections' },
|
||||
{ text: 'Partial Hydration', link: 'core-concepts/component-hydration' },
|
||||
|
||||
|
||||
{ text: 'Guides', header: true },
|
||||
{ text: 'Styling & CSS', link: 'guides/styling' },
|
||||
{ text: 'Data Fetching', link: 'guides/data-fetching' },
|
||||
|
@ -22,7 +22,7 @@ export const SIDEBAR = {
|
|||
{ text: 'Supported Imports', link: 'guides/imports' },
|
||||
{ text: 'Deploy a Website', link: 'guides/deploy' },
|
||||
{ text: 'Publish a Component', link: 'guides/publish-to-npm' },
|
||||
|
||||
|
||||
{ text: 'Reference', header: true },
|
||||
{ text: 'Built-In Components', link: 'reference/builtin-components' },
|
||||
{ text: 'API Reference', link: 'reference/api-reference' },
|
||||
|
@ -33,18 +33,17 @@ export const SIDEBAR = {
|
|||
},
|
||||
{ text: 'Renderer Reference', link: 'reference/renderer-reference' },
|
||||
],
|
||||
'nl': [
|
||||
nl: [
|
||||
{ text: 'Welkom', header: true },
|
||||
{ text: 'Beginnen', link: 'nl/getting-started' },
|
||||
],
|
||||
'fi': [
|
||||
fi: [
|
||||
{ text: 'Tervetuloa', header: true },
|
||||
{ text: 'Aloittaminen', link: 'fi/getting-started' },
|
||||
{ text: 'Pika-aloitus', link: 'fi/quick-start' },
|
||||
{ text: 'Asennus', link: 'fi/installation' },
|
||||
],
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export const SITE = {
|
||||
title: 'Astro Documentation',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export function getLanguageFromURL(pathname:string) {
|
||||
export function getLanguageFromURL(pathname: string) {
|
||||
const langCodeMatch = pathname.match(/\/([a-z]{2})\//);
|
||||
return langCodeMatch ? langCodeMatch[1] : 'en';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue