-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent building .html files in hybrid mode (#7805)
* Prevent building .html files in hybrid mode * Adding a changeset
- Loading branch information
Showing
6 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/netlify': patch | ||
--- | ||
|
||
Prevent building .html file redirects in hybrid mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/integrations/netlify/test/functions/fixtures/redirects/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
export const prerender = false; | ||
--- | ||
<html> | ||
<head><title>Testing</title></head> | ||
<body> | ||
<h1>Testing</h1> | ||
</body> | ||
</html> |
3 changes: 3 additions & 0 deletions
3
packages/integrations/netlify/test/functions/fixtures/redirects/src/pages/nope.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
return Astro.redirect('/'); | ||
--- |
27 changes: 27 additions & 0 deletions
27
...rations/netlify/test/functions/fixtures/redirects/src/pages/team/articles/[...slug].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
export const prerender = false; | ||
export const getStaticPaths = (async () => { | ||
const posts = [ | ||
{ slug: 'one', data: {draft: false, title: 'One'} }, | ||
{ slug: 'two', data: {draft: false, title: 'Two'} } | ||
]; | ||
return posts.map((post) => { | ||
return { | ||
params: { slug: post.slug }, | ||
props: { draft: post.data.draft, title: post.data.title }, | ||
}; | ||
}); | ||
}) | ||
const { slug } = Astro.params; | ||
const { title } = Astro.props; | ||
--- | ||
<html> | ||
<head> | ||
<title>{ title }</title> | ||
</head> | ||
<body> | ||
<h1>{ title }</h1> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters