-
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.
feat: introduce built-in next.js exports and updated scripts and conf…
…igs (#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
- Loading branch information
Showing
13 changed files
with
109 additions
and
100 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
1a96f18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nodejs-org-stories – ./
nodejs-org-stories-openjs.vercel.app
nodejs-org-stories-git-main-openjs.vercel.app
nodejs-org-storybook.vercel.app
1a96f18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nodejs-org – ./
nodejs-org-git-main-openjs.vercel.app
node-js-org.vercel.app
nodejs-org-openjs.vercel.app