Upload files to "/"

This commit is contained in:
Nathan Upchurch 2025-05-13 09:46:43 -04:00
parent 25f04d46cb
commit ee7c4c9560
2 changed files with 41 additions and 0 deletions

16
poaster.rb Normal file
View File

@ -0,0 +1,16 @@
require 'json'
config_file = File.read('./poasterConfig.json')
config_data = JSON.parse(config_file)
post_type_radiolist_prefix = %Q[kdialog --title "Poaster" --radiolist "Select a post type:"]
def build_radiolist_command(prefix_string, config_data)
command_string = prefix_string
config_data['postTypes'].each_with_index do |type, i|
command_string += %Q[ #{i+1} "#{type['name']}" off]
end
return command_string
end
`#{build_radiolist_command(post_type_radiolist_prefix, config_data)}`

25
poasterConfig.json Normal file
View File

@ -0,0 +1,25 @@
{
"buildCommand": "npx @11ty/eleventy",
"postTypes": [
{
"name": "Now Burning",
"contentEnabled": true,
"frontMatter": [
{
"name": "Title",
"allowEmpty": false,
"inputType": "text"
},
{
"name": "Date",
"allowEmpty": false,
"inputType": "date"
}
],
"titlePrefix": "Now Burning: ",
"titleSuffix": ""
}
],
"uploadCommand": "update-website",
"workingDirectory": "/home/n_u/Repos/nathanupchurch.com/"
}