11// @ts -check
2- /* eslint-disable @typescript-eslint/no-var-requires */
32/* eslint-disable no-undef */
43/* eslint-disable @typescript-eslint/ban-ts-comment */
54
1211 * https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
1312 *
1413 */
14+ import generated from '@csstools/postcss-global-data' ;
15+ import postcss_custom_media from 'postcss-custom-media' ;
16+ import autoprefixer from 'autoprefixer' ;
17+
1518const createConfig = async ( ) => {
1619 const { arrowDark : darkCodeTheme } = await import (
1720 './src/utils/arrowDark.mjs'
@@ -29,13 +32,20 @@ const createConfig = async () => {
2932 projectName : 'arrow-website' , // Usually your repo name.
3033
3134 onBrokenLinks : 'throw' ,
32- onBrokenMarkdownLinks : 'warn' ,
3335
3436 i18n : {
3537 defaultLocale : 'en' ,
3638 locales : [ 'en' ] ,
3739 } ,
3840
41+ future : {
42+ experimental_faster : true ,
43+ v4 : {
44+ removeLegacyPostBuildHeadAttribute : true ,
45+ } ,
46+ // v4: true,
47+ } ,
48+
3949 presets : [
4050 [
4151 'classic' ,
@@ -45,7 +55,7 @@ const createConfig = async () => {
4555 path : 'content/docs' ,
4656 routeBasePath : '/' ,
4757 sidebarPath : require . resolve ( './sidebars.js' ) ,
48- editUrl : 'https://github.com/arrow-kt/arrow-website/edit/main/' ,
58+ // editUrl: 'https://github.com/arrow-kt/arrow-website/edit/main/',
4959 breadcrumbs : false ,
5060 } ,
5161 pages : {
@@ -60,7 +70,8 @@ const createConfig = async () => {
6070 blogTagsPostsComponent :
6171 '@site/src/components/Blog/BlogTagsPostsPage' ,
6272 postsPerPage : 8 ,
63- editUrl : 'https://github.com/arrow-kt/arrow-website/edit/main/' ,
73+ // editUrl: 'https://github.com/arrow-kt/arrow-website/edit/main/',
74+ onUntruncatedBlogPosts : 'ignore' ,
6475 } ,
6576 theme : {
6677 customCss : [
@@ -172,7 +183,8 @@ const createConfig = async () => {
172183 {
173184 type : 'html' ,
174185 position : 'right' ,
175- value : '<img src="https://img.shields.io/maven-central/v/io.arrow-kt/arrow-core?color=5b88f8&label=latest">' ,
186+ value :
187+ '<img src="https://img.shields.io/maven-central/v/io.arrow-kt/arrow-core?color=5b88f8&label=latest">' ,
176188 } ,
177189 ] ,
178190 } ,
@@ -318,18 +330,21 @@ const createConfig = async () => {
318330 // Appends Global Data, Custom Media and AutoPrefixer.
319331 postcssOptions . plugins . push (
320332 // @ts -ignore
321- require ( '@csstools/postcss-global-data' ) ( {
333+ generated ( {
322334 files : [ './src/css/vars.css' ] ,
323335 } ) ,
324336 ) ;
325- postcssOptions . plugins . push ( require ( 'postcss-custom-media' ) ) ;
326- postcssOptions . plugins . push ( require ( ' autoprefixer' ) ) ;
337+ postcssOptions . plugins . push ( postcss_custom_media ) ;
338+ postcssOptions . plugins . push ( autoprefixer ) ;
327339 return postcssOptions ;
328340 } ,
329341 } ) ,
330342 ] ,
331343 markdown : {
332344 mermaid : true ,
345+ hooks : {
346+ onBrokenMarkdownLinks : 'throw' ,
347+ } ,
333348 } ,
334349 themes : [
335350 '@docusaurus/theme-mermaid' ,
0 commit comments