~jheckt/PhotographyWebsite

a32aebfd726fc42ff51f82c88ae380a8eaac210d — turnipsoup 1 year, 10 months ago c2a7384 + 09fb10c
Merge branch 'working' into main
1 files changed, 12 insertions(+), 3 deletions(-)

M rss.go
M rss.go => rss.go +12 -3
@@ 3,9 3,9 @@
package main

import (
	"fmt"
	"strings"
	"time"
	"unicode"

	"github.com/gorilla/feeds"



@@ 27,8 27,18 @@ func rss() string {
	blog := loadBlogPosts()

	for _, filename := range blog.SortedPosts {

		sdate := blog.PostDateMap[filename]

		sdate = strings.Map(func(r rune) rune {
			if unicode.IsPrint(r) {
				return r
			}
			return -1
		}, sdate)

		pdate, error := time.Parse("2006-01-02",
			strings.Replace(blog.PostDateMap[filename], " ", "", -1))
			strings.Replace(sdate, " ", "", -1))

		if error != nil {
			log.Error(error)


@@ 47,6 57,5 @@ func rss() string {
		log.Error("Error processing RSS feed: ", err)
	}

	fmt.Println(rss)
	return rss
}