Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add spacing to 'added in' texts #5765

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/en/core-concepts/astro-pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ This will build to a `404.html` page. Most [deploy services](/en/guides/deploy/)

## Page Partials

<Since v="3.4.0" />
<p><Since v="3.4.0" /></p>

:::caution
Page partials are intended to be used in conjunction with a front-end library, such as [htmx](https://htmx.org/) or [Unpoly](https://unpoly.com/). You can also use them if you are comfortable writing low-level front-end JavaScript. For this reason they are an advanced feature.
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/en/core-concepts/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ Sometimes you will need to redirect your readers to a new page, either permanent
You can define rules to [redirect users to permanently-moved pages](#configured-redirects) in your Astro config. Or, [redirect users dynamically](#dynamic-redirects) as they use your site.

### Configured Redirects
<Since v="2.9.0" />

<p><Since v="2.9.0" /></p>

You can specify a mapping of permanent redirects in your Astro config with the `redirects` value. For most redirects, this is a mapping of an old route to the new route:

Expand Down
4 changes: 1 addition & 3 deletions src/content/docs/en/guides/content-collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import RecipeLinks from "~/components/RecipeLinks.astro"
import Badge from "~/components/Badge.astro"


<p>
<Since v="2.0.0" />
</p>
<p><Since v="2.0.0" /></p>

**Content collections** are the best way to manage and author content in any Astro project. Collections help to organize your documents, validate your frontmatter, and provide automatic TypeScript type-safety for all of your content.

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/guides/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ However, both of these properties are required for remote images and images stor

##### densities

<Since v="3.3.0" /> <Badge>Experimental</Badge>
<p><Since v="3.3.0" /> <Badge>Experimental</Badge></p>

A list of pixel densities to generate for the image.

Expand Down Expand Up @@ -182,7 +182,7 @@ import myImage from "../assets/my_image.png";

##### widths

<Since v="3.3.0" /> <Badge>Experimental</Badge>
<p><Since v="3.3.0" /> <Badge>Experimental</Badge></p>

A list of widths to generate for the image.

Expand Down Expand Up @@ -294,7 +294,7 @@ const {src, ...attrs} = Astro.props;

### `<Picture />`

<Since v="3.3.0" />
<p><Since v="3.3.0" /></p>

Use the built-in `<Picture />` Astro component to display a responsive image with multiple formats and/or sizes.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/internationalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Astro's internationalization (i18n) features allow you to adapt your project for

## i18n Routing

<Since v="3.5.0" />
<p><Since v="3.5.0" /></p>

Astro's i18n routing allows you to add your multilingual content with support for configuring a default language, computing relative page URLs, and accepting preferred languages provided by your visitor's browser. You can also specify fallback languages on a per-language basis so that your visitors can always be directed to existing content on your site.

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/en/guides/rss.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const collections = { blog };

### Using glob imports

<Since v="2.1.0" pkg="@astrojs/rss" />
<p><Since v="2.1.0" pkg="@astrojs/rss" /></p>

To create an RSS feed from documents in `src/pages/`, use the `pagesGlobToRssItems()` helper. This accepts an [`import.meta.glob`](https://vitejs.dev/guide/features.html#glob-import) result and outputs an array of valid RSS feed items (see [more about writing glob patterns](/en/guides/imports/#glob-patterns) for specifying which pages to include).

Expand Down Expand Up @@ -149,7 +149,7 @@ items: import.meta.glob('./blog/*.{md,mdx}'),

### Including full post content

<Since v="1.6.14" />
<p><Since v="1.6.14" /></p>

The `content` key contains the full content of the post as HTML. This allows you to make your entire post content available to RSS feed readers.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const { isRed } = Astro.props;

### CSS Variables

<Since v="0.21.0" />
<p><Since v="0.21.0" /></p>

The Astro `<style>` can reference any CSS variables available on the page. You can also pass CSS variables directly from your component frontmatter using the `define:vars` directive.

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const { greeting = 'Hello', name } = Astro.props;

## Type Utilities

<Since v="1.6.0" />
<p><Since v="1.6.0" /></p>

Astro comes with some built-in utility types for common prop type patterns. These are available under the `astro/types` entrypoint.

Expand Down Expand Up @@ -211,7 +211,7 @@ type MyAttributes = astroHTML.JSX.ImgHTMLAttributes;

### Polymorphic type

<Since v="2.5.0" />
<p><Since v="2.5.0" /></p>

Astro includes a helper to make it easier to build components that can render as different HTML elements with full type safety. This is useful for components like `<Link>` that can render as either `<a>` or `<button>` depending on the props passed to it.

Expand All @@ -231,7 +231,7 @@ const { as: Tag, ...props } = Astro.props;

### Infer `getStaticPaths()` types

<Since v="2.1.0" />
<p><Since v="2.1.0" /></p>

Astro includes helpers for working with the types returned by your [`getStaticPaths()`](/en/reference/api-reference/#getstaticpaths) function for dynamic routes.

Expand Down
12 changes: 6 additions & 6 deletions src/content/docs/en/guides/view-transitions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Note that the provided `transition:name` value can only be used once on each pag

### Maintaining State

<Since v="2.10.0" />
<p><Since v="2.10.0" /></p>

You can persist components and HTML elements (instead of replacing them) across page navigations using the `transition:persist` directive.

Expand Down Expand Up @@ -370,7 +370,7 @@ This has the effect that if you go back from the `/main` page, the browser will

### Transitions with forms

<Since v="4.0.0" />
<p><Since v="4.0.0" /></p>

The `<ViewTransitions />` router also supports navigation triggered by form submissions.

Expand Down Expand Up @@ -486,7 +486,7 @@ While some actions can be triggered during any event, some tasks can only be per

### `astro:before-preparation`

<Since v="3.6.0" />
<p><Since v="3.6.0" /></p>

An event that fires at the beginning of the preparation phase, after navigation has started (e.g. after the user has clicked a link), but before content is loaded.

Expand Down Expand Up @@ -514,7 +514,7 @@ Here is an example of using the `astro:before-preparation` event to load a spinn

### `astro:after-preparation`

<Since v="3.6.0" />
<p><Since v="3.6.0" /></p>

An event that fires at the end of the preparation phase, after the new page's content has been loaded and parsed into a document. This event occurs before the view transitions phase.

Expand All @@ -534,7 +534,7 @@ This is a simpler version of loading a spinner than the example shown above: if

### `astro:before-swap`

<Since v="3.6.0" />
<p><Since v="3.6.0" /></p>

An event that fires before the new document (which is populated during the preparation phase) replaces the current document. This event occurs inside of the view transition, where the user is still seeing a snapshot of the old page.

Expand Down Expand Up @@ -609,7 +609,7 @@ Enabling client-side routing and animating page transitions both come with acces

### Route announcement

<Since v="3.2.0" />
<p><Since v="3.2.0" /></p>

The `<ViewTransitions />` component includes a route announcer for page navigation during client-side routing. No configuration or action is needed to enable this.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/adapter-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Once you [publish your adapter to npm](https://docs.npmjs.com/cli/v8/commands/np

## Astro features

<Since v="3.0.0" />
<p><Since v="3.0.0" /></p>

Astro features are a way for an adapter to tell Astro whether they are able to support a feature, and also the adapter's level of support.

Expand Down
28 changes: 10 additions & 18 deletions src/content/docs/en/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Astro.response.headers.set('Set-Cookie', 'a=b; Path=/;');

### `Astro.cookies`

<Since v="1.4.0" />
<p><Since v="1.4.0" /></p>

`Astro.cookies` contains utilities for reading and manipulating cookies in [server-side rendering](/en/guides/server-side-rendering/) mode.

Expand Down Expand Up @@ -255,7 +255,7 @@ The [canonical URL][canonical] of the current page.

### `Astro.url`

<Since v="1.0.0-rc" />
<p><Since v="1.0.0-rc" /></p>

A [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) object constructed from the current `Astro.request.url` URL string value. Useful for interacting with individual properties of the request URL, like pathname and origin.

Expand All @@ -282,7 +282,7 @@ const socialImageURL = new URL('/images/preview.png', Astro.url);

### `Astro.clientAddress`

<Since v="1.0.0-rc" />
<p><Since v="1.0.0-rc" /></p>

Specifies the [IP address](https://en.wikipedia.org/wiki/IP_address) of the request. This property is only available when building for SSR (server-side rendering) and should not be used for static sites.

Expand All @@ -300,7 +300,7 @@ const ip = Astro.clientAddress;

### `Astro.generator`

<Since v="1.0.0" />
<p><Since v="1.0.0" /></p>

`Astro.generator` is a convenient way to add a [`<meta name="generator">`](https://html.spec.whatwg.org/multipage/semantics.html#meta-generator) tag with your current version of Astro. It follows the format `"Astro v1.x.x"`.

Expand Down Expand Up @@ -841,9 +841,7 @@ It returns an object with the following properties:

## Content Collections (`astro:content`)

<p>
<Since v="2.0.0" />
</p>
<p><Since v="2.0.0" /></p>

Content collections offer APIs to configure and query your Markdown or MDX documents in `src/content/`. For features and usage examples, [see our content collections guide](/en/guides/content-collections/).

Expand Down Expand Up @@ -871,7 +869,7 @@ This function accepts the following properties:

#### `type`

<Since v="2.5" />
<p><Since v="2.5.0" /></p>

**Type:** `'content' | 'data'`
**Default:** `'content'`
Expand Down Expand Up @@ -950,9 +948,7 @@ const draftBlogPosts = await getCollection('blog', ({ data }) => {

### `getEntry()`

<p>
<Since v="2.5.0" />
</p>
<p><Since v="2.5.0" /></p>

**Types:**

Expand Down Expand Up @@ -981,9 +977,7 @@ See the `Content Collections` guide for examples of [querying collection entries

### `getEntries()`

<p>
<Since v="2.5" />
</p>
<p><Since v="2.5.0" /></p>

**Types:**

Expand Down Expand Up @@ -1146,9 +1140,7 @@ const blog = defineCollection({

## Middleware (`astro:middleware`)

<p>
<Since v="2.6.0" />
</p>
<p><Since v="2.6.0" /></p>

Middleware allows you to intercept requests and responses and inject behaviors dynamically every time a page or endpoint is about to be rendered. For features and usage examples, [see our middleware guide](/en/guides/middleware/).

Expand Down Expand Up @@ -1309,7 +1301,7 @@ See more in the [Images Guide](/en/guides/images/#image--astroassets).

### `<Picture />`

<Since v="3.3.0" />
<p><Since v="3.3.0" /></p>

Use the built-in `<Picture />` Astro component to display a responsive image with multiple formats and/or sizes.

Expand Down
8 changes: 3 additions & 5 deletions src/content/docs/en/reference/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,7 @@ The command will watch for any changes in your project, and will report any erro

## `astro sync`

<p>
<Since v="2.0.0" />
</p>
<p><Since v="2.0.0" /></p>

:::tip
Running `astro dev`, `astro build` or `astro check` will run the `sync` command as well.
Expand Down Expand Up @@ -374,7 +372,7 @@ astro --config config/astro.config.mjs dev

### `--outDir <path>`

<Since v="3.3.0" />
<p><Since v="3.3.0" /></p>

Configures the [`outDir`](/en/reference/configuration-reference/#outdir) for your project. Passing this flag will override the `outDir` value in your `astro.config.mjs` file, if one exists.

Expand All @@ -384,7 +382,7 @@ Configures the [`site`](/en/reference/configuration-reference/#site) for your pr

### `--base <pathname>`

<Since v="1.4.1" />
<p><Since v="1.4.1" /></p>

Configures the [`base`](/en/reference/configuration-reference/#base) for your project. Passing this flag will override the `base` value in your `astro.config.mjs` file, if one exists.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/configuration-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ You can also set this if you prefer to be more strict yourself, so that URLs wit

**Type:** `'where' | 'class' | 'attribute'`<br />
**Default:** `'attribute'`<br />
<Since v="2.4" />
<Since v="2.4.0" />
</p>

Specify the strategy used for scoping styles within Astro components. Choose from:
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/en/reference/image-service-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ You must return a `format` to ensure that the proper MIME type is served to user
This hook returns all additional attributes used to render the image as HTML, based on the parameters passed by the user (`options`).

### `getSrcSet()`
<Since v="3.3.0" /> <Badge>Experimental</Badge>

<p><Since v="3.3.0" /> <Badge>Experimental</Badge></p>

**Optional for both local and external services.**

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/reference/integrations-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ addWatchFile(new URL('./tailwind.config.js', config.root));

#### `addClientDirective` option

<Since v="2.6.0" />
<p><Since v="2.6.0" /></p>

**Type:** `(directive:` [`ClientDirectiveConfig`](https://github.com/withastro/astro/blob/00327c213f74627ac9ca1dec774efa5bf71e9375/packages/astro/src/%40types/astro.ts#L1872-L1875) `) => void;`

Expand Down Expand Up @@ -220,7 +220,7 @@ declare module 'astro' {

#### `addDevToolbarApp` option

<Since v="3.4.0" />
<p><Since v="3.4.0" /></p>

**Type:** `(pluginEntrypoint: string) => void;`

Expand Down Expand Up @@ -270,7 +270,7 @@ export default {
```
#### `addMiddleware` option

<Since v="3.5.0" />
<p><Since v="3.5.0" /></p>

**Type:** `(middleware:` [`AstroIntegrationMiddleware`](https://github.com/withastro/astro/blob/852ac0f75dfca1b2602e9cdbfa0447d9998e2449/packages/astro/src/%40types/astro.ts#L2124-L2127) `) => void;`

Expand Down
Loading