Skip to content

Commit

Permalink
Merge branch 'main' into delucis/i18n-next
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Apr 26, 2022
2 parents b9f60bb + b015cae commit ff252d9
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 28 deletions.
3 changes: 2 additions & 1 deletion old-translations/es/reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export async function getStaticPaths() {
return data.map((post) => {
return {
params: { id: post.id },
props: { post } };
props: { post }
};
});
}
const {id} = Astro.params;
Expand Down
21 changes: 11 additions & 10 deletions public/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ h5 {
--icon-size: 1rem;
}

.heading-wrapper:not(:first-child) {
.heading-wrapper:not(:first-child) {
margin-block: 0;
}
.heading-wrapper:not(:first-child):is(.level-h2, .level-h3) {
Expand All @@ -122,7 +122,7 @@ h5 {

.heading-wrapper > .anchor-link {
position: relative;
inset-inline-start: .75rem;
inset-inline-start: 0.75rem;
width: var(--icon-size);
height: var(--icon-size);
color: var(--theme-text-light);
Expand All @@ -142,16 +142,16 @@ h5 {
.heading-wrapper > .anchor-link {
inset-inline-start: -0.75rem;
}

.heading-wrapper .anchor-icon {
position: relative;
bottom: var(--icon-baseline, 0);
}

.heading-wrapper.level-h2 .anchor-icon {
--icon-baseline: 0.35rem;
}

.heading-wrapper.level-h3 .anchor-icon {
--icon-baseline: 0.15rem;
}
Expand Down Expand Up @@ -263,7 +263,7 @@ pre.astro-code > code {
}

/*RTL Fix Code dir*/
[dir="rtl"] code {
[dir='rtl'] code {
unicode-bidi: plaintext;
}

Expand Down Expand Up @@ -381,15 +381,16 @@ h2.heading {

.header-link {
font-size: 1rem;
padding: 1px 0 1px 1rem;
border-left: 4px solid var(--theme-divider);
transition: border-color 100ms ease-out;
padding: 1px 0 1px 0;
padding-inline-start: 1rem;
border-inline-start: 4px solid var(--theme-divider);
transition: border-inline-start-color 100ms ease-out;
}

.header-link:hover,
.header-link:focus,
.header-link:focus-within {
border-left-color: var(--theme-accent-secondary);
border-inline-start-color: var(--theme-accent-secondary);
}
.header-link:hover a,
.header-link a:focus {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Header/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const t = useTranslations(Astro);
<div class="menu-toggle">
<SidebarToggle client:idle />
</div>
<div class="logo flex">
<div dir="ltr" lang="en" class="logo flex">
<a href="https://astro.build/">
<h1 class="sr-only">Astro</h1>
<svg xmlns="http://www.w3.org/2000/svg" width="363" height="102" viewBox="0 0 363 102" fill="none">
Expand Down Expand Up @@ -77,7 +77,6 @@ const t = useTranslations(Astro);
}

.logo {
direction: ltr;
display: flex;
overflow: hidden;
width: 30px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/LeftSidebar/Sponsors.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="sponsors">
<div dir="ltr" lang="en" class="sponsors">
<h2 class="sponsors-title">Sponsored by</h2>
<div class="sponsor">
<a href="https://www.netlify.com/" aria-label="Go to Netlify website">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/core-concepts/component-hydration.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Start importing the component JS at page load and hydrate when the import comple

If more than one renderer is included in the Astro [config](/en/reference/configuration-reference), `client:only` needs a hint to know which renderer to use for the component. For example, `client:only="react"` would make sure that the component is hydrated in the browser with the React renderer. For custom renderers not provided by `@astrojs`, use the full name of the renderer provided in your Astro config, i.e. `<client:only="my-custom-renderer" />`.

📚 See our [directives reference](/en/reference/directives-reference#ui-framework-components) page for more infomation on all of the `client:` directives.
📚 See our [directives reference](/en/reference/directives-reference#client-directives) page for more infomation on all of the `client:` directives.

## Can I Hydrate Astro Components?

Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/core-concepts/framework-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ the user scrolls down and the component is visible on the page -->

There are serveral hydration directives available for UI framework components: `client:load`, `client:idle`, `client:visible`, `client:media={QUERY}` and `client:only=" "`.

📚 See our [directives reference](/en/reference/directives-reference#ui-framework-components) page for a full description of these hydration directives, and their usage.
📚 See our [directives reference](/en/reference/directives-reference#client-directives) page for a full description of these hydration directives, and their usage.

## Mixing Frameworks

Expand Down
6 changes: 3 additions & 3 deletions src/pages/en/core-concepts/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import MySiteLayout from '../layouts/MySiteLayout.astro';
```


📚 Learn more about [slots](/en/guides/slots).
📚 Learn more about [slots](/en/core-concepts/astro-components#slots).


## Nesting Layouts
Expand All @@ -70,7 +70,7 @@ const {content} = Astro.props;

## Markdown Layouts

Page layouts are especially useful for [Markdown files.](#markdown-pages) Markdown files can use the special `layout` front matter property to specify a layout component that will wrap their Markdown content in a full page HTML document.
Page layouts are especially useful for [Markdown files.](/en/guides/markdown-content#markdown-pages) Markdown files can use the special `layout` front matter property to specify a layout component that will wrap their Markdown content in a full page HTML document.

When a Markdown page uses a layout, it passes the layout a single `content` prop that includes all of the Markdown front matter data and final HTML output. See the `BlogPostLayout.astro` example above for an example of how you would use this `content` prop in your layout component.

Expand All @@ -85,4 +85,4 @@ layout: ../layouts/BlogPostLayout.astro
This is a post written in Markdown.
```

📚 Learn more about Astro’s Markdown support in our [Markdown guide](/en/guides/markdown-content).
📚 Learn more about Astro’s Markdown support in our [Markdown guide](/en/guides/markdown-content).
2 changes: 1 addition & 1 deletion src/pages/en/guides/configuring-astro.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Astro supports several file formats for its JavaScript configuration file: `astr
TypeScript config file loading is handled using [`tsm`](https://github.com/lukeed/tsm) and will respect your project tsconfig options.
## Config File Resolving

Astro will automatically try to resolve a config file named `astro.config.mjs` inside [project root](/guide/#index-html-and-project-root). If no config file is found in your project root, Astro's default options will be used.
Astro will automatically try to resolve a config file named `astro.config.mjs` inside project root. If no config file is found in your project root, Astro's default options will be used.

```bash
# Example: Reads your configuration from ./astro.config.mjs
Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/guides/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This can be useful for debugging differences between the SSR output and the hydr

## Astro `<Debug />` Component

To help you debug your Astro components, Astro provides a built-in [`<Debug />`](/en/reference/builtin-components#debug-) component which renders any value directly into your component HTML template. This is useful for quick debugging in the browser without having to flip back-and-forth between your terminal and your browser.
To help you debug your Astro components, Astro provides a built-in [`<Debug />`](/en/reference/api-reference/#debug-) component which renders any value directly into your component HTML template. This is useful for quick debugging in the browser without having to flip back-and-forth between your terminal and your browser.

```astro
---
Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/guides/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Use the following build settings:
- **Framework preset**: `Astro`
- **Build command:** `npm run build`
- **Build output directory:** `dist`
- **Environment variables (advanced)**: Currently, Cloudflare Pages supports `NODE_VERSION = 12.18.0` in the Pages build environment by default. Astro requires `14.15.0`, `v16.0.0`, or higher. You can add an environment variable with the **Variable name** of `NODE_VERSION` and a **Value** of a [Node version that’s compatible with Astro](https://docs.astro.build/install#prerequisites) or by specifying the node version of your project in a `.nvmrc` or `.node-version` file.
- **Environment variables (advanced)**: Currently, Cloudflare Pages supports `NODE_VERSION = 12.18.0` in the Pages build environment by default. Astro requires `14.15.0`, `v16.0.0`, or higher. You can add an environment variable with the **Variable name** of `NODE_VERSION` and a **Value** of a [Node version that’s compatible with Astro](/en/install/auto#prerequisites) or by specifying the node version of your project in a `.nvmrc` or `.node-version` file.

Then click the **Save and Deploy** button.

Expand Down
6 changes: 3 additions & 3 deletions src/pages/en/guides/markdown-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ layout: ../layouts/BaseLayout.astro
A typical layout for Markdown pages includes:

1. the content prop to access the Markdown page's frontmatter data.
2. a default [`<slot />`](/en/guides/slots) to indicate where the page's Markdown content should be rendered.
2. a default [`<slot />`](/en/core-concepts/astro-components#slots) to indicate where the page's Markdown content should be rendered.


```astro
Expand Down Expand Up @@ -209,7 +209,7 @@ back to it later.

Astro has a dedicated component used to let you render Markdown in `.astro` files.

You can import the [built-in Astro Markdown component](/en/reference/builtin-components#markdown) in your component script and then write any Markdown you want between `<Markdown> </Markdown>` tags.
You can import the [built-in Astro Markdown component](/en/reference/api-reference#markdown-) in your component script and then write any Markdown you want between `<Markdown> </Markdown>` tags.

````astro
---
Expand Down Expand Up @@ -352,7 +352,7 @@ export default {

Astro comes with built-in support for [Shiki](https://shiki.matsu.io/) and [Prism](https://prismjs.com/). This provides instant syntax highlighting for:
- all code fences (\`\`\`) used in a markdown (`.md`) file and the [built-in `<Markdown />` component](#markdown-component).
- content within the [built-in `<Code />` component](/en/reference/builtin-components/#code-) (powered by Shiki), or the [`<Prism />` component](/en/reference/builtin-components/#prism-) (powered by Prism).
- content within the [built-in `<Code />` component](/en/reference/api-reference/#code-) (powered by Shiki), or the [`<Prism />` component](/en/reference/api-reference/#prism-) (powered by Prism).

Shiki is enabled by default, preconfigured with the `github-dark` theme. The compiled output will be limited to inline `style`s without any extraneous CSS classes, stylesheets, or client-side JS.

Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/guides/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const backgroundColor = "rgb(24 121 78)";
<h1>Hello</h1>
```

📚 See our [directives reference](/en/reference/directives-reference#definevarsvariables) page to learn more about `define:vars`.
📚 See our [directives reference](/en/reference/directives-reference#definevars) page to learn more about `define:vars`.

## External Styles

Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Unlike the old renderers, integrations no longer mark the frameworks themselves
+ npm install @astrojs/react react react-dom
```

If you see a `"Cannot find package 'react'"` (or similar) warning when you start up Astro, that means that you need to install that package into your project. See our [note on peer dependencies](/en/guides/integrations-guide#peer-dependencies-warning) in the integrations guide for more information.
If you see a `"Cannot find package 'react'"` (or similar) warning when you start up Astro, that means that you need to install that package into your project. See our [note on peer dependencies](/en/guides/integrations-guide/#handling-integration-dependencies) in the integrations guide for more information.

If you are using `npm` & Node v16+, then this may be automatically handled for you by `npm`, since the latest version of `npm` (v7+) installs peer dependencies like this for you automatically. In that case, installing a framework like "react" into your project is an optional but still recommended step.

Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ export async function getStaticPaths() {
return posts.map((post) => {
return {
params: { id: post.id },
props: { post };
props: { post }
};
});
}
const {id} = Astro.params;
Expand Down

0 comments on commit ff252d9

Please sign in to comment.