Add description.json following the ahmia proposal
http://msydqstlz2kzerdg.onion/documentation/descriptionProposal/
This commit is contained in:
parent
deece4f5d0
commit
fe74245dad
3 changed files with 18 additions and 7 deletions
15
config.go
15
config.go
|
@ -27,13 +27,14 @@ const (
|
|||
NUM_NEWS = 10
|
||||
DAYS_NEWS_INDEXPAGE = 15
|
||||
|
||||
STORE_PATH = "store/"
|
||||
TEMPLATE_PATH = "templates/"
|
||||
CSS_PATH = "css/"
|
||||
JS_PATH = "js/"
|
||||
IMG_PATH = "img/"
|
||||
ROBOTS_PATH = "robots.txt"
|
||||
LOGGER_CONFIG = "logger.xml"
|
||||
STORE_PATH = "store/"
|
||||
TEMPLATE_PATH = "templates/"
|
||||
CSS_PATH = "css/"
|
||||
JS_PATH = "js/"
|
||||
IMG_PATH = "img/"
|
||||
ROBOTS_PATH = "robots.txt"
|
||||
DESCRIPTION_PATH = "description.json"
|
||||
LOGGER_CONFIG = "logger.xml"
|
||||
|
||||
IMG_WIDTH_BIG = 300
|
||||
IMG_WIDTH_SMALL = 60
|
||||
|
|
9
description.json
Normal file
9
description.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"title": "Imperial Library of Trantor",
|
||||
"description": "The Imperial Library of Trantor (also known as Galactic Library) is a repository of DRM-free ebooks on ePub format. A community base library with thousands of books on multiple languages (english, german, spamish, french, ...) and different topics like novels, essays, computing, ...",
|
||||
"relation": "http://xfmro77i3lixucja.onion/",
|
||||
"keywords": "epub, ebook, book, download, novel, essay, computing, trantor, library, imperial library, drm-free, ereader, kindle",
|
||||
"type": "ebook library",
|
||||
"language": "en,de,fr,es,it,gr,zh",
|
||||
"contactInformation": "zenow@riseup.net"
|
||||
}
|
|
@ -186,6 +186,7 @@ func initRouter(db *database.DB, sg *StatsGatherer) {
|
|||
|
||||
r.HandleFunc("/", sg.Gather(indexHandler))
|
||||
r.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, ROBOTS_PATH) })
|
||||
r.HandleFunc("/description.json", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, DESCRIPTION_PATH) })
|
||||
|
||||
r.HandleFunc("/book/{id:"+id_pattern+"}", sg.Gather(bookHandler))
|
||||
r.HandleFunc("/search/", sg.Gather(searchHandler))
|
||||
|
|
Reference in a new issue