File tree 8 files changed +50
-4
lines changed 8 files changed +50
-4
lines changed Original file line number Diff line number Diff line change 34
34
path = _includes/draft/2020-12
35
35
url = https://github.com/json-schema-org/json-schema-spec.git
36
36
branch = 2020-12
37
+ [submodule "_includes/community "]
38
+ path = _includes/community
39
+ url = https://github.com/json-schema-org/community.git
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react'
2
2
3
3
export const DocsHelp = ( ) => {
4
4
return (
5
- < div className = 'flex flex-col rounded-md shadow-md border border-gray-200 p-4 mt-16 ' >
5
+ < div className = 'flex flex-col rounded-md shadow-md border border-gray-200 p-4 mt-10 mb-3 ' >
6
6
< h3 className = 'flex text-h5mobile md:text-h5 border-b font-semibold pb-3' >
7
7
< svg xmlns = 'http://www.w3.org/2000/svg' width = '32' height = '32' fill = 'currentColor' className = 'bi bi-info-circle-fill mr-3' viewBox = '0 0 16 16' >
8
8
< path d = 'M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z' />
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ const SegmentSubtitle = ({ label }: { label: string }) => {
48
48
)
49
49
}
50
50
const getDocsPath = [
51
- '/overview/what-is-jsonschema'
51
+ '/overview/what-is-jsonschema' ,
52
+ '/overview/sponsors'
52
53
]
53
54
const getStartedPath = [
54
55
'/learn/json-schema-examples' ,
@@ -202,6 +203,7 @@ export const DocsNav = () => {
202
203
id = 'overview'
203
204
>
204
205
< DocLink uri = '/overview/what-is-jsonschema' label = 'What is JSON Schema?' />
206
+ < DocLink uri = '/overview/sponsors' label = 'Sponsors' />
205
207
</ div >
206
208
</ div >
207
209
{ /* Get Started */ }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default async function getStaticMarkdownPaths(path: string) {
6
6
. filter ( file => {
7
7
const isMarkdownFile = file . substr ( - 3 ) === '.md'
8
8
const isProtected = [ '_' ] . includes ( file . substr ( 0 , 1 ) )
9
- return isMarkdownFile && ! isProtected
9
+ return isMarkdownFile && ! isProtected
10
10
} )
11
11
. map ( ( fileName ) => ( {
12
12
params : {
Original file line number Diff line number Diff line change @@ -5,8 +5,12 @@ type Props = { params?: { slug: string }}
5
5
6
6
export default async function getStaticMarkdownProps ( props : Props , path : string ) {
7
7
const slug = props . params ?. slug || '_index'
8
- const fileName = fs . readFileSync ( `${ path } /${ slug } .md` , 'utf-8' )
8
+
9
+ const fileName2 = `${ path } /${ slug } .md`
10
+ const fileName = fs . readFileSync ( fileName2 , 'utf-8' )
11
+
9
12
const { data : frontmatter , content } = matter ( fileName )
13
+
10
14
return {
11
15
props : {
12
16
frontmatter,
Original file line number Diff line number Diff line change
1
+ ../../../_ includes/community/programs/sponsors/sponsors.md
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import { getLayout } from '~/components/Sidebar'
3
+ import fs from 'fs'
4
+ import Head from 'next/head'
5
+ import { Headline1 } from '~/components/Headlines'
6
+ import matter from 'gray-matter'
7
+ import StyledMarkdown from '~/components/StyledMarkdown'
8
+ import { DocsHelp } from '~/components/DocsHelp'
9
+ import { SectionContext } from '~/context'
10
+
11
+ export async function getStaticProps ( ) {
12
+ const block1 = fs . readFileSync ( 'pages/overview/sponsors/_index.md' , 'utf-8' )
13
+ const { content : block1Content } = matter ( block1 )
14
+ return {
15
+ props : {
16
+ blocks : [ block1Content ]
17
+ }
18
+ }
19
+ }
20
+
21
+ export default function ContentExample ( { blocks } : { blocks : any [ ] } ) {
22
+ const newTitle = 'Sponsors'
23
+
24
+ return (
25
+ < SectionContext . Provider value = 'docs' >
26
+ < Head >
27
+ < title > { newTitle } </ title >
28
+ </ Head >
29
+ < Headline1 > { newTitle } </ Headline1 >
30
+ < StyledMarkdown markdown = { blocks [ 0 ] } />
31
+ < DocsHelp />
32
+ </ SectionContext . Provider >
33
+ )
34
+ }
35
+ ContentExample . getLayout = getLayout
You can’t perform that action at this time.
0 commit comments