You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: broken editPost link and update editPost logic (#487)
* fix: broken editPost link and update editPost logic
Fixed broken editPost link. Removed the ability to update
the editPost link inside each blog post for consistency.
The editPost button per blog post can still be hidden.
* docs: update docs for editPost
Copy file name to clipboardExpand all lines: src/data/blog/adding-new-post.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
author: Sat Naing
3
3
pubDatetime: 2022-09-23T15:22:00Z
4
-
modDatetime: 2025-03-17T17:41:19.776Z
4
+
modDatetime: 2025-03-20T03:22:19.075Z
5
5
title: Adding new posts in AstroPaper theme
6
6
slug: adding-new-posts-in-astropaper-theme
7
7
featured: true
@@ -71,6 +71,7 @@ Here is the list of frontmatter property for each post.
71
71
|**_tags_**| Related keywords for this post. Written in array yaml format. | default = others |
72
72
|**_ogImage_**| OG image of the post. Useful for social media sharing and SEO. This can be a remote URL or an image path relative to current folder. | default = `SITE.ogImage` or generated OG image |
73
73
|**_canonicalURL_**| Canonical URL (absolute), in case the article already exists on other source. | default = `Astro.site` + `Astro.url.pathname`|
74
+
|**_hideEditPost_**| Hide editPost button under blog title. This applies only to the current blog post. | default = false |
74
75
75
76
> Tip! You can get ISO 8601 datetime by running `new Date().toISOString()` in the console. Make sure you remove quotes though.
@@ -62,7 +62,7 @@ Here are SITE configuration options
62
62
|`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. |
63
63
|`showArchives`| Determines whether to display the `Archives` menu (positioned between the `About` and `Search` menus) and its corresponding page on the site. This option is set to `true` by default. |
64
64
|`showBackButton`| Determines whether to display the `Go back` button in each blog post. |
65
-
|`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.|
65
+
|`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 setting `SITE.editPost.enabled` to `false`. |
66
66
|`dynamicOgImage`| This option controls whether to [generate dynamic og-image](https://astro-paper.pages.dev/posts/dynamic-og-image-generation-in-astropaper-blog-posts/) if no `ogImage` is specified in the blog post frontmatter. If you have many blog posts, you might want to disable this feature. See the [trade-off](https://astro-paper.pages.dev/posts/dynamic-og-image-generation-in-astropaper-blog-posts/#trade-off) for more details. |
0 commit comments