Docs redesign (#728)

* Adding a dark mode
* Adding reference for types to summary pages
* Adding API Reference
* Adding modifiers to methods/fields/etc
* Minimizing files input
* Caching a lot of the output pages
* Cache only for each execution
* Adding API references to existing docs
This commit is contained in:
Phil Scott
2022-02-14 12:44:25 -05:00
committed by GitHub
parent 74a2e10ff0
commit c2da268129
147 changed files with 4112 additions and 6897 deletions

View File

@ -1,17 +1,15 @@
const defaultTheme = require("tailwindcss/defaultTheme");
const colors = require("tailwindcss/colors");
module.exports = {
purge: ["./output/**/*.html"],
mode: 'jit',
darkMode: false, // or 'media' or 'class'
content: ["./output/**/*.html"],
darkMode: "class",
theme: {
extend: {
fontFamily: {
sans: ["Poppins", ...defaultTheme.fontFamily.sans],
mono: ["ui-monospace", "Cascadia Mono", "Cascadia Code", "Menlo", "Consolas", "Liberation Mono", "Lucida Console", "WebCascadiaMonoPL", "monospace"],
},
container: {
container: ({theme}) => ({
center: true,
padding: {
DEFAULT: "2rem",
@ -20,35 +18,61 @@ module.exports = {
xl: "5rem",
"2xl": "6rem",
},
},
screens: {
sm: theme("spacing.full"),
md: theme("spacing.full"),
lg: "1280px",
xl: "1400px",
},
}),
typography: (theme) => ({
DEFAULT: {
css: {
color: defaultTheme.colors.gray[900],
a: {
color: defaultTheme.colors.blue[700],
fontWeight: defaultTheme.fontWeight.normal,
"&:hover": {
color: defaultTheme.colors.blue[600],
},
h2: {
marginTop: '1.4em',
marginBottom: `.2em`,
},
"pre code": {
fontWeight: defaultTheme.fontWeight.light,
h3: {
marginTop: '2.4em',
lineHeight: '1.4',
},
pre: {
fontWeight: theme("fontWeight.light"),
borderRadius: theme('borderRadius.xl'),
borderWidth: '1px',
borderColor: theme('colors.slate.700'),
color: theme('colors.slate.50'),
boxShadow: theme('boxShadow.md'),
lineHeight: '1.3',
},
'p + pre, p + asciinema-player pre': {
marginTop: `${-4 / 14}em`,
},
'pre + pre': {
marginTop: `${-16 / 14}em`,
},
code: {
color: defaultTheme.colors.blue[900],
fontWeight: defaultTheme.fontWeight.normal,
fontWeight: theme("fontWeight.normal"),
fontSize: 'inherit',
},
"code::before": {
content: " ",
},
"code::after": {
content: " ",
},
h2: {
marginTop: "1em",
marginBottom: ".5em"
}
td: {
overflowWrap: "anywhere",
},
a: {
fontWeight: theme('fontWeight.light'),
textDecoration: 'none',
borderBottom: `1px solid ${theme('colors.teal.600')}`,
},
'a:hover': {
borderBottomWidth: '2px',
},
},
},
}),