This repository was archived by the owner on Dec 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: docs #1
Draft
johnletey
wants to merge
12
commits into
master
Choose a base branch
from
feat/docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: docs #1
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
41514e6
feat: start building docs
5f501cd
feat: add support for mdx
c184213
refactor: add padding
f887ab2
chore: more styles
dd43435
chore: merge master
1ec9c73
chores(eslint_diag): add eslint flag
littledivy cd4a642
feat: parse markdown files directly
985faea
feat: modify eslint rule for redundant return types
littledivy f9f58e9
Merge branch 'feat/docs' of github.com:useverto/lib into feat/docs
littledivy 8a4d01a
chores: fmt
littledivy e9e3a09
chore: cleanup
4863b06
feat: statically export docs site
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| dist/ | ||
| .next/ | ||
| node_modules/ | ||
| out/ | ||
| *.log/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| # .prettierignore | ||
| dist | ||
| .next |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/types/global" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "private": true, | ||
| "name": "lib.verto.exchange", | ||
| "author": "John Letey <johnletey@gmail.com>", | ||
| "scripts": { | ||
| "dev": "next dev", | ||
| "export": "next build && next export" | ||
| }, | ||
| "dependencies": { | ||
| "gray-matter": "^4.0.2", | ||
| "next": "^9.5.3", | ||
| "react": "^16.13.1", | ||
| "react-dom": "^16.13.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/react": "^16.9.49", | ||
| "typescript": "^4.0.2" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import matter from "gray-matter"; | ||
| import fs from "fs"; | ||
| import path from "path"; | ||
|
|
||
| export default () => { | ||
| const funcs = fs | ||
| .readdirSync("./funcs/") | ||
| .filter((file) => path.extname(file) === ".md") | ||
| .map((file) => { | ||
| const fileContent = fs.readFileSync(`./funcs/${file}`, "utf8"); | ||
| const { data, content } = matter(fileContent); | ||
|
|
||
| return { ...data, slug: file.split(".")[0], body: content }; | ||
| }); | ||
|
|
||
| return funcs; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import "../styles.css"; | ||
| import type { AppProps } from "next/app"; | ||
|
|
||
| export default function App({ Component, pageProps }: AppProps) { | ||
| return <Component {...pageProps} />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import getFuncs from "../lib/get-funcs"; | ||
|
|
||
| const Home = ({ funcs }) => { | ||
littledivy marked this conversation as resolved.
Show resolved
Hide resolved
littledivy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return ( | ||
| <div> | ||
| <h1>Coming soon ...</h1> | ||
| {funcs.map((func) => ( | ||
| <a href={`/func/${func.slug}`}>{func.title}</a> | ||
| ))} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export const getStaticProps = () => { | ||
littledivy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const funcs = getFuncs(); | ||
|
|
||
| return { | ||
| props: { | ||
| funcs, | ||
| }, | ||
| }; | ||
| }; | ||
|
|
||
| export default Home; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| @font-face { | ||
| font-family: JetBrainsMono; | ||
| src: url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2") | ||
| format("woff2"), | ||
| url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff") | ||
| format("woff"), | ||
| url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf") | ||
| format("truetype"); | ||
| } | ||
|
|
||
| body { | ||
| font-family: "JetBrainsMono", monospace; | ||
| padding: 1em 15vw 3em; | ||
| } | ||
|
|
||
| ::selection { | ||
| background-color: #b075cd; | ||
| } | ||
| ::-moz-selection { | ||
| background-color: #b075cd; | ||
| } | ||
|
|
||
| h1.title { | ||
| font-family: "Inter", sans-serif; | ||
| font-size: 2.3em; | ||
| font-weight: 600; | ||
| } | ||
| @media screen and (max-width: 720px) { | ||
| h1.title { | ||
| width: 100%; | ||
| font-size: 2.01em; | ||
| } | ||
| } | ||
|
|
||
| a { | ||
| color: #b075cd; | ||
| text-decoration: underline; | ||
| } | ||
| a::selection { | ||
| color: #000; | ||
| } | ||
| a::-moz-selection { | ||
| color: #000; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "es5", | ||
| "lib": ["dom", "dom.iterable", "esnext"], | ||
| "allowJs": true, | ||
| "skipLibCheck": true, | ||
| "strict": false, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noEmit": true, | ||
| "esModuleInterop": true, | ||
| "module": "esnext", | ||
| "moduleResolution": "node", | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true, | ||
| "jsx": "preserve" | ||
| }, | ||
| "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
| "exclude": ["node_modules"] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.