Skip to content

Commit

Permalink
docs: 📚️ add base structure to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
evertdespiegeleer committed May 8, 2024
1 parent 4410bde commit de7944e
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 41 deletions.
13 changes: 5 additions & 8 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
{
"name": "nextra-docs-template",
"version": "0.0.1",
"description": "Nextra docs template",
"name": "@zhttp/docs",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"repository": {
"type": "git",
"url": "git+https://github.com/shuding/nextra-docs-template.git"
"url": "git+https://github.com/evertdespiegeleer/zhttp"
},
"author": "Shu Ding <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/shuding/nextra-docs-template/issues"
"url": "https://github.com/evertdespiegeleer/zhttp"
},
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
"dependencies": {
"next": "^13.0.6",
"nextra": "latest",
Expand Down
21 changes: 10 additions & 11 deletions docs/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"index": "Introduction",
"another": "Another Page",
"advanced": "Advanced (A Folder)",
"about": {
"title": "About",
"type": "page"
"index": {
"type": "page",
"title": "Nextra",
"display": "hidden",
"theme": {
"layout": "raw"
}
},
"contact": {
"title": "Contact ↗",
"docs": {
"type": "page",
"href": "https://twitter.com/shuding_",
"newWindow": true
"title": "Documentation"
}
}
}
3 changes: 0 additions & 3 deletions docs/pages/about.mdx

This file was deleted.

5 changes: 5 additions & 0 deletions docs/pages/docs/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"index": "Introduction",
"another": "Another Page",
"advanced": "Advanced (A Folder)"
}
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/pages/another.mdx → docs/pages/docs/another.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ console.log(a);
import { useState } from 'react'

{/* Import CSS modules */}
import styles from '../components/counters.module.css'
import styles from '../../components/counters.module.css'

export const Counter = () => {
const [count, setCount] = useState(0);
Expand All @@ -26,6 +26,6 @@ export const Counter = () => {

## External Component

import Counters from '../components/counters'
import Counters from '../../components/counters'

<Counters />
11 changes: 11 additions & 0 deletions docs/pages/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Introduction

Welcome to Nextra! This is a basic docs template. You can use it as a starting point for your own project :)

## What is Nextra?

A **simple**, **powerful** and **flexible** site generation framework with everything you love from Next.js.

## Documentation

The documentation is available at [https://nextra.site](https://nextra.site).
12 changes: 1 addition & 11 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
# Introduction

Welcome to Nextra! This is a basic docs template. You can use it as a starting point for your own project :)

## What is Nextra?

A **simple**, **powerful** and **flexible** site generation framework with everything you love from Next.js.

## Documentation

The documentation is available at [https://nextra.site](https://nextra.site).
Splash page goes here
25 changes: 19 additions & 6 deletions docs/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@ import React from 'react'
import { DocsThemeConfig } from 'nextra-theme-docs'

const config: DocsThemeConfig = {
logo: <span>My Project</span>,
logo: <span>zhttp</span>,
project: {
link: 'https://github.com/shuding/nextra-docs-template',
link: 'https://github.com/evertdespiegeleer/zhttp',
},
chat: {
link: 'https://discord.com',
docsRepositoryBase: 'https://github.com/evertdespiegeleer/zhttp/docs',
feedback: {
useLink: () => 'https://github.com/evertdespiegeleer/zhttp/issues',
},
editLink: {
text: 'Edit this page on GitHub →',
},
docsRepositoryBase: 'https://github.com/shuding/nextra-docs-template',
footer: {
text: 'Nextra Docs Template',
text: <div style={{
display: 'flex',
flexDirection: 'column',
gap: '0.8em'
}}>
<p>zhttp built with ❤️ by <a href="https://evertdespiegeleer.com">Evert De Spiegeleer</a></p>
<p>Docs generated with <a href="nextra.site">Nextra</a></p>
</div>
},
toc: {
backToTop: true
}
}

export default config

0 comments on commit de7944e

Please sign in to comment.