fedipod-bb 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fedipod-bb",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "FediPod-BB: a forum website whose record lives on a Solid pod.",
5
5
  "license": "MIT",
6
6
  "author": "Jeff Zucker",
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow: /
package/src/render.mjs CHANGED
@@ -52,6 +52,9 @@ function fill(shell, { title, description, forumName, forumHref, modsLine, acts,
52
52
  async function draw(url, shell, f) {
53
53
  const place = placeOf({ origin: url.origin, pathname: url.pathname, search: '' });
54
54
  if (!place.own || !place.root || !place.base) return null;
55
+ // Drawn: the front page, a category, a topic. Any other address under the
56
+ // forum is the page's own to build.
57
+ if (!/^(?:c\/[^/]+|t\/[^/]+\/[^/]+)?\/?$/u.test(url.pathname.slice(place.root.length))) return null;
55
58
  const view = viewOfPath(url.pathname, place.root);
56
59
  const read = reader({ fetch: f, at: AT });
57
60
  const forum = await read.forum(place.base);