feat: use id as filename (#152)

This commit is contained in:
Hongbo Wu
2023-11-10 12:24:15 +08:00
committed by Hongbo Wu
parent ebe7eb2f8e
commit b5944e1a3a
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ export const settingsSchema = async (): Promise<SettingSchemaDesc[]> => [
title: t('Article Template'),
default: '',
description: t(
'If the above item is off, want to sync to a separate page for each article, use the variable `{{{title}}}`, `{{{date}}}` or `{{{currentDate}}}` as the page name. For example, `{{{title}}}` will create a page for each article with the title of the article.'
'If the above item is off, want to sync to a separate page for each article, use the variable `{{id}}`, `{{{title}}}`, `{{{date}}}` or `{{{currentDate}}}` as the page name. For example, `{{{title}}}` will create a page for each article with the title of the article.'
),
},
{
+2
View File
@@ -17,6 +17,7 @@ type FunctionMap = {
export type ArticleView =
| {
id: string
title: string
author?: string
omnivoreUrl: string
@@ -146,6 +147,7 @@ const createArticleView = (
? formatDate(new Date(article.archivedAt), preferredDateFormat)
: undefined
return {
id: article.id,
title: article.title,
omnivoreUrl: `https://omnivore.app/me/${article.slug}`,
siteName,