Skip to content

Commit af8a88a

Browse files
committed
feat(blog): add article descriptions for atom & rss feeds
1 parent 546ee39 commit af8a88a

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

articles/How I deploy Nix + Docker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ uri: deploy-nix-docker
55
author:
66
name: drawbu
77
email: contact@drawbu.dev
8+
description: Guide on how I leveraged my Nix workflow to create reproducible docker images to deploy my blog
89
---
910

1011
Hello everyone :)

articles/Install NixOS on Contabo server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ uri: install-nixos-contabo-vps
55
author:
66
name: drawbu
77
email: contact@drawbu.dev
8+
description: Step by step installation of NixOS on a contabo server. This is mainly a guide for myself
89
---
910

1011
In this guide, we'll see how to setup NixOS on a Ubuntu 22.04 Contabo VPS.

articles/Server block Ubuntu + Nginx + systemd.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ uri: server-block-nginx-systemd-ubuntu-https
55
author:
66
name: drawbu
77
email: contact@drawbu.dev
8+
description: How I used nginx and systemd on a single VPS to host a ton of different websites
89
---
910

1011
In this guide, we are going to use the keyword for you to replace. There will be `REPOSITORY ` and `DOMAIN_NAME` to replace.

pkg/routes/blog/article.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ import (
1818
)
1919

2020
type article struct {
21-
Title string
22-
Date time.Time
23-
Content []byte
24-
Uri string
25-
Author articleAuthor
21+
Title string
22+
Date time.Time
23+
Content []byte
24+
Uri string
25+
Author articleAuthor
26+
Description string
2627
}
2728

2829
type articleAuthor struct {
@@ -38,6 +39,7 @@ type articleMetadata struct {
3839
Name string `yaml:"name"`
3940
Email string `yaml:"email,omitempty"`
4041
} `yaml:"author"`
42+
Description string `yaml:"description"`
4143
}
4244

4345
func NewArticle(file fs.File) (*article, error) {
@@ -67,6 +69,7 @@ func NewArticle(file fs.File) (*article, error) {
6769
Email: metadata.Author.Email,
6870
Name: metadata.Author.Name,
6971
},
72+
Description: metadata.Description,
7073
}, nil
7174
}
7275

pkg/routes/blog/rss.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func makeFeed() feeds.Feed {
4949
items = append(items, &feeds.Item{
5050
Title: item.Title,
5151
Link: &feeds.Link{Href: fmt.Sprintf("https://drawbu.dev/blog/%s", item.Uri)},
52-
// Description: "A discussion on controlled parallelism in golang",
52+
Description: item.Description,
5353
Author: &feeds.Author{Name: item.Author.Name, Email: item.Author.Email},
5454
Created: item.Date,
5555
})

0 commit comments

Comments
 (0)