Browse Source

minor

master
alistair 3 years ago
parent
commit
406cb75545
  1. 2
      default-templates/stgen.json
  2. 10
      main.cpp

2
default-templates/stgen.json

@ -3,5 +3,5 @@ @@ -3,5 +3,5 @@
"url": "http://127.0.0.1:8080",
"date-in-format": "%d-%m-%y",
"date-out-format": "%a, %b %d, %Y",
"author": "name"
"author": "Anonymous"
}

10
main.cpp

@ -999,7 +999,6 @@ class microblog_plugin : public s2_substitution_plugin { @@ -999,7 +999,6 @@ class microblog_plugin : public s2_substitution_plugin {
std::multimap<time_t, blog_item> feed_items = get_sorted_post_list(relpath, properties, pages);
std::string text = "";
feed_builder f {compute_url(properties.at("current_file"), properties), properties.at("name"), {properties.at("author")}};
@ -1039,8 +1038,6 @@ class microblog_plugin : public s2_substitution_plugin { @@ -1039,8 +1038,6 @@ class microblog_plugin : public s2_substitution_plugin {
class builder {
mmd::markdown_parser parser;
std::map<std::string, substitution_plugin *> substitution_commands;
std::map<std::string, s2_substitution_plugin *> s2_substitution_commands;
@ -1360,7 +1357,6 @@ class builder { @@ -1360,7 +1357,6 @@ class builder {
std::string ndate = reformat_date(article_properties.at("date"), article_properties);
article_properties["date"] = ndate;
}
if (!article_properties.count("notemplating")) {
@ -1634,7 +1630,6 @@ class builder { @@ -1634,7 +1630,6 @@ class builder {
if (fs::exists(properties.at("publish_root"))) {
for (auto e:fs::recursive_directory_iterator(properties.at("publish_root"))) {
if (!compile_jobs.contains(e.path().string())) {
// to_delete.push_back(e.path());
compile_jobs[e.path()] = {job_type::DELETE_FILE};
spdlog::warn("Deleting: {}", e.path().string());
}
@ -1815,7 +1810,6 @@ int main(int argc, char **argv) { @@ -1815,7 +1810,6 @@ int main(int argc, char **argv) {
// directory list
// TODO: Recursive directory lists
// TODO: Fix specifying folder names and dates in directory lists
// TODO: Code comment plugin
// TODO: exclude posts dated for in the future? seems dumb idk
// TODO: transclude from web
// TODO: make templating better wrt recursion and queueing
@ -1824,7 +1818,9 @@ int main(int argc, char **argv) { @@ -1824,7 +1818,9 @@ int main(int argc, char **argv) {
// TODO: Custom template substitution: make recursive through the template
// header declaration: keep running substitution until you run out of
// templates to apply.
// TODO: microblog plugin
// TODO: post tags
// TODO: post list from an RSS feed
// TODO: filesystem watch mode using libevent
auto cmd_options = parse_options(argc, argv);
builder b (cmd_options);

Loading…
Cancel
Save