Skip to content

Commit

Permalink
Merge branch 'main' into rendering-modes
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah11918 authored Nov 9, 2023
2 parents 34b2a4e + 22282e2 commit 7b590ed
Show file tree
Hide file tree
Showing 84 changed files with 7,302 additions and 236 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"astro-auto-import": "^0.3.1",
"astro-eslint-parser": "^0.9.2",
"astro-expressive-code": "^0.20.0",
"astro-og-canvas": "^0.2.1",
"astro-og-canvas": "^0.3.0",
"bcp-47-normalize": "^2.1.0",
"canvaskit-wasm": "^0.37.0",
"dedent-js": "^1.0.1",
Expand Down
13 changes: 9 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/content/docs/en/core-concepts/astro-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ Named slots can also be passed to [UI framework components](/en/core-concepts/fr
:::


:::note
An astro slot name can not be dynamically generated, such as within a map function. If this feature is needed within UI framework components, it might be best to generate these dynamic slots within the framework itself.
:::


### Fallback Content for Slots
Slots can also render **fallback content**. When there are no matching children passed to a slot, a `<slot />` element will render its own placeholder children.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/cms/storyblok.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ To connect your newly created Bloks to Astro components, create a new folder nam
```astro title="src/storyblok/Page.astro"
---
import { storyblokEditable } from '@storyblok/astro'
import StoryblokComponent from '@storyblok/astro/StoryblokComponent.astro'
import StoryblokComponent from '@storyblok/astro/components/StoryblokComponent';
const { blok } = Astro.props
---
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/guides/cms/tina-cms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To get started, you'll need an existing Astro project.
{
"scripts": {
"dev": "astro dev",
"dev": "tinacms dev -c 'astro dev'"
"dev": "tinacms dev -c \"astro dev\""
}
}
```
Expand All @@ -60,7 +60,7 @@ To get started, you'll need an existing Astro project.
{
"scripts": {
"dev": "astro dev",
"dev": "tinacms dev -c 'astro dev'"
"dev": "tinacms dev -c \"astro dev\""
}
}
```
Expand All @@ -71,7 +71,7 @@ To get started, you'll need an existing Astro project.
{
"scripts": {
"dev": "astro dev",
"dev": "tinacms dev -c 'astro dev'"
"dev": "tinacms dev -c \"astro dev\""
}
}
```
Expand Down
16 changes: 16 additions & 0 deletions src/content/docs/en/guides/content-collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import FileTree from '~/components/FileTree.astro'
import Since from '~/components/Since.astro'
import TypeScriptSettingTabs from '~/components/tabs/TypeScriptSettingTabs.astro'
import RecipeLinks from "~/components/RecipeLinks.astro"
import Badge from "~/components/Badge.astro"


<p>
Expand Down Expand Up @@ -542,6 +543,21 @@ If you have an existing Astro project, such as a blog, that uses Markdown or MDX

See how to convert a basic blog example from `src/pages/posts/` to `src/content/posts` in our [step-by-step tutorial](/en/tutorials/add-content-collections/) that uses the codebase from [the Build a Blog tutorial's finished project](https://github.com/withastro/blog-tutorial-demo).

## Enabling Build Caching

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

If you are working with large collections, you may wish to enable cached builds with the [`experimental.contentCollectionCache`](/en/reference/configuration-reference/#experimentalcontentcollectioncache) flag. This experimental feature optimizes Astro's build process, enabling unchanged collections to be stored and reused between builds.

In many cases, this can lead to significant build performance improvements.

While this feature stabilizes, you may run into issues with the stored cache. You can always reset your build cache by running the following command:

```
npm run astro build -- --force
```


## Modifying Frontmatter with Remark

:::caution
Expand Down
42 changes: 21 additions & 21 deletions src/content/docs/en/guides/deploy/gitlab.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ Check out [the official GitLab Pages Astro example project](https://gitlab.com/p
4. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:

```yaml
# The Docker image that will be used to build your app
image: node:lts

before_script:
- npm ci

pages:
script:
# Specify the steps involved to build your app here
- npm run build

artifacts:
paths:
# The folder that contains the built files to be published.
# This must be called "public".
- public

only:
# Trigger a new build and deploy only when there is a push to the
# branch(es) below
- main
pages:
# The Docker image that will be used to build your app
image: node:lts

before_script:
- npm ci

script:
# Specify the steps involved to build your app here
- npm run build

artifacts:
paths:
# The folder that contains the built files to be published.
# This must be called "public".
- public

only:
# Trigger a new build and deploy only when there is a push to the
# branch(es) below
- main
```
2 changes: 2 additions & 0 deletions src/content/docs/en/guides/integrations-guide/prefetch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import DontEditWarning from '~/components/DontEditWarning.astro';

<DontEditWarning/>

> NOTE: `@astrojs/prefetch` is deprecated. Use the `prefetch` feature in Astro 3.5 instead. Check out the [migration guide](/en/guides/prefetch/#migrating-from-astrojsprefetch).
## Why Prefetch?

Page load times play a big role in usability and overall enjoyment of a site. This integration brings the benefits of near-instant page navigations to your multi-page application (MPA) by prefetching page links when they are visible on screen.
Expand Down
Loading

0 comments on commit 7b590ed

Please sign in to comment.