add awsm theme

This commit is contained in:
polv committed 2020-12-15 20:00:14 +07:00
1 parent 7039b10df2
commit e397c9ae1e
15 files changed
+117 -115

No files matched your search

+5 -2
View File
@@ -5,6 +5,7 @@ const zMatter = z.object({
date: z.date().optional(),
createdAt: z.date().optional(),
updatedAt: z.date().optional(),
priority: z.number().optional(),
title: z.string(),
image: z.string().optional(),
tag: z.array(z.string()).optional(),
@@ -41,6 +42,7 @@ export class Database {
[date] INT, -- epoch milli
[createdAt] INT, -- epoch milli
[updatedAt] INT, -- epoch milli
priority INT,
-- q.title
[image] TEXT,
-- q.tag.split(/ /g)
@@ -53,6 +55,7 @@ export class Database {
CREATE INDEX IF NOT EXISTS files_date ON files([date]);
CREATE INDEX IF NOT EXISTS files_createdAt ON files(createdAt);
CREATE INDEX IF NOT EXISTS files_updatedAt ON files(updatedAt);
CREATE INDEX IF NOT EXISTS files_priority ON files(priority);
`)
this.db.exec(/* sql */ `
@@ -68,8 +71,8 @@ export class Database {
public insert(...ps: IPost[]): void {
const fStmt = this.db.prepare(/* sql */ `
INSERT INTO files ([path], [date], [createdAt], [updatedAt], [image], excerptHtml, contentHtml)
VALUES (@path, @date, @createdAt, @updatedAt, @image, @excerptHtml, @contentHtml)
INSERT INTO files ([path], [date], [createdAt], [updatedAt], priority, [image], excerptHtml, contentHtml)
VALUES (@path, @date, @createdAt, @updatedAt, @priority, @image, @excerptHtml, @contentHtml)
`)
const qStmt = this.db.prepare(/* sql */ `