aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/atom.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2019-04-21 19:12:01 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2019-04-21 19:12:16 +0200
commit60f8be44dd876c221270a34989480936e716f5ab (patch)
treec773c6c1ffabce1dba83ce59c6e6d292d0fe9d12 /src/blogc-make/atom.c
parentcf95aa88595184f51da4eeb06301e436a6a5f589 (diff)
downloadblogc-60f8be44dd876c221270a34989480936e716f5ab.tar.gz
blogc-60f8be44dd876c221270a34989480936e716f5ab.tar.bz2
blogc-60f8be44dd876c221270a34989480936e716f5ab.zip
make: removed atom_legacy_entry_id setting
Diffstat (limited to 'src/blogc-make/atom.c')
-rw-r--r--src/blogc-make/atom.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/blogc-make/atom.c b/src/blogc-make/atom.c
index 58113fc..6749658 100644
--- a/src/blogc-make/atom.c
+++ b/src/blogc-make/atom.c
@@ -75,21 +75,11 @@ bm_atom_generate(bm_settings_t *settings)
char *post_url = bm_generate_filename(NULL, post_prefix, "{{ FILENAME }}",
post_ext);
- char *entry_id = NULL;
- if (bc_str_to_bool(bc_trie_lookup(settings->settings, "atom_legacy_entry_id"))) {
- entry_id = bc_strdup_printf("%s%s/{{ FILENAME }}/",
- post_prefix[0] == '\0' ? "" : "/", post_prefix);
- }
- else {
- entry_id = bc_strdup(post_url);
- }
-
char *rv = bc_strdup_printf(atom_template, atom_url->str, atom_url->str,
- entry_id, post_url);
+ post_url, post_url);
bc_string_free(atom_url, true);
free(post_url);
- free(entry_id);
return rv;
}
@@ -101,6 +91,13 @@ bm_atom_deploy(bm_settings_t *settings, bc_error_t **err)
if (settings == NULL || err == NULL || *err != NULL)
return NULL;
+ if (NULL != bc_trie_lookup(settings->settings, "atom_legacy_entry_id")) {
+ *err = bc_error_new_printf(BLOGC_MAKE_ERROR_ATOM,
+ "'atom_legacy_entry_id' setting is not supported anymore. see "
+ "https://blogc.rgm.io/news/blogc-0.16.1/ for details");
+ return NULL;
+ }
+
// this is not really portable
char fname[] = "/tmp/blogc-make_XXXXXX";
int fd;