Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 89055ee

Browse files
Merge pull request #49 from frontendweb3/docs-update
Docs update #48
2 parents 29cc161 + 9e32131 commit 89055ee

File tree

12 files changed

+149
-138
lines changed

12 files changed

+149
-138
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2+
#
3+
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4+
#
5+
name: Deploy Next.js site to Pages
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
paths:
12+
- "docs"
13+
14+
pull_request:
15+
types:
16+
- closed
17+
branches: ["main"]
18+
paths:
19+
- "docs"
20+
21+
# Allows you to run this workflow manually from the Actions tab
22+
workflow_dispatch:
23+
24+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
25+
permissions:
26+
contents: read
27+
pages: write
28+
id-token: write
29+
30+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
31+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
32+
concurrency:
33+
group: "pages"
34+
cancel-in-progress: false
35+
36+
jobs:
37+
# Build job
38+
build:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
- name: Detect package manager
44+
id: detect-package-manager
45+
run: |
46+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
47+
echo "manager=yarn" >> $GITHUB_OUTPUT
48+
echo "command=install" >> $GITHUB_OUTPUT
49+
echo "runner=yarn" >> $GITHUB_OUTPUT
50+
exit 0
51+
elif [ -f "${{ github.workspace }}/package.json" ]; then
52+
echo "manager=npm" >> $GITHUB_OUTPUT
53+
echo "command=ci" >> $GITHUB_OUTPUT
54+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
55+
exit 0
56+
else
57+
echo "Unable to determine package manager"
58+
exit 1
59+
fi
60+
- name: Setup Node
61+
uses: actions/setup-node@v3
62+
with:
63+
node-version: "16"
64+
cache: ${{ steps.detect-package-manager.outputs.manager }}
65+
- name: Setup Pages
66+
uses: actions/configure-pages@v3
67+
with:
68+
# Automatically inject basePath in your Next.js configuration file and disable
69+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
70+
#
71+
# You may remove this line if you want to manage the configuration yourself.
72+
static_site_generator: next
73+
- name: Restore cache
74+
uses: actions/cache@v3
75+
with:
76+
path: |
77+
.next/cache
78+
# Generate a new cache whenever packages or source files change.
79+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
80+
# If source files changed but packages didn't, rebuild from a prior cache.
81+
restore-keys: |
82+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
83+
- name: Install dependencies
84+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
85+
- name: Build with Next.js
86+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
87+
- name: Static HTML export with Next.js
88+
run: ${{ steps.detect-package-manager.outputs.runner }} next export
89+
- name: Upload artifact
90+
uses: actions/upload-pages-artifact@v2
91+
with:
92+
path: ./out
93+
94+
# Deployment job
95+
deploy:
96+
environment:
97+
name: github-pages
98+
url: ${{ steps.deployment.outputs.page_url }}
99+
runs-on: ubuntu-latest
100+
needs: build
101+
steps:
102+
- name: Deploy to GitHub Pages
103+
id: deployment
104+
uses: actions/deploy-pages@v2

docs/public/404.png

4.95 KB
Loading

docs/public/Home.png

-5.17 KB
Loading

docs/public/Page.png

9.86 KB
Loading

docs/public/Post.png

-104 KB
Loading

docs/public/Posts.png

65.9 KB
Loading

docs/public/Tags.png

12.3 KB
Loading

docs/src/pages/docs/page-configuration.mdx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@ The section theme inbuilt support multiple layouts for the blog. You can handle
77
## Front matter
88
Section theme supports the common front matter for your blog that helps you with SEO.
99

10-
```markdown filename="front matter example"
10+
```markdown filename="new-post.mdx"
1111
---
12-
type: page
13-
title : my title
14-
expect: my description
15-
image: https://cdn.pixabay.com/photo/2016/05/31/10/52/contact-us-1426589_1280.png
12+
type: post
13+
title: 15 Facts You Never Knew About Photography
14+
description: Dolor adipisicing adipisicing Lorem et irure veniam nisi anim excepteur mollit occaecat eu.
15+
date: 2022-11-15T08:14:33.826Z
16+
tags:
17+
- 15 facts
18+
- Photography
19+
- Jeanne Ballard facts
20+
image: /images/photographer.jpg
21+
author:
22+
name: Rajdeep Singh
23+
url: "http://officialrajdeepsingh.dev"
1624
---
25+
26+
start write your post from now on.
1727
```
1828

1929
## Image
@@ -56,9 +66,8 @@ You can set up a blog home page with the Section Theme. It is unique For your si
5666
type: home
5767
title: Home Page - Rajdeep Singh
5868
except : Home page
59-
image:
60-
- url : https://cdn.pixabay.com/photo/2023/05/21/19/45/rose-8009275_1280.jpg
61-
alt : Pixabay image
69+
image: https://cdn.pixabay.com/photo/2023/05/21/19/45/rose-8009275_1280.jpg
70+
6271
---
6372
```
6473

@@ -71,10 +80,9 @@ You can create basic or regular page like about, contact, etc.
7180
---
7281
type: page
7382
title: About us - Rajdeep Singh
74-
except : About page
75-
image:
76-
- url : https://cdn.pixabay.com/photo/2023/05/21/19/45/rose-8009275_1280.jpg
77-
alt : Pixabay image
83+
description : About page
84+
image: https://cdn.pixabay.com/photo/2023/05/21/19/45/rose-8009275_1280.jpg
85+
7886
---
7987

8088
```
@@ -88,7 +96,7 @@ Show all the posts or articles in current folder.
8896
---
8997
type: posts
9098
title: Posts List
91-
expect: Our blog posts
99+
description: Our blog posts
92100
---
93101
```
94102

@@ -102,14 +110,12 @@ Show single post on page.
102110
---
103111
type: post
104112
title: Markdown Example
105-
except: my unque Markdown example.
113+
description: my unque Markdown example.
106114
date: 2022-11-01T08:40:19.051Z
107115
tags:
108116
- Markdown
109117
- Theme
110118
image: /images/MDX.png
111-
imageAlt: My Image Alt.
112-
imageCaption: My unique capation
113119
author: Rajdeep Singh
114120
---
115121
```

examples/demo-section-blog/src/pages/posts/15-facts-you-never-knew-about-photography.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ tags:
77
- 15 facts
88
- Photography
99
- Jeanne Ballard facts
10-
category:
11-
- Photography
1210
image: /images/photographer.jpg
1311
author:
1412
name: Rajdeep Singh

0 commit comments

Comments
 (0)