Skip to content
Myr

docusaurus.config.js

This file

Path

website/docusaurus.config.js

96 lines · 2.1 KiB · JavaScript

Last changed by

docs: Add Ukraine bannerMichel Weststratebefore adoption4ef5cdc

History of this file

Take it

docs: Extended / updated documenation (#824)Michel Weststratebefore adoption847492c

line 1why, one step back
1// See https://v2.docusaurus.io/docs/configuration for more information.

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

lines 2–6why, one step back
2
3module.exports = {4 title: "Immer",5 tagline: "Create the next immutable state by mutating the current one.",6 url: "https://immerjs.github.io/",

chore: fixes for deploy previewMichel Weststratebefore adoption6fd5329

line 7why, one step back
7 baseUrl: process.env.NETLIFY_PREVIEW ? "/" : "/immer/",

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

lines 8–12why, one step back
8 projectName: "immer",
9 organizationName: "immerjs",10 onBrokenLinks: "throw",11 onBrokenMarkdownLinks: "warn",12 favicon: "img/favicon.ico",

docs: add chinese translation (#902)儿时before adoption53c2f91

line 13why, one step back
13 i18n: {

docs: Add Ukraine bannerMichel Weststratebefore adoption4ef5cdc

lines 14–15why, one step back
14 defaultLocale: "en",
15 locales: ["en", "zh-CN"]

docs: add chinese translation (#902)儿时before adoption53c2f91

line 16why, one step back
16 },

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

line 17why, one step back
17 themeConfig: {

docs: Add Ukraine bannerMichel Weststratebefore adoption4ef5cdc

lines 18–25why, one step back
18 announcementBar: {
19 id: "support_ukraine",20 content:21 'Support Ukraine 🇺🇦 <a target="_blank" rel="noopener noreferrer" href="https://opensource.fb.com/support-ukraine">Help Provide Humanitarian Aid to Ukraine</a>.',22 backgroundColor: "#20232a",23 textColor: "#fff",24 isCloseable: false25 },

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

lines 26–31why, one step back
26 googleAnalytics: {
27 trackingID: "UA-65632006-3",28 anonymizeIP: true29 },30 navbar: {31 title: "Immer",

docs: fix mobile navbar menu styles (#870)Sigurd Spieckermannbefore adoption6e7cd9a

line 32why, one step back
32 style: "dark",

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

lines 33–53why, one step back
33 logo: {
34 src: "/img/immer-logo.svg",35 alt: "Immer Logo"36 },37 items: [38 {39 type: "doc",40 docId: "introduction",41 label: "Documentation",42 position: "right"43 },44 {45 href: "https://github.com/immerjs/immer",46 label: "GitHub",47 position: "right"48 },49 {50 type: "doc",51 docId: "support",52 label: "Support Immer",53 position: "right"

docs: add chinese translation (#902)儿时before adoption53c2f91

lines 54–55why, one step back
54 },
55 {

docs: Add Ukraine bannerMichel Weststratebefore adoption4ef5cdc

lines 56–58why, one step back
56 type: "localeDropdown",
57 position: "left"58 }

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

lines 59–85why, one step back
59 ]
60 },61 footer: {62 copyright: `Copyright © ${new Date().getFullYear()} Michel Weststrate`63 }64 },65 scripts: [66 "https://buttons.github.io/buttons.js",67 "https://media.ethicalads.io/media/client/ethicalads.min.js"68 ],69 themes: [70 [71 "@docusaurus/theme-classic",72 {73 customCss: require.resolve("./src/css/immer-infima.css")74 }75 ]76 ],77 plugins: [78 [79 "@docusaurus/plugin-content-docs",80 {81 sidebarPath: require.resolve("./sidebars.js"),82 editUrl: "https://github.com/immerjs/immer/edit/master/website/",83 routeBasePath: "/"84 }85 ],

docs: setup automatic URL redirection, fixes #772Michel Weststratebefore adoptiona98b655

lines 86–94why, one step back
86 "@docusaurus/plugin-google-analytics",
87 [88 "@docusaurus/plugin-client-redirects",89 {90 createRedirects: function(existingPath) {91 return ["/docs" + existingPath]92 }93 }94 ]

docs: Update to docusaurus 2Michel Weststratebefore adoption42aac95

lines 95–96why, one step back
95 ]
96}