Skip to content

Commit

Permalink
feat: use id as filename (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
sywhb committed Nov 10, 2023
1 parent ebe7eb2 commit b5944e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
),
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/settings/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type FunctionMap = {

export type ArticleView =
| {
id: string
title: string
author?: string
omnivoreUrl: string
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b5944e1

Please sign in to comment.