feeds: fix articles Link(s)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Server config
|
||||
MODE=development
|
||||
HOST=:8000
|
||||
HOST=:8080
|
||||
|
||||
# Separate services
|
||||
GIT_URL=https://git.phc.dm.unipi.it
|
||||
@@ -9,6 +9,9 @@ CHAT_URL=https://chat.phc.dm.unipi.it
|
||||
# Other
|
||||
EMAIL=macchinisti@lists.dm.unipi.it
|
||||
|
||||
# Base URL
|
||||
BASE_URL=https://phc.dm.unipi.it
|
||||
|
||||
# Lista Utenti
|
||||
USER_PAGES_BASE_URL=https://poisson.phc.dm.unipi.it/~
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ var GitUrl string
|
||||
var ChatUrl string
|
||||
var Email string
|
||||
|
||||
var BaseUrl string
|
||||
|
||||
var UserPagesBaseUrl string
|
||||
|
||||
var AuthServiceHost string
|
||||
@@ -47,6 +49,9 @@ func Load() {
|
||||
loadEnv(&ChatUrl, "CHAT_URL", "https://chat.example.org")
|
||||
loadEnv(&Email, "EMAIL", "mail@example.org")
|
||||
|
||||
// Base URL
|
||||
loadEnv(&BaseUrl, "BASE_URL", "localhost:8080")
|
||||
|
||||
// Poisson
|
||||
loadEnv(&UserPagesBaseUrl, "USER_PAGES_BASE_URL", "https://poisson.phc.dm.unipi.it/~")
|
||||
|
||||
@@ -63,6 +68,8 @@ func Object() util.Map {
|
||||
"ChatUrl": ChatUrl,
|
||||
"Email": Email,
|
||||
|
||||
"BaseUrl": BaseUrl,
|
||||
|
||||
"UserPagesBaseUrl": UserPagesBaseUrl,
|
||||
|
||||
"AuthServiceHost": AuthServiceHost,
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@ package rss
|
||||
|
||||
import (
|
||||
"git.phc.dm.unipi.it/phc/website/articles"
|
||||
"git.phc.dm.unipi.it/phc/website/config"
|
||||
"github.com/gorilla/feeds"
|
||||
)
|
||||
|
||||
@@ -22,7 +23,7 @@ func GenerateRssFeed(entries []*articles.Article, title string, link string, des
|
||||
&feeds.Item{
|
||||
Id: entry.Id,
|
||||
Title: entry.Title,
|
||||
Link: &feeds.Link{Href: entry.ArticlePath},
|
||||
Link: &feeds.Link{Href: config.BaseUrl + "/guide" + entry.Id},
|
||||
Description: entry.Description,
|
||||
Created: entry.PublishDate,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user