Skip to content

Commit

Permalink
docs: add post-page
Browse files Browse the repository at this point in the history
  • Loading branch information
g1eny0ung committed Jul 16, 2024
1 parent baf5637 commit c9dd3fb
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 10 deletions.
9 changes: 0 additions & 9 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ module.exports = withNextra({
images: {
unoptimized: true,
},
async redirects() {
return [
{
source: '/netlify-cms',
destination: '/decap-cms',
permanent: true,
},
]
},
})

// If you have other Next.js configurations, you can pass them as the parameter:
Expand Down
1 change: 1 addition & 0 deletions docs/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"i18n": "i18n",
"website-analytics": "Website Analytics",
"social-comments": "Social Comments",
"post-page": "Post Page",
"about-page": "About Page",
"search": "Search",
"summary-images": "Summary Images",
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/about-page.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# About Page

In [Quick Start](./quick-start.md), we added **About Me** as below:
In [Quick Start](/), we added **About Me** as below:

```bash
hugo new about/me.md
Expand Down
50 changes: 50 additions & 0 deletions docs/pages/post-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Post Page

In [Quick Start](/), we created an example article as below:

```md
---
title: {{ replace .TranslationBaseName "-" " " | title }}
date: {{ .Date }}
lastmod: {{ .Date }}
author: Author Name
# avatar: /img/author.jpg
# authorlink: https://author.site
cover: /img/cover.jpg
# images:
# - /img/cover.jpg
categories:
- category1
tags:
- tag1
- tag2
# nolastmod: true
draft: true
---

Cut out summary from your post content here.

<!--more-->

The remaining content of your post.
```

There are some parameters in the front matter you can use to customize your post page (and also its summary).

View the below section to learn more about the parameters.

## Parameters

| Parameter | Description | Auto-generated |
| ------------ | --------------------------------------------------------------------- | -------------- |
| `title` | Title of the post | Yes |
| `date` | Date of the post | Yes |
| `lastmod` | Last modified date of the post | Yes |
| `author` | Author of the post, if it's not set, the global `author` will be used | No |
| `avatar` | Author's avatar, if it's not set, the global `avatar` will be used | No |
| `authorlink` | Custom link for the current author | No |
| `cover` | Cover image of the post | No |
| `images` | Used in `og:image` meta tag | No |
| `categories` | Categories of the post | No |
| `tags` | Tags of the post | No |
| `nolastmod` | Disable the last modified date | No |

0 comments on commit c9dd3fb

Please # to comment.