aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/atom.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2019-04-20 02:48:57 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2019-04-20 03:18:45 +0200
commitcf95aa88595184f51da4eeb06301e436a6a5f589 (patch)
tree8381f416e4963a9a1501fcc67fa8ea1f5f99bee5 /src/blogc-make/atom.c
parent8dd8f936bc973f28b67624709b96e805f58dd6bd (diff)
downloadblogc-cf95aa88595184f51da4eeb06301e436a6a5f589.tar.gz
blogc-cf95aa88595184f51da4eeb06301e436a6a5f589.tar.bz2
blogc-cf95aa88595184f51da4eeb06301e436a6a5f589.zip
make: use permalinks as atom ids
I have just realized that was implementing atom feeds wrong for long time. atom ids are supposed to be valid uris. this is a small but breaking change. it is supposed to make some clients think that all of the old posts were republished. This can be avoided by running something like this, before upgrading: $ blogc-make atom_dump > templates/atom.tmpl however, keep in mind that your atom ids are invalid :/
Diffstat (limited to 'src/blogc-make/atom.c')
-rw-r--r--src/blogc-make/atom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blogc-make/atom.c b/src/blogc-make/atom.c
index 3018820..58113fc 100644
--- a/src/blogc-make/atom.c
+++ b/src/blogc-make/atom.c
@@ -21,7 +21,7 @@ static const char atom_template[] =
"<feed xmlns=\"http://www.w3.org/2005/Atom\">\n"
" <title type=\"text\">{{ SITE_TITLE }}{%% ifdef FILTER_TAG %%} - "
"{{ FILTER_TAG }}{%% endif %%}</title>\n"
- " <id>{{ BASE_URL }}%s</id>\n"
+ " <id>{{ BASE_DOMAIN }}{{ BASE_URL }}%s</id>\n"
" <updated>{{ DATE_FIRST_FORMATTED }}</updated>\n"
" <link href=\"{{ BASE_DOMAIN }}{{ BASE_URL }}/\" />\n"
" <link href=\"{{ BASE_DOMAIN }}{{ BASE_URL }}%s\" rel=\"self\" />\n"
@@ -33,7 +33,7 @@ static const char atom_template[] =
" {%% block listing %%}\n"
" <entry>\n"
" <title type=\"text\">{{ TITLE }}</title>\n"
- " <id>{{ BASE_URL }}%s</id>\n"
+ " <id>{{ BASE_DOMAIN }}{{ BASE_URL }}%s</id>\n"
" <updated>{{ DATE_FORMATTED }}</updated>\n"
" <published>{{ DATE_FORMATTED }}</published>\n"
" <link href=\"{{ BASE_DOMAIN }}{{ BASE_URL }}%s\" />\n"