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

polish(create-docusaurus): add comment in config to mention different ways to declare config + doc link #8944

Merged
merged 4 commits into from
May 3, 2023
Merged
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// Note: '@type' annotations throughout allow type checking and IDEs autocompletion

// NOTE: In this default config, we declare a JS constant 'const config ='
// to further help your IDE give TypeScript hints while editing this file.
// 'module.exports =' at the very bottom is the syntax that uses
// that 'config' constant. There is not a single way/syntax to declare
// your config within this file. In fact, you have the full power of
// Node.js, as long as you return an object that matches the shape we
// expect with 'module.exports =' (or a function that creates that object).
// Our docs give examples of putting things inside 'module.exports = { }'
// which in this file is equivalent to putting into 'config = { }' instead,
// It's completely your choice.
// See also: https://docusaurus.io/docs/api/docusaurus-config#overview
thadguidry marked this conversation as resolved.
Show resolved Hide resolved

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').Config} */
// 'config' gets used at the bottom of this file with 'module.exports ='
thadguidry marked this conversation as resolved.
Show resolved Hide resolved
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
Expand Down