gemfedwiki

gemini fedwiki proxy
git clone git://jb55.com/gemfedwiki
Log | Files | Refs | README

commit c97202bbc0275e24f5e260be9f7c889aa50ac4b2
parent a3d7e970065a75bbea26a48a5d7485732c08fa5e
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 27 Oct 2021 19:41:29 -0700

don't handle forks for now

I will need to rethink how we handle broken fallback forks

Diffstat:
Mindex.js | 18+++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/index.js b/index.js @@ -38,20 +38,16 @@ function process_item(root, lines, item) } } -function get_fork(journal) +function get_forks(journal) { - let fork = null + let forks = [] for (const item of journal) { - if (item.type === "fork") { - if (item.site) - fork = "/" + item.site - else - fork = null - } + if (item.type === "fork" && item.site) + forks.push(item.site) } - return fork + return forks } function fedwiki2gmi(root, article) @@ -59,8 +55,8 @@ function fedwiki2gmi(root, article) let lines = [] lines.push(`# ${article.title}`) - const fork = get_fork(article.journal) - root = fork || root + //const forks = get_fork(article.journal) + //root = fork || root for (const item of article.story) { process_item(root, lines, item)