Skip to content

Commit

Permalink
update for latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Jan 27, 2022
1 parent 636db14 commit 774847d
Show file tree
Hide file tree
Showing 43 changed files with 299 additions and 134 deletions.
6 changes: 6 additions & 0 deletions .stackblitzrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"startCommand": "npm start",
"env": {
"ENABLE_CJS_IMPORTS": true
}
}
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# docs

## 0.0.7

### Patch Changes

- 6b8630c6: Github pages disclaimer

## 0.0.6

### Patch Changes

- 788c769d: # Hoisted scripts

This change adds support for hoisted scripts, allowing you to bundle scripts together for a page and hoist them to the top (in the head):

```astro
<script hoist>
// Anything goes here!
</script>
```

## 0.0.5

## 0.0.5-next.0

### Patch Changes

- 78b5bde1: Adds support for Astro.resolve

`Astro.resolve()` helps with creating URLs relative to the current Astro file, allowing you to reference files within your `src/` folder.

Astro _does not_ resolve relative links within HTML, such as images:

```html
<img src="../images/penguin.png" />
```

The above will be sent to the browser as-is and the browser will resolve it relative to the current **page**. If you want it to be resolved relative to the .astro file you are working in, use `Astro.resolve`:

```astro
<img src={Astro.resolve('../images/penguin.png')} />
```

## 0.0.4

### Patch Changes

- adc767c5: change Spanish translations for Getting Started page

## 0.0.3

### Patch Changes

- 70f0a09: Added remark-slug to default plugins
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ Every pull request needs to be reviewed by another contributor to the documentat

## Running this project

- Clone/Fork the project
- This project uses yarn to manage dependencies. [Make sure that you have yarn v1 installed.](https://classic.yarnpkg.com/)
- Clone the Project

`git clone [email protected]:withastro/astro.git`
- Run `yarn install` to install latest dependencies.
- Run `yarn dev` to start the dev server.
- Run `yarn build` to build the final site for production.
> This project uses yarn to manage dependencies. [Make sure that you have yarn v1 installed.](https://classic.yarnpkg.com/)
- Run `yarn workspace docs dev` to start the dev server.
- Run `yarn workspace docs build` to build the final site for production.
> The environment variable `SNOWPACK_PUBLIC_GITHUB_TOKEN` must be set to a personal access token with `public_repo` permissions to prevent rate-limiting.
## Deploying

The site is automatically deployed when commits land in `latest`, via Netlify.

The environment variable `SNOWPACK_PUBLIC_GITHUB_TOKEN` must be set to a personal access token with `public_repo` permissions to prevent rate-limiting.
The "next" docs are automatically deployed when commits land in `main`, via Netlify at <https://main--astro-docs-2.netlify.app/getting-started/>.
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({
buildOptions: {
site: 'https://astro.build/docs',
site: 'https://docs.astro.build/',
},
renderers: [
// Our main renderer for frontend components
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
"build": "astro build",
"preview": "astro preview",
"lint": "run-p --aggregate-output lint:linkcheck",
"lint:a11y": "start-test 'yarn dev --silent' 3000 'yarn lint:a11y:local'",
"lint:a11y": "start-test 'yarn build && yarn preview' 3000 'yarn lint:a11y:local'",
"lint:a11y:local": "pa11y-ci --sitemap 'http://localhost:3000/sitemap.xml' --sitemap-find 'https://docs.astro.build' --sitemap-replace 'http://localhost:3000'",
"lint:a11y:remote": "pa11y-ci --sitemap 'https://docs.astro.build/sitemap.xml'",
"lint:linkcheck": "start-test 'yarn dev --silent' 3000 'yarn lint:linkcheck:local'",
"lint:linkcheck:local": "blc -roe --user-agent 'broken-link-checker/0.7.8' 'http://localhost:3000/docs/en/getting-started'",
"lint:linkcheck:local": "blc -roe --user-agent 'broken-link-checker/0.7.8' 'http://localhost:3000/en/getting-started'",
"lint:linkcheck:remote": "blc -ro --user-agent 'broken-link-checker/0.7.8' 'https://docs.astro.build/'"
},
"devDependencies": {
"astro": "^0.22.0",
"broken-link-checker": "^0.7.8",
"npm-run-all": "^4.1.5",
"pa11y-ci": "^3.0.1",
"prettier": "^2.4.1",
"start-server-and-test": "^1.12.6"
},
Expand Down
6 changes: 6 additions & 0 deletions public/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
}
}

@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}

body {
display: flex;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Astro will generate an RSS 2.0 feed at `/feed/[collection].xml` (for example, `/
rel="alternate"
type="application/rss+xml"
title="My RSS Feed"
href="/docs/feed/podcast.xml"
href="/feed/podcast.xml"
/>
```

Expand Down
12 changes: 6 additions & 6 deletions src/components/HeadCommon.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="theme-color" content="#ff5e00" />
<link rel="icon" type="image/svg+xml" href="/docs/favicon.svg" />
<link rel="alternate icon" type="image/x-icon" href="/docs/favicon.ico" />
<link rel="sitemap" href="/docs/sitemap.xml" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="alternate icon" type="image/x-icon" href="/favicon.ico" />
<link rel="sitemap" href="/sitemap.xml" />

<!-- Global CSS -->
<link rel="stylesheet" href="/docs/theme.css" />
<link rel="stylesheet" href="/docs/code.css" />
<link rel="stylesheet" href="/docs/index.css" />
<link rel="stylesheet" href="/theme.css" />
<link rel="stylesheet" href="/code.css" />
<link rel="stylesheet" href="/index.css" />

<!-- Preload Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/SkipToContent.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="#article" class="sr-only skiplink"><span>Skip to Content</span></a>
<a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>

<style>
.skiplink,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import SplashLayout from '../layouts/SplashLayout.astro';
<SplashLayout title="Not Found">
<h1>404</h1>
<p>This page isn't in our solar system.</p>
<a href="/docs/">Take me home.</a>
<a href="/">Take me home.</a>
</SplashLayout>
19 changes: 19 additions & 0 deletions src/pages/[...slug].astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
export async function getStaticPaths() {
// get english pages that moved from `/` to `/en/`
const englishPages = Astro.fetchContent('./en/**/*.md');
// add pages that are `*.astro` files as well
const otherPages = [{ url: "/en/themes" }];
return [...englishPages, ...otherPages].map((page) => ({
params: {
slug: page.url.slice(4),
},
props: {
englishSlug: page.url,
}
}));
}
---

<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />
2 changes: 0 additions & 2 deletions src/pages/ar/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ npm init astro -- --template [GITHUB_USER]/[REPO_NAME]
npm init astro -- --template [GITHUB_USER]/[REPO_NAME]/path/to/example
```

</Code>

### جربه على المُتصفح

إن كنت مهتمًا وتريد اللعب وتجربة Astro على المتصفح، بمقدورك استخدام online code playground، جرب قالب مشروعنا "Hello World" على [CodeSandbox](https://codesandbox.io/s/astro-template-hugb3).
Expand Down
2 changes: 1 addition & 1 deletion src/pages/de/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import SplashLayout from '../../layouts/SplashLayout.astro';
<SplashLayout title="Nicht gefunden">
<h1>404</h1>
<p>Diese Seite befindet sich nicht in unserem Sonnensystem.</p>
<a href="/docs/">Bring mich nach Hause.</a>
<a href="/">Bring mich nach Hause.</a>
</SplashLayout>
3 changes: 1 addition & 2 deletions src/pages/de/core-concepts/component-hydration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ _Beachte: Partial Hydration (Partielle Anreicherung) wird manchmal auch als “P

**Islands Architecture** ist die Idee Partial Hydration zu verwenden, um komplette Websites zu erzeugen. Islands Architecture ist eine Alternative zu der beliebten Idee deine gesamte Website in eine Client-seitige JavaScript-Anwendung zu packen, welche von den Nutzerinnen und Nutzern heruntergeladen werden muss.

Um Jason Miller zu zitieren, der [den Begriff aufgebracht hat](https://jasonformat.com/islands-architecture/):

> In einem Modell aus "Inseln" ist Server-seitiges Rendering nicht die angeflanschte Optimierung, die darauf abzielt die SEO- oder UX-Werte zu verbessern. Stattdessen ist es die grundlegende Methode mit der Seiten an den Browser ausgeliefert werden. Das HTML das als Antwort auf eine Navigation zurückgegeben wird, enthält eine bedeutsame und unmittelbar gerenderte Repräsentation des Inhaltes, den die Nutzerin oder der Nutzer angefordert hat.
> <br/> -- [Jason Miller](https://jasonformat.com/islands-architecture/)
Neben den offensichtlichen Leistungsvorteilen, wenn weniger JavaScript an den Browser geschickt und dort ausgeführt wird, verfügt eine Islands Architecture über zwei wesentliche Vorteile:

Expand Down
2 changes: 1 addition & 1 deletion src/pages/de/core-concepts/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import OpenGraphMeta from '../layouts/OpenGraphMeta.astro';
<BasisHead title="Title der Seite" description="Beschreibung der Seite" />
<OpenGraphMeta />
<!-- Du kannst je nach Bedarf sogar eigene einmalig benötigte Elemente hinzufügen. -->
<link rel="alternate" type="application/rss+xml" href="/docs/feed/posts.xml">
<link rel="alternate" type="application/rss+xml" href="/feed/posts.xml">
</head>
<body>
<!-- ... -->
Expand Down
4 changes: 3 additions & 1 deletion src/pages/de/guides/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ Füge die Datei deiner Astro-Seite (oder deiner Layout-Komponente) hinzu:

```astro
<head>
<link rel="stylesheet" href={Astro.resolve('../styles/global.css')}>
<style global>
@import "../styles/global.css";
</style>
</head>
```

Expand Down
Loading

0 comments on commit 774847d

Please sign in to comment.