1 Commits

Author SHA1 Message Date
2422df5db7 Add (not currently working) settings to generate a SQL db 2021-03-27 00:02:19 -05:00
6 changed files with 45 additions and 4 deletions

View File

@ -4,6 +4,17 @@ theme = "terminal"
paginate = 5 paginate = 5
enableGitInfo = true enableGitInfo = true
[mediaTypes]
[mediaTypes."text/sql"]
suffixes = ["sql"]
[outputFormats]
[outputFormats.SQL]
mediaType = "text/sql"
[outputs]
home = ["sql", "html"]
# [permalinks] # [permalinks]
# posts = "/:year/:month/:title/" # posts = "/:year/:month/:title/"

View File

@ -3,7 +3,7 @@ title = "Checkra1n GUI on Other Distros"
date = "2021-03-25T21:19:51-05:00" date = "2021-03-25T21:19:51-05:00"
author = "bbaovanc" author = "bbaovanc"
cover = "/blog/media/checkra1n-gui-on-arch-linux.png" cover = "/blog/media/checkra1n-gui-on-arch-linux.png"
tags = ["guide", "linux", "archlinux", "jailbreak", "checkra1n"] tags = ["linux", "archlinux", "jailbreak", "checkra1n"]
keywords = ["checkra1n", "gui", "linux", "arch linux"] keywords = ["checkra1n", "gui", "linux", "arch linux"]
description = """ description = """

View File

@ -3,7 +3,7 @@ title = "Put (edited) in the middle of a message in Discord"
date = "2021-03-25T18:48:34-05:00" date = "2021-03-25T18:48:34-05:00"
author = "bbaovanc" author = "bbaovanc"
cover = "media/discord-tricks/edited-in-middle-of-message.png" cover = "media/discord-tricks/edited-in-middle-of-message.png"
tags = ["tutorial", "discord", "discord-tricks"] tags = ["discord", "discord-tricks"]
keywords = ["discord", "edited"] keywords = ["discord", "edited"]
description = """ description = """

View File

@ -2,7 +2,7 @@
title = "Text Substitution in Discord using `sed`" title = "Text Substitution in Discord using `sed`"
date = "2021-03-25T18:48:15-05:00" date = "2021-03-25T18:48:15-05:00"
author = "bbaovanc" author = "bbaovanc"
tags = ["tutorial", "discord", "discord-tricks"] tags = ["discord", "discord-tricks"]
keywords = ["discord", "sed", "text", "replacement"] keywords = ["discord", "sed", "text", "replacement"]
description = """ description = """
@ -12,7 +12,7 @@ Discord has (very primitive) support for text replacement using `sed` syntax.
showFullContent = false showFullContent = false
+++ +++
## Tutorial ## How-to
[Example Video](/blog/media/discord-tricks/sed-text-replacement.mov) [Example Video](/blog/media/discord-tricks/sed-text-replacement.mov)

View File

@ -0,0 +1,17 @@
DROP TABLE IF EXISTS db.blog;
CREATE TABLE db.blog (
id INT NOT NULL AUTO_INCREMENT,
published DATE NOT NULL,
title TEXT NOT NULL,
body TEXT NOT NULL,
url varchar(2048) NOT NULL,
CONSTRAINT id_PK PRIMARY KEY (id)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_general_ci;
CREATE FULLTEXT INDEX blog_body_IDX ON db.blog (body);
{{ block "main" .}}
{{ end }}

View File

@ -0,0 +1,13 @@
{{ define "main" }}
{{ range (where .Pages "Section" "ne" "gist") }}
{{ range .Pages }}
INSERT INTO db.blog (published, title, body, url)
VALUES(
'{{ .Date.Format "2006-01-02" }}',
'{{ plainify .Title }}',
'{{ (plainify .Content) }}',
'{{ .Permalink }}'
);
{{ end }}
{{ end }}
{{ end }}