With feedback from adc, thanks!
.It style.css
CSS stylesheet.
.El
.It style.css
CSS stylesheet.
.El
+.Sh ENVIRONMENT
+.Bl -tag -width Ds
+.It Ev STAGIT_BASEURL
+Base URL to make links in atom.xml absolute.
+For example: STAGIT_BASE_URL="https://git.codemadness.org/stagit/".
+.El
+.Sh EXIT STATUS
+.Ex -std
.Sh SEE ALSO
.Xr stagit-index 1
.Sh AUTHORS
.Sh SEE ALSO
.Xr stagit-index 1
.Sh AUTHORS
static git_repository *repo;
static git_repository *repo;
+static const char *baseurl = ""; /* base URL to make absolute RSS/Atom URI */
static const char *relpath = "";
static const char *repodir;
static const char *relpath = "";
static const char *repodir;
xmlencode(fp, ci->summary, strlen(ci->summary));
fputs("</title>\n", fp);
}
xmlencode(fp, ci->summary, strlen(ci->summary));
fputs("</title>\n", fp);
}
- fprintf(fp, "<link rel=\"alternate\" type=\"text/html\" href=\"commit/%s.html\" />\n",
- ci->oid);
+ fprintf(fp, "<link rel=\"alternate\" type=\"text/html\" href=\"%scommit/%s.html\" />\n",
+ baseurl, ci->oid);
if (ci->author) {
fputs("<author>\n<name>", fp);
if (ci->author) {
fputs("<author>\n<name>", fp);
+ if ((p = getenv("STAGIT_BASEURL")))
+ baseurl = p;
+
if (git_repository_open_ext(&repo, repodir,
GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
fprintf(stderr, "%s: cannot open repository\n", argv[0]);
if (git_repository_open_ext(&repo, repodir,
GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
fprintf(stderr, "%s: cannot open repository\n", argv[0]);