Skip to content

Commit 1832432

Browse files
committed
Create pages
1 parent e54bfd9 commit 1832432

27 files changed

+17299
-2
lines changed

.github/workflows/deploy-docs.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
name: Deploy to GitHub Pages
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./docs
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
# cache: yarn
23+
24+
25+
26+
27+
- name: Install dependencies
28+
run: yarn install --frozen-lockfile
29+
30+
- name: Build website
31+
run: yarn build
32+
33+
# Popular action to deploy to GitHub Pages:
34+
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
# Build output to publish to the `gh-pages` branch:
40+
publish_dir: ./docs/build
41+
# The following lines assign commit authorship to the official
42+
# GH-Actions bot for deploys to `gh-pages` branch:
43+
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
44+
# The GH actions bot is used by default if you didn't specify the two fields.
45+
# You can swap them out with your own user credentials.
46+
user_name: github-actions[bot]
47+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# pnstack.github.io
1+
# PNStack

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Docs

docusaurus.config.js

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
// @ts-check
2+
// Note: type annotations allow type checking and IDEs autocompletion
3+
4+
const lightCodeTheme = require("prism-react-renderer/themes/github");
5+
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
6+
7+
/** @type {import('@docusaurus/types').Config} */
8+
const config = {
9+
title: "PNStack",
10+
tagline: "",
11+
favicon: "img/favicon.ico",
12+
// Set the production url of your site here
13+
url: "https://pnstack.github.io",
14+
// Set the /<baseUrl>/ pathname under which your site is served
15+
// For GitHub pages deployment, it is often '/<projectName>/'
16+
baseUrl: "/",
17+
18+
// GitHub pages deployment config.
19+
// If you aren't using GitHub pages, you don't need these.
20+
organizationName: "pnstack", // Usually your GitHub org/user name.
21+
projectName: "pnstack", // Usually your repo name.
22+
23+
onBrokenLinks: "warn",
24+
onBrokenMarkdownLinks: "warn",
25+
26+
// Even if you don't use internalization, you can use this field to set useful
27+
// metadata like html lang. For example, if your site is Chinese, you may want
28+
// to replace "en" with "zh-Hans".
29+
i18n: {
30+
defaultLocale: "en",
31+
locales: ["en"],
32+
},
33+
34+
presets: [
35+
[
36+
"classic",
37+
/** @type {import('@docusaurus/preset-classic').Options} */
38+
({
39+
docs: {
40+
sidebarPath: require.resolve("./sidebars.js"),
41+
path: "docs",
42+
includeCurrentVersion: true,
43+
},
44+
45+
blog: {
46+
showReadingTime: true,
47+
// Please change this to your repo.
48+
// Remove this to remove the "edit this page" links.
49+
editUrl:
50+
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
51+
},
52+
theme: {
53+
customCss: require.resolve("./src/css/custom.css"),
54+
},
55+
}),
56+
],
57+
],
58+
plugins: [
59+
async function myPlugin(context, options) {
60+
return {
61+
name: "docusaurus-tailwindcss",
62+
configurePostCss(postcssOptions) {
63+
// Appends TailwindCSS and AutoPrefixer.
64+
postcssOptions.plugins.push(require("tailwindcss"));
65+
postcssOptions.plugins.push(require("autoprefixer"));
66+
return postcssOptions;
67+
},
68+
};
69+
},
70+
],
71+
72+
themeConfig:
73+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
74+
({
75+
// Replace with your project's social card
76+
image: "img/docusaurus-social-card.jpg",
77+
navbar: {
78+
title: "PNStack",
79+
logo: {
80+
alt: "PNStack logo",
81+
src: "img/logo.png",
82+
},
83+
items: [
84+
{
85+
type: "docSidebar",
86+
sidebarId: "tutorialSidebar",
87+
position: "left",
88+
label: "Docs",
89+
},
90+
{ to: "/blog", label: "Blog", position: "left" },
91+
92+
{
93+
href: "https://github.com/pnstack",
94+
label: "GitHub",
95+
position: "right",
96+
},
97+
],
98+
},
99+
footer: {
100+
style: "dark",
101+
102+
links: [
103+
{
104+
title: "PNStack",
105+
items: [
106+
{
107+
label: "PNStack",
108+
to: "/",
109+
},
110+
],
111+
},
112+
{
113+
title: "Community",
114+
items: [
115+
{
116+
label: "Twitter",
117+
href: "https://twitter.com/npv2k1",
118+
},
119+
],
120+
},
121+
{
122+
title: "More",
123+
items: [
124+
{
125+
label: "Blog",
126+
to: "/blog",
127+
},
128+
{
129+
label: "GitHub",
130+
href: "https://github.com/pnstack",
131+
},
132+
],
133+
},
134+
],
135+
copyright: `Copyright © ${new Date().getFullYear()} pnstack, Inc. Built with Docusaurus.`,
136+
},
137+
prism: {
138+
theme: lightCodeTheme,
139+
darkTheme: darkCodeTheme,
140+
},
141+
}),
142+
};
143+
144+
module.exports = config;

index.html

-1
This file was deleted.

package.json

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "blogs",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"clear": "docusaurus clear",
12+
"serve": "docusaurus serve",
13+
"write-translations": "docusaurus write-translations",
14+
"write-heading-ids": "docusaurus write-heading-ids",
15+
"typecheck": "tsc"
16+
},
17+
"dependencies": {
18+
"@docusaurus/core": "2.4.1",
19+
"@docusaurus/preset-classic": "2.4.1",
20+
"@mdx-js/react": "^1.6.22",
21+
"autoprefixer": "^10.4.14",
22+
"clsx": "^1.2.1",
23+
"postcss": "^8.4.27",
24+
"prism-react-renderer": "^1.3.5",
25+
"react": "^17.0.2",
26+
"react-dom": "^17.0.2",
27+
"tailwindcss": "^3.3.3"
28+
},
29+
"devDependencies": {
30+
"@docusaurus/module-type-aliases": "2.4.1",
31+
"@tsconfig/docusaurus": "^1.0.5",
32+
"typescript": "^4.7.4"
33+
},
34+
"browserslist": {
35+
"production": [
36+
">0.5%",
37+
"not dead",
38+
"not op_mini all"
39+
],
40+
"development": [
41+
"last 1 chrome version",
42+
"last 1 firefox version",
43+
"last 1 safari version"
44+
]
45+
},
46+
"engines": {
47+
"node": ">=16.14"
48+
}
49+
}

0 commit comments

Comments
 (0)