commits
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>
Useful to check if post is allowed for inclusion in say, index listings.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>
This pull request introduces a helper function `newAtomLink` to correctly construct Atom feed links using subdomains and slugs. Previously, the feed link was generated using `filepath.Join`, which is intended for file paths and caused malformed URLs like:
```
https://example.comfoo/bar
```
Now, the link is properly constructed in the format:
```
https://<subdomain>.<host>/<slug>
```
Example:
```go
newAtomLink("https://example.com", "blog", "some-post")
// → <link href="https://blog.example.com/some-post"></link>
```
This change improves the correctness and clarity of Atom feed generation by replacing inappropriate path logic with URL-aware composition via url.Parse.
Templates can now be specified as a relative path under 'templates'. For
example, a template at 'templates/foo/bar.html' can simply be referenced
as 'foo/bar.html' for loading.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>
This pull request introduces a helper function `newAtomLink` to correctly construct Atom feed links using subdomains and slugs. Previously, the feed link was generated using `filepath.Join`, which is intended for file paths and caused malformed URLs like:
```
https://example.comfoo/bar
```
Now, the link is properly constructed in the format:
```
https://<subdomain>.<host>/<slug>
```
Example:
```go
newAtomLink("https://example.com", "blog", "some-post")
// → <link href="https://blog.example.com/some-post"></link>
```
This change improves the correctness and clarity of Atom feed generation by replacing inappropriate path logic with URL-aware composition via url.Parse.