-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge main into redesign (#5385)
* feat: introduce built-in next.js exports and updated scripts and configs (#5384) * chore: updated gitignore and rmeoved robots.txt * chore: updated next-sitemap config * chore: next-config refactored options and export support * chore: updated imports to node: prefix * chore: updated contributing guidelines * chore: updated scripts * chore: updated next-sitemap * chore: added missing props * fix: github-pages * chore: remove unused package * fix(storybook): update packages (#5386) --------- Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
- Loading branch information
Showing
15 changed files
with
596 additions
and
702 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
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
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
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
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
// This is used for telling Next.js to to a Static Export Build of the Website | ||
// We use this within this config file to determine the output directory of this generated sitemap files | ||
const enableStaticExport = process.env.NEXT_STATIC_EXPORT === 'true'; | ||
|
||
/** @type {import('next-sitemap').IConfig} */ | ||
const sitemapConfig = { | ||
siteUrl: 'https://nodejs.org', | ||
changefreq: 'always', | ||
trailingSlash: false, | ||
generateRobotsTxt: true, | ||
generateIndexSitemap: false, | ||
outDir: enableStaticExport ? 'build' : 'public', | ||
sourceDir: enableStaticExport ? 'build' : '.next', | ||
output: enableStaticExport ? 'export' : undefined, | ||
robotsTxtOptions: { | ||
policies: [ | ||
{ | ||
userAgent: '*', | ||
disallow: ['/dist/', '/docs/'], | ||
allow: ['/dist/latest/', '/dist/latest/docs/api/', '/api/'], | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export default sitemapConfig; |
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
Oops, something went wrong.