pub / newsplanet

Planet-Style Newsfeed generated with perlanet
git clone https://src.jayvii.de/pub/newsplanet.git
Home | Log | Files | Exports | Refs | README | RSS

commit 5dcfc051e656dd94c82738435d3f67e58b2df94e
parent 64a8ca17f53d6c71d7f0a05e42ee82775e43fc92
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun, 27 Oct 2024 13:07:33 +0100

fix: use correct manifest json files

Diffstat:
Rmanifest.json -> general.json | 0
Alinks.json | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mrun.sh | 4++++
Mtemplate.html | 2+-
4 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/manifest.json b/general.json diff --git a/links.json b/links.json @@ -0,0 +1,61 @@ +{ + "name":"Newsplanet (Links)", + "short_name":"News: Links", + "start_url":"/links.html", + "display":"standalone", + "scope":"/links.html", + "background_color":"#1d1e20", + "description":"Planet-style news feed.", + "icons":[ + { + "src":"/assets/favicon_16.png", + "sizes":"16x16", + "type":"image/png" + }, + { + "src":"/assets/favicon_32.png", + "sizes":"32x32", + "type":"image/png" + }, + { + "src":"/assets/favicon_48.png", + "sizes":"48x48", + "type":"image/png" + }, + { + "src":"/assets/favicon_64.png", + "sizes":"64x64", + "type":"image/png" + }, + { + "src":"/assets/favicon_72.png", + "sizes":"72x72", + "type":"image/png" + }, + { + "src":"/assets/favicon_96.png", + "sizes":"96x96", + "type":"image/png" + }, + { + "src":"/assets/favicon_144.png", + "sizes":"144x144", + "type":"image/png" + }, + { + "src":"/assets/favicon_168.png", + "sizes":"168x168", + "type":"image/png" + }, + { + "src":"/assets/favicon_192.png", + "sizes":"192x192", + "type":"image/png" + }, + { + "src":"/assets/favicon_256.png", + "sizes":"256x256", + "type":"image/png" + } + ] +} diff --git a/run.sh b/run.sh @@ -20,6 +20,10 @@ XML=`grep -E '^\s+file:.*?\.xml\s*$' "$CONFIG" | awk '{ print $NF }'` # insert link to rss/xml file sed -E -e "s/<!--XML-->/\"$XML\"/" -i "$HTML" +# insert link to manifest JSON file +MANIFEST=`echo "$HTML" | sed -e 's/html/json/'` +sed -E -e "s/<!--MANIFEST-->/\"$MANIFEST\"/" -i "$HTML" + # remove images and iframes from article previews printf "Removing images and iframes...\n" sed -E -e 's/<img[^>]*>//g' -e 's/<iframe[^>]*>//g' -i "$HTML" diff --git a/template.html b/template.html @@ -20,7 +20,7 @@ <link rel="apple-touch-icon" href="assets/favicon.png"> <link rel="stylesheet" type="text/css" href="assets/css/simple.min.css"> <link rel="alternate" title="[%feed.title %]" type="application/atom+xml" href="rss.xml"> - <link crossorigin="use-credentials" rel="manifest" href="manifest.json"> + <link crossorigin="use-credentials" rel="manifest" href=<!--MANIFEST-->> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> /* Always scroll smoothly */