158 lines
2.8 KiB
Lua
158 lines
2.8 KiB
Lua
local en = {}
|
|
|
|
-- Templates
|
|
en.tpl_vars = {
|
|
post = {
|
|
author = "{{ author }}",
|
|
content = "{{ content }}",
|
|
date = "{{ date }}",
|
|
summary = "{{ summary }}",
|
|
-- This is not used in the templates yet.
|
|
tags = "{{ tags }}",
|
|
title = "{{ title }}",
|
|
url = "{{ url }}",
|
|
},
|
|
feed = {
|
|
date = "{{ date }}",
|
|
url = "{{ feed_url }}",
|
|
},
|
|
index = {
|
|
posts = "{{ posts }}",
|
|
},
|
|
log = {
|
|
author = "{{ author }}",
|
|
subtitle = "{{ subtitle }}",
|
|
title = "{{ title }}",
|
|
url = "{{ log_url }}",
|
|
},
|
|
}
|
|
|
|
en.atom_header = [[<?xml version="1.0" encoding="UTF-8"?>
|
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
|
<title>{{ title }}</title>
|
|
<subtitle>{{ subtitle }}</subtitle>
|
|
<updated>{{ date }}</updated>
|
|
<author>
|
|
<name>{{ author }}</name>
|
|
</author>
|
|
<id>{{ feed_url }}</id>
|
|
<link href="{{ log_url }}" rel="alternate"/>
|
|
<link href="{{ feed_url }}" rel="self" type="application/atom+xml"/>
|
|
]]
|
|
|
|
en.atom_entry = [[
|
|
<entry>
|
|
<id>{{ url }}</id>
|
|
<title>
|
|
<![CDATA[{{ title }}]] .. "]]>" .. [[
|
|
|
|
</title>
|
|
<updated>{{ date }}</updated>
|
|
<author>
|
|
<name>{{ author }}</name>
|
|
</author>
|
|
<link href="{{ url }}" rel="alternate"/>
|
|
<summary>
|
|
<![CDATA[{{ summary }}]] .. "]]>" .. [[
|
|
|
|
</summary>
|
|
<content>
|
|
<![CDATA[{{ content }}]] .. "]]>" .. [[
|
|
|
|
</content>
|
|
</entry>
|
|
]]
|
|
|
|
en.atom_footer = [[</feed>]]
|
|
|
|
en.post = [[---
|
|
date: {{ date }}
|
|
---
|
|
|
|
# {{ title }}
|
|
|
|
|
|
|
|
|
|
## Links
|
|
|
|
=> gemini:// link
|
|
=> gemini:// link (img)
|
|
=> https:// link (https)]]
|
|
|
|
en.index = [[
|
|
# {{ title }}
|
|
{{ posts }}
|
|
]]
|
|
|
|
en.page = [[
|
|
# {{ title }}
|
|
|
|
## Heading 2
|
|
### Heading 3
|
|
|
|
List:
|
|
|
|
*
|
|
*
|
|
*
|
|
|
|
```
|
|
Preformatted text
|
|
```
|
|
|
|
|
|
## Links
|
|
|
|
=> gemini:// link
|
|
=> gemini:// link (img)
|
|
=> https:// link (https)]]
|
|
|
|
|
|
en.msgs = {}
|
|
|
|
-- %s: gemtext filename
|
|
en.msgs.add_gemtext = "Created %s."
|
|
|
|
-- %s: app executable name
|
|
en.msgs.help_usage = [[%s [options] [capsule] [title]
|
|
|
|
]]
|
|
|
|
-- %s: command-line options
|
|
-- (see env.lua env.cli_opts for the full list)
|
|
en.msgs.help_opts = [[
|
|
Options:
|
|
|
|
%s [lang] Generate a config directory
|
|
%s [capsule] [title] Add a new page with the given title
|
|
%s [capsule] [title] Add a new gemlog post with the given title
|
|
%s Generate an index page and feed of posts
|
|
%s Index and copy posts remotely using scp
|
|
%s Show this help message
|
|
%s Print version info
|
|
]]
|
|
|
|
-- %s: list of language codes
|
|
en.msgs.help_lang_opts = [[
|
|
|
|
Config language options:
|
|
|
|
%s]]
|
|
|
|
en.msgs.index = "Created index page and feed."
|
|
|
|
-- %s: config directory path
|
|
en.msgs.load_config = [[Created config files. Please edit them with the correct
|
|
details before proceeding. The config files can be found at:
|
|
%s]]
|
|
|
|
en.msgs.publish = "Published capsule."
|
|
|
|
|
|
en.errs = {
|
|
invalid_cap_id = "Error: unknown capsule id.",
|
|
}
|
|
|
|
return en
|