From c9989ef5417c7dac77ade96cf320d9c9b630eb76 Mon Sep 17 00:00:00 2001 From: satnaing Date: Fri, 11 Oct 2024 18:05:46 +0700 Subject: [PATCH] docs: update site config docs for editPost --- .../blog/how-to-configure-astropaper-theme.md | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/content/blog/how-to-configure-astropaper-theme.md b/src/content/blog/how-to-configure-astropaper-theme.md index 95ea128cd..ced018683 100644 --- a/src/content/blog/how-to-configure-astropaper-theme.md +++ b/src/content/blog/how-to-configure-astropaper-theme.md @@ -33,22 +33,28 @@ export const SITE = { lightAndDarkMode: true, postPerPage: 3, scheduledPostMargin: 15 * 60 * 1000, // 15 minutes + editPost: { + url: "https://github.com/satnaing/astro-paper/edit/main/src/content/blog", + text: "Suggest Changes", + appendFilePath: true, + }, }; ``` Here are SITE configuration options -| Options | Description | -| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `website` | Your deployed website url | -| `author` | Your name | -| `desc` | Your site description. Useful for SEO and social media sharing. | -| `title` | Your site name | -| `ogImage` | Your default OG image for the site. Useful for social media sharing. OG images can be an external image url or they can be placed under `/public` directory. | -| `lightAndDarkMode` | Enable or disable `light & dark mode` for the website. If disabled, primary color scheme will be used. This option is enabled by default. | -| `postPerIndex` | The number of posts to be displayed at the home page under `Recent` section. | -| `postPerPage` | You can specify how many posts will be displayed in each posts page. (eg: if you set SITE.postPerPage to 3, each page will only show 3 posts per page) | -| `scheduledPostMargin` | In Production mode, posts with a future `pubDatetime` will not be visible. However, if a post's `pubDatetime` is within the next 15 minutes, it will be visible. You can set `scheduledPostMargin` if you don't like the default 15 minutes margin. | +| Options | Description | +| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `website` | Your deployed website url | +| `author` | Your name | +| `desc` | Your site description. Useful for SEO and social media sharing. | +| `title` | Your site name | +| `ogImage` | Your default OG image for the site. Useful for social media sharing. OG images can be an external image url or they can be placed under `/public` directory. | +| `lightAndDarkMode` | Enable or disable `light & dark mode` for the website. If disabled, primary color scheme will be used. This option is enabled by default. | +| `postPerIndex` | The number of posts to be displayed at the home page under `Recent` section. | +| `postPerPage` | You can specify how many posts will be displayed in each posts page. (eg: if you set SITE.postPerPage to 3, each page will only show 3 posts per page) | +| `scheduledPostMargin` | In Production mode, posts with a future `pubDatetime` will not be visible. However, if a post's `pubDatetime` is within the next 15 minutes, it will be visible. You can set `scheduledPostMargin` if you don't like the default 15 minutes margin. | +| `editPost` | This option allows users to suggest changes to a blog post by providing an edit link under blog post titles. This feature can be disabled by removing it from the `SITE` config. You can also set `appendFilePath` to `true` to automatically append the file path of the post to the url, directing users to the specific post they wish to edit. | ## Configuring locale