feat: add offline docs (#8527)

This commit is contained in:
Bruno Quaresma 2023-07-19 13:57:57 -03:00 committed by GitHub
parent 164672e5d3
commit acc12d3426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 5004 additions and 9 deletions

View File

@ -13,4 +13,5 @@ runs:
cache-dependency-path: "site/yarn.lock"
- name: Install node_modules
shell: bash
run: ./scripts/yarn_install.sh
run: ../scripts/yarn_install.sh
working-directory: site

View File

@ -259,6 +259,11 @@ jobs:
env:
CODER_BASE_IMAGE_TAG: ${{ steps.image-base-tag.outputs.tag }}
- name: Generate offline docs
run: |
version="$(./scripts/version.sh)"
make -j build/coder_docs_"$version".tgz
- name: ls build
run: ls -lh build

View File

@ -4,6 +4,8 @@
printWidth: 80
semi: false
trailingComma: all
useTabs: false
tabWidth: 2
overrides:
- files:
- README.md

View File

@ -356,10 +356,18 @@ build/coder_helm_$(VERSION).tgz:
--output "$@"
site/out/index.html: site/package.json $(shell find ./site $(FIND_EXCLUSIONS) -type f \( -name '*.ts' -o -name '*.tsx' \))
./scripts/yarn_install.sh
cd site
../scripts/yarn_install.sh
yarn build
offlinedocs/out/index.html: $(shell find ./offlinedocs $(FIND_EXCLUSIONS) -type f) $(shell find ./docs $(FIND_EXCLUSIONS) -type f | sed 's: :\\ :g')
cd offlinedocs
../scripts/yarn_install.sh
yarn export
build/coder_docs_$(VERSION).tgz: offlinedocs/out/index.html
tar -czf "$@" -C offlinedocs/out .
install: build/coder_$(VERSION)_$(GOOS)_$(GOARCH)$(GOOS_BIN_EXT)
install_dir="$$(go env GOPATH)/bin"
output_file="$${install_dir}/coder$(GOOS_BIN_EXT)"

View File

@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}

38
offlinedocs/.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
# content
public/images/

5
offlinedocs/next-env.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@ -0,0 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
trailingSlash: true,
}
module.exports = nextConfig

37
offlinedocs/package.json Normal file
View File

@ -0,0 +1,37 @@
{
"name": "coder-docs-generator",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "yarn copy-images && next dev",
"build": "next build",
"start": "next start",
"export": "yarn copy-images && next build && next export",
"copy-images": "sh ./scripts/copyImages.sh"
},
"dependencies": {
"@chakra-ui/react": "2.7.1",
"@emotion/react": "11",
"@emotion/styled": "11",
"archiver": "5.3.1",
"framer-motion": "6",
"front-matter": "4.0.2",
"fs-extra": "10.1.0",
"lodash": "4.17.21",
"next": "12.1.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "4.4.0",
"react-markdown": "8.0.3",
"rehype-raw": "6.1.1",
"remark-gfm": "3.0.1"
},
"devDependencies": {
"@types/node": "18.0.0",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.5",
"eslint": "8.17.0",
"eslint-config-next": "12.1.6",
"typescript": "4.7.3"
}
}

View File

@ -0,0 +1,544 @@
import {
Box,
Button,
Code,
Drawer,
DrawerBody,
DrawerCloseButton,
DrawerContent,
DrawerOverlay,
Flex,
Grid,
GridProps,
Heading,
Icon,
Img,
Link,
OrderedList,
Table,
TableContainer,
Td,
Text,
Th,
Thead,
Tr,
UnorderedList,
useDisclosure,
} from "@chakra-ui/react"
import fm from "front-matter"
import { readFileSync } from "fs"
import _ from "lodash"
import { GetStaticPaths, GetStaticProps, NextPage } from "next"
import Head from "next/head"
import NextLink from "next/link"
import { useRouter } from "next/router"
import path from "path"
import { MdMenu } from "react-icons/md"
import ReactMarkdown from "react-markdown"
import rehypeRaw from "rehype-raw"
import remarkGfm from "remark-gfm"
type FilePath = string
type UrlPath = string
type Route = {
path: FilePath
title: string
description?: string
children?: Route[]
}
type Manifest = { versions: string[]; routes: Route[] }
type NavItem = { title: string; path: UrlPath; children?: NavItem[] }
type Nav = NavItem[]
const readContentFile = (filePath: string) => {
const baseDir = process.cwd()
const docsPath = path.join(baseDir, "..", "docs")
return readFileSync(path.join(docsPath, filePath), { encoding: "utf-8" })
}
const removeTrailingSlash = (path: string) => path.replace(/\/+$/, "")
const removeMkdExtension = (path: string) => path.replace(/\.md/g, "")
const removeIndexFilename = (path: string) => {
if (path.endsWith("index")) {
path = path.replace("index", "")
}
return path
}
const removeREADMEName = (path: string) => {
if (path.startsWith("README")) {
path = path.replace("README", "")
}
return path
}
// transformLinkUri converts the links in the markdown file to
// href html links. All index page routes are the directory name, and all
// other routes are the filename without the .md extension.
// This means all relative links are off by one directory on non-index pages.
//
// index.md -> ./subdir/file = ./subdir/file
// index.md -> ../file-next-to-index = ./file-next-to-index
// file.md -> ./subdir/file = ../subdir/file
// file.md -> ../file-next-to-file = ../file-next-to-file
const transformLinkUriSource = (sourceFile: string) => {
return (href = "") => {
const isExternal = href.startsWith("http") || href.startsWith("https")
if (!isExternal) {
// Remove .md form the path
href = removeMkdExtension(href)
// Add the extra '..' if not an index file.
sourceFile = removeMkdExtension(sourceFile)
if (!sourceFile.endsWith("index")) {
href = "../" + href
}
// Remove the index path
href = removeIndexFilename(href)
href = removeREADMEName(href)
}
return href
}
}
const transformFilePathToUrlPath = (filePath: string) => {
// Remove markdown extension
let urlPath = removeMkdExtension(filePath)
// Remove relative path
if (urlPath.startsWith("./")) {
urlPath = urlPath.replace("./", "")
}
// Remove index from the root file
urlPath = removeIndexFilename(urlPath)
urlPath = removeREADMEName(urlPath)
// Remove trailing slash
if (urlPath.endsWith("/")) {
urlPath = removeTrailingSlash(urlPath)
}
return urlPath
}
const mapRoutes = (manifest: Manifest): Record<UrlPath, Route> => {
const paths: Record<UrlPath, Route> = {}
const addPaths = (routes: Route[]) => {
for (const route of routes) {
paths[transformFilePathToUrlPath(route.path)] = route
if (route.children) {
addPaths(route.children)
}
}
}
addPaths(manifest.routes)
return paths
}
let manifest: Manifest | undefined
const getManifest = () => {
if (manifest) {
return manifest
}
const manifestContent = readContentFile("manifest.json")
manifest = JSON.parse(manifestContent) as Manifest
return manifest
}
let navigation: Nav | undefined
const getNavigation = (manifest: Manifest): Nav => {
if (navigation) {
return navigation
}
const getNavItem = (route: Route, parentPath?: UrlPath): NavItem => {
const path = parentPath
? `${parentPath}/${transformFilePathToUrlPath(route.path)}`
: transformFilePathToUrlPath(route.path)
const navItem: NavItem = {
title: route.title,
path,
}
if (route.children) {
navItem.children = []
for (const childRoute of route.children) {
navItem.children.push(getNavItem(childRoute))
}
}
return navItem
}
navigation = []
for (const route of manifest.routes) {
navigation.push(getNavItem(route))
}
return navigation
}
const removeHtmlComments = (string: string) => {
return string.replace(/<!--[\s\S]*?-->/g, "")
}
export const getStaticPaths: GetStaticPaths = () => {
const manifest = getManifest()
const routes = mapRoutes(manifest)
const paths = Object.keys(routes).map((urlPath) => ({
params: { slug: urlPath.split("/") },
}))
return {
paths,
fallback: false,
}
}
export const getStaticProps: GetStaticProps = (context) => {
// When it is home page, the slug is undefined because there is no url path
// so we make it an empty string to work good with the mapRoutes
const { slug = [""] } = context.params as { slug: string[] }
const manifest = getManifest()
const routes = mapRoutes(manifest)
const urlPath = slug.join("/")
const route = routes[urlPath]
const { body } = fm(readContentFile(route.path))
// Serialize MDX to support custom components
const content = removeHtmlComments(body)
const navigation = getNavigation(manifest)
const version = manifest.versions[0]
return {
props: {
content,
navigation,
route,
version,
},
}
}
const SidebarNavItem: React.FC<{ item: NavItem; nav: Nav }> = ({
item,
nav,
}) => {
const router = useRouter()
let isActive = router.asPath.startsWith(`/${item.path}`)
// Special case to handle the home path
if (item.path === "") {
isActive = router.asPath === "/"
// Special case to handle the home path children
const homeNav = nav.find((navItem) => navItem.path === "") as NavItem
const homeNavPaths = homeNav.children?.map((item) => `/${item.path}/`) ?? []
if (homeNavPaths.includes(router.asPath)) {
isActive = true
}
}
return (
<Box>
<NextLink href={"/" + item.path} passHref>
<Link
fontWeight={isActive ? 600 : 400}
color={isActive ? "gray.900" : "gray.700"}
>
{item.title}
</Link>
</NextLink>
{isActive && item.children && (
<Grid
as="nav"
pt={2}
pl={3}
maxW="sm"
autoFlow="row"
gap={2}
autoRows="min-content"
>
{item.children.map((subItem) => (
<SidebarNavItem key={subItem.path} item={subItem} nav={nav} />
))}
</Grid>
)}
</Box>
)
}
const SidebarNav: React.FC<{ nav: Nav; version: string } & GridProps> = ({
nav,
version,
...gridProps
}) => {
return (
<Grid
h="100vh"
overflowY="scroll"
as="nav"
p={8}
w="300px"
autoFlow="row"
gap={2}
autoRows="min-content"
bgColor="white"
borderRightWidth={1}
borderColor="gray.200"
borderStyle="solid"
{...gridProps}
>
<Box mb={6}>
<Img src="/logo.svg" alt="Coder logo" />
</Box>
{nav.map((navItem) => (
<SidebarNavItem key={navItem.path} item={navItem} nav={nav} />
))}
</Grid>
)
}
const MobileNavbar: React.FC<{ nav: Nav; version: string }> = ({
nav,
version,
}) => {
const { isOpen, onOpen, onClose } = useDisclosure()
return (
<>
<Flex
bgColor="white"
px={6}
alignItems="center"
h={16}
borderBottomWidth={1}
>
<Img src="/logo.svg" alt="Coder logo" w={28} />
<Button variant="ghost" ml="auto" onClick={onOpen}>
<Icon as={MdMenu} fontSize="2xl" />
</Button>
</Flex>
<Drawer onClose={onClose} isOpen={isOpen}>
<DrawerOverlay />
<DrawerContent>
<DrawerCloseButton />
<DrawerBody p={0}>
<SidebarNav nav={nav} version={version} border={0} />
</DrawerBody>
</DrawerContent>
</Drawer>
</>
)
}
const slugifyTitle = (title: string) => {
return _.kebabCase(title.toLowerCase())
}
const getImageUrl = (src: string | undefined) => {
if (src === undefined) {
return ""
}
const assetPath = src.split("images/")[1]
return `/images/${assetPath}`
}
const DocsPage: NextPage<{
content: string
navigation: Nav
route: Route
version: string
}> = ({ content, navigation, route, version }) => {
return (
<>
<Head>
<title>{route.title}</title>
<meta name="source" content={route.path} />
</Head>
<Box
display={{ md: "grid" }}
gridTemplateColumns="max-content 1fr"
fontSize="md"
color="gray.700"
>
<Box display={{ base: "none", md: "block" }}>
<SidebarNav nav={navigation} version={version} />
</Box>
<Box display={{ base: "block", md: "none" }}>
<MobileNavbar nav={navigation} version={version} />
</Box>
<Box
as="main"
w="full"
pb={20}
px={{ base: 6, md: 10 }}
pl={{ base: 6, md: 20 }}
h="100vh"
overflowY="auto"
>
<Box maxW="872">
<Box lineHeight="tall">
{/* Some docs don't have the title */}
<Heading
as="h1"
fontSize="4xl"
pt={10}
pb={2}
// Hide this title if the doc has the title already
sx={{ "& + h1": { display: "none" } }}
>
{route.title}
</Heading>
<ReactMarkdown
rehypePlugins={[rehypeRaw]}
remarkPlugins={[remarkGfm]}
transformLinkUri={transformLinkUriSource(route.path)}
components={{
h1: ({ children }) => (
<Heading
as="h1"
fontSize="4xl"
pt={10}
pb={2}
id={slugifyTitle(children[0] as string)}
>
{children}
</Heading>
),
h2: ({ children }) => (
<Heading
as="h2"
fontSize="3xl"
pt={10}
pb={2}
id={slugifyTitle(children[0] as string)}
>
{children}
</Heading>
),
h3: ({ children }) => (
<Heading
as="h3"
fontSize="2xl"
pt={10}
pb={2}
id={slugifyTitle(children[0] as string)}
>
{children}
</Heading>
),
img: ({ src }) => (
<Img
src={getImageUrl(src)}
mb={2}
borderWidth={1}
borderColor="gray.200"
borderStyle="solid"
rounded="md"
height="auto"
/>
),
p: ({ children }) => (
<Text pt={2} pb={2}>
{children}
</Text>
),
ul: ({ children }) => (
<UnorderedList
mb={4}
display="grid"
gridAutoFlow="row"
gap={2}
>
{children}
</UnorderedList>
),
ol: ({ children }) => (
<OrderedList
mb={4}
display="grid"
gridAutoFlow="row"
gap={2}
>
{children}
</OrderedList>
),
a: ({ children, href = "" }) => {
const isExternal =
href.startsWith("http") || href.startsWith("https")
return (
<Link
href={href}
target={isExternal ? "_blank" : undefined}
fontWeight={500}
color="blue.600"
>
{children}
</Link>
)
},
code: ({ node, ...props }) => (
<Code {...props} bgColor="gray.100" />
),
pre: ({ children }) => (
<Box
as="pre"
w="full"
sx={{ "& > code": { w: "full", p: 4, rounded: "md" } }}
mb={2}
>
{children}
</Box>
),
table: ({ children }) => (
<TableContainer
mt={1}
mb={2}
bgColor="white"
rounded="md"
borderWidth={1}
borderColor="gray.100"
borderStyle="solid"
>
<Table variant="simple">{children}</Table>
</TableContainer>
),
thead: ({ children }) => <Thead>{children}</Thead>,
th: ({ children }) => <Th>{children}</Th>,
td: ({ children }) => <Td>{children}</Td>,
tr: ({ children }) => <Tr>{children}</Tr>,
}}
>
{content}
</ReactMarkdown>
</Box>
</Box>
</Box>
</Box>
</>
)
}
export default DocsPage

View File

@ -0,0 +1,29 @@
import { ChakraProvider, extendTheme } from "@chakra-ui/react"
import type { AppProps } from "next/app"
import Head from "next/head"
const theme = extendTheme({
styles: {
global: {
body: {
bg: "gray.50",
},
},
},
})
const MyApp: React.FC<AppProps> = ({ Component, pageProps }) => {
return (
<>
<Head>
<link rel="mask-icon" href="/favicon.svg" color="#000000" />
<link rel="alternate icon" type="image/png" href="/favicon.png" />
</Head>
<ChakraProvider theme={theme}>
<Component {...pageProps} />
</ChakraProvider>
</>
)
}
export default MyApp

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

View File

@ -0,0 +1,35 @@
<svg width="144" height="32" viewBox="0 0 144 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M74.7553 13.6347H70.0189C69.9324 13.0317 69.7558 12.496 69.489 12.0278C69.2223 11.5524 68.8799 11.1481 68.4617 10.8146C68.0436 10.4811 67.5606 10.2257 67.0127 10.0484C66.472 9.87101 65.8845 9.78232 65.2501 9.78232C64.1038 9.78232 63.1054 10.0626 62.2547 10.623C61.404 11.1764 60.7444 11.9852 60.2758 13.0494C59.8072 14.1065 59.5729 15.3907 59.5729 16.9018C59.5729 18.4556 59.8072 19.761 60.2758 20.8181C60.7516 21.8752 61.4148 22.6734 62.2655 23.2126C63.1162 23.7518 64.1002 24.0214 65.2176 24.0214C65.8448 24.0214 66.4252 23.9398 66.9586 23.7766C67.4993 23.6134 67.9787 23.3758 68.3969 23.0636C68.815 22.7443 69.161 22.3577 69.435 21.9036C69.7161 21.4495 69.9108 20.9316 70.0189 20.3499L74.7553 20.3712C74.6327 21.3715 74.3264 22.3364 73.8361 23.2658C73.3531 24.1881 72.7007 25.0146 71.8789 25.7454C71.0642 26.469 70.091 27.0437 68.9592 27.4694C67.8345 27.888 66.5621 28.0973 65.1419 28.0973C63.1666 28.0973 61.4004 27.6574 59.8432 26.7777C58.2933 25.8979 57.0677 24.6244 56.1666 22.9572C55.2726 21.2899 54.8257 19.2715 54.8257 16.9018C54.8257 14.5251 55.2799 12.5031 56.1882 10.8359C57.0966 9.16863 58.3293 7.89868 59.8865 7.02603C61.4437 6.14629 63.1955 5.70642 65.1419 5.70642C66.4252 5.70642 67.6147 5.88379 68.7105 6.23852C69.8135 6.59326 70.7903 7.11117 71.641 7.79226C72.4916 8.46626 73.1837 9.29279 73.7172 10.2719C74.2579 11.2509 74.6039 12.3719 74.7553 13.6347Z"
fill="black" />
<path
d="M85.4466 28.1186C83.7668 28.1186 82.3142 27.7674 81.0886 27.065C79.8703 26.3555 78.9295 25.3694 78.2663 24.1065C77.603 22.8366 77.2714 21.3644 77.2714 19.6901C77.2714 18.0015 77.603 16.5258 78.2663 15.263C78.9295 13.993 79.8703 13.0069 81.0886 12.3045C82.3142 11.595 83.7668 11.2403 85.4466 11.2403C87.1263 11.2403 88.5753 11.595 89.7937 12.3045C91.0192 13.0069 91.9636 13.993 92.6268 15.263C93.2901 16.5258 93.6217 18.0015 93.6217 19.6901C93.6217 21.3644 93.2901 22.8366 92.6268 24.1065C91.9636 25.3694 91.0192 26.3555 89.7937 27.065C88.5753 27.7674 87.1263 28.1186 85.4466 28.1186ZM85.4682 24.6067C86.2323 24.6067 86.8704 24.3938 87.3822 23.9682C87.894 23.5354 88.2797 22.9465 88.5393 22.2016C88.806 21.4566 88.9394 20.6088 88.9394 19.6581C88.9394 18.7074 88.806 17.8596 88.5393 17.1147C88.2797 16.3697 87.894 15.7809 87.3822 15.3481C86.8704 14.9153 86.2323 14.6989 85.4682 14.6989C84.6968 14.6989 84.048 14.9153 83.5217 15.3481C83.0027 15.7809 82.6098 16.3697 82.343 17.1147C82.0835 17.8596 81.9537 18.7074 81.9537 19.6581C81.9537 20.6088 82.0835 21.4566 82.343 22.2016C82.6098 22.9465 83.0027 23.5354 83.5217 23.9682C84.048 24.3938 84.6968 24.6067 85.4682 24.6067Z"
fill="black" />
<path
d="M102.653 28.0653C101.391 28.0653 100.249 27.7461 99.2251 27.1076C98.2086 26.4619 97.4012 25.5148 96.8028 24.2661C96.2117 23.0104 95.9161 21.4708 95.9161 19.6475C95.9161 17.7745 96.2225 16.2172 96.8353 14.9756C97.4481 13.727 98.2627 12.794 99.2792 12.1768C100.303 11.5524 101.424 11.2403 102.642 11.2403C103.572 11.2403 104.347 11.3964 104.967 11.7085C105.594 12.0136 106.099 12.3967 106.481 12.8579C106.87 13.3119 107.166 13.7589 107.368 14.1988H107.508V6.0044H112.104V27.7993H107.562V25.1814H107.368C107.152 25.6354 106.845 26.0859 106.449 26.5329C106.059 26.9728 105.551 27.3381 104.924 27.629C104.304 27.9199 103.547 28.0653 102.653 28.0653ZM104.113 24.4577C104.855 24.4577 105.483 24.259 105.994 23.8617C106.514 23.4573 106.91 22.8933 107.184 22.1697C107.465 21.446 107.606 20.5982 107.606 19.6262C107.606 18.6542 107.469 17.81 107.195 17.0934C106.921 16.3768 106.524 15.8235 106.005 15.4332C105.486 15.043 104.855 14.8479 104.113 14.8479C103.356 14.8479 102.718 15.0501 102.199 15.4545C101.68 15.8589 101.287 16.4194 101.02 17.136C100.753 17.8525 100.62 18.6826 100.62 19.6262C100.62 20.5769 100.753 21.4176 101.02 22.1484C101.294 22.872 101.687 23.4396 102.199 23.8511C102.718 24.2555 103.356 24.4577 104.113 24.4577Z"
fill="black" />
<path
d="M123.377 28.1186C121.668 28.1186 120.197 27.778 118.965 27.0969C117.739 26.4087 116.795 25.4368 116.132 24.181C115.468 22.9181 115.137 21.4247 115.137 19.7007C115.137 18.0193 115.468 16.5436 116.132 15.2736C116.795 14.0037 117.728 13.014 118.932 12.3045C120.143 11.595 121.564 11.2403 123.193 11.2403C124.289 11.2403 125.309 11.4141 126.253 11.7617C127.205 12.1023 128.034 12.6167 128.74 13.3048C129.454 13.993 130.009 14.8586 130.406 15.9015C130.802 16.9373 131 18.1505 131 19.5411V20.7862H116.975V17.9767H126.664C126.664 17.324 126.52 16.7458 126.231 16.242C125.943 15.7383 125.543 15.3446 125.031 15.0608C124.527 14.7699 123.939 14.6245 123.269 14.6245C122.569 14.6245 121.949 14.7841 121.409 15.1033C120.875 15.4155 120.457 15.8376 120.154 16.3697C119.851 16.8948 119.696 17.4801 119.689 18.1257V20.7968C119.689 21.6056 119.841 22.3045 120.143 22.8933C120.453 23.4822 120.89 23.9362 121.452 24.2555C122.014 24.5748 122.681 24.7344 123.452 24.7344C123.964 24.7344 124.433 24.6634 124.858 24.5215C125.283 24.3797 125.648 24.1668 125.95 23.883C126.253 23.5992 126.484 23.2516 126.642 22.8401L130.903 23.1168C130.687 24.1242 130.243 25.004 129.573 25.756C128.91 26.501 128.052 27.0827 126.999 27.5013C125.954 27.9128 124.746 28.1186 123.377 28.1186Z"
fill="black" />
<path
d="M133.922 27.7993V11.4531H138.388V14.3052H138.561C138.864 13.2906 139.372 12.5244 140.086 12.0065C140.799 11.4815 141.621 11.219 142.551 11.219C142.782 11.219 143.031 11.2332 143.297 11.2616C143.564 11.2899 143.798 11.329 144 11.3786V15.4013C143.784 15.3375 143.485 15.2807 143.103 15.231C142.721 15.1814 142.371 15.1566 142.054 15.1566C141.376 15.1566 140.771 15.302 140.237 15.5929C139.711 15.8767 139.293 16.274 138.983 16.7848C138.68 17.2956 138.529 17.8845 138.529 18.5514V27.7993H133.922Z"
fill="black" />
<path
d="M43.3356 13.5469C42.4508 13.5469 41.8608 13.0361 41.8608 11.9879V5.96706C41.8608 2.12341 40.2518 0 36.0952 0H34.1644V4.05867H34.7544C36.3902 4.05867 37.1679 4.94567 37.1679 6.53151V11.8535C37.1679 14.165 37.8651 15.1058 39.3937 15.5896C37.8651 16.0466 37.1679 17.0142 37.1679 19.3257C37.1679 20.6428 37.1679 21.9598 37.1679 23.277C37.1679 24.3789 37.1679 25.4541 36.8729 26.5561C36.578 27.5775 36.0952 28.5451 35.4248 29.3783C35.0494 29.8622 34.6203 30.2654 34.1377 30.6417V31.1792H36.0684C40.225 31.1792 41.834 29.0558 41.834 25.2122V19.1913C41.834 18.1162 42.3971 17.6324 43.3089 17.6324H44.4084V13.5737H43.3356V13.5469V13.5469Z"
fill="black" />
<path
d="M30.1956 6.1291H24.2423C24.1082 6.1291 24.001 6.02159 24.001 5.8872V5.43026C24.001 5.29587 24.1082 5.18835 24.2423 5.18835H30.2224C30.3564 5.18835 30.4637 5.29587 30.4637 5.43026V5.8872C30.4637 6.02159 30.3296 6.1291 30.1956 6.1291Z"
fill="black" />
<path
d="M31.2146 11.9347H26.8703C26.7362 11.9347 26.6289 11.8271 26.6289 11.6927V11.2358C26.6289 11.1015 26.7362 10.9939 26.8703 10.9939H31.2146C31.3487 10.9939 31.4559 11.1015 31.4559 11.2358V11.6927C31.4559 11.8003 31.3487 11.9347 31.2146 11.9347Z"
fill="black" />
<path
d="M32.9308 9.03194H24.2423C24.1082 9.03194 24.001 8.92442 24.001 8.79003V8.33309C24.001 8.19869 24.1082 8.09119 24.2423 8.09119H32.904C33.0381 8.09119 33.1454 8.19869 33.1454 8.33309V8.79003C33.1454 8.89754 33.0649 9.03194 32.9308 9.03194Z"
fill="black" />
<path
d="M17.3502 7.44538C17.9401 7.44538 18.5302 7.49915 19.0933 7.63354V6.53151C19.0933 4.97255 19.8978 4.05867 21.5068 4.05867H22.0967V0H20.1659C16.0093 0 14.4004 2.12341 14.4004 5.96706V7.95608C15.3389 7.63354 16.3312 7.44538 17.3502 7.44538Z"
fill="black" />
<path
d="M34.7542 22.0667C34.3252 18.6531 31.6971 15.804 28.3182 15.1589C27.3797 14.9707 26.4411 14.9438 25.5294 15.1051C25.5025 15.1051 25.5025 15.0782 25.4757 15.0782C24.0008 11.9872 20.8365 9.9444 17.4039 9.9444C13.9714 9.9444 10.8339 11.9335 9.33215 15.0245C9.30534 15.0245 9.30534 15.0514 9.27851 15.0514C8.31313 14.9438 7.34773 14.9976 6.38233 15.2395C3.05708 16.0458 0.536336 18.8412 0.0804515 22.2279C0.0268136 22.5773 0 22.9267 0 23.2493C0 24.2707 0.697229 25.2115 1.71625 25.3458C2.97663 25.5341 4.07611 24.5664 4.04929 23.33C4.04929 23.1418 4.04929 22.9267 4.07611 22.7386C4.29065 21.0184 5.60465 19.567 7.3209 19.1637C7.85724 19.0293 8.39357 19.0025 8.90309 19.0832C10.5389 19.2982 12.1479 18.4649 12.8451 17.0135C13.3546 15.9383 14.1592 14.9976 15.2318 14.4868C16.4117 13.9224 17.7526 13.8418 18.9861 14.2719C20.2733 14.7288 21.2386 15.6964 21.8287 16.9059C22.4454 18.0887 22.7404 18.9219 24.0544 19.0832C24.5907 19.1637 26.0924 19.1369 26.6556 19.11C27.7551 19.11 28.8546 19.4863 29.6323 20.2658C30.1417 20.8033 30.5172 21.4754 30.6781 22.2279C30.9194 23.4375 30.6245 24.647 29.9004 25.5609C29.3909 26.206 28.6937 26.6898 27.916 26.9048C27.5405 27.0124 27.1651 27.0392 26.7897 27.0392C26.5752 27.0392 26.2802 27.0392 25.9316 27.0392C24.859 27.0392 22.5795 27.0392 20.8632 27.0392C19.6834 27.0392 18.7447 26.0985 18.7447 24.9158V20.9377V17.0403C18.7447 16.7178 18.4766 16.449 18.1548 16.449H17.3235C15.6876 16.4759 14.3737 18.3037 14.3737 20.2389C14.3737 22.1742 14.3737 27.3081 14.3737 27.3081C14.3737 29.4045 16.063 31.0979 18.1548 31.0979C18.1548 31.0979 27.4602 31.071 27.5942 31.071C29.7395 30.8559 31.7239 29.754 33.0647 28.0606C34.4056 26.421 35.0224 24.2707 34.7542 22.0667Z"
fill="black" />
</svg>

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,3 @@
#!/bin/bash
cp ../docs/images public/images --recursive

20
offlinedocs/tsconfig.json Normal file
View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "docs"]
}

4260
offlinedocs/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,12 @@
#!/usr/bin/env bash
#
# Run "yarn install" with flags appropriate to the environment
# (local development vs build system)
# Run "yarn install" with flags appropriate to the environment (local
# development vs build system). The install is always run within the current
# directory.
#
# Usage: yarn_install.sh [optional extra flags]
set -euo pipefail
# shellcheck source=scripts/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
cdroot
cd site
yarn_flags=(
# Do not execute install scripts

View File

@ -6,6 +6,8 @@
printWidth: 80
semi: false
trailingComma: all
useTabs: false
tabWidth: 2
overrides:
- files:
- ../README.md