From 1a760570ee9cd4e1f584fb71472e43faf4a92546 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 26 Jun 2024 09:33:17 -0500 Subject: [PATCH] Fixed issues with referenced by not getting all references --- build_garden.js | 24 +++++++++++++++---- site/garden/chat-glue/index.md | 2 +- site/garden/commune/index.md | 2 +- site/garden/digital-gardens/index.md | 2 +- site/garden/federated-identity/index.md | 2 +- site/garden/fedi-v2/index.md | 2 +- site/garden/fediverse/index.md | 2 +- .../appeal-to-developers/index.md | 2 ++ .../appeal-to-players/index.md | 2 ++ .../defining-the-genre/index.md | 2 ++ .../navigating-criticism/index.md | 2 ++ .../what-is-content/index.md | 2 ++ site/garden/the-beginner-s-guide/index.md | 2 ++ .../the-indieweb/amplification/index.md | 2 ++ .../the-indieweb/signature-blocks/index.md | 2 ++ site/garden/the-small-web/index.md | 2 +- site/garden/weird/index.md | 2 +- 17 files changed, 43 insertions(+), 13 deletions(-) diff --git a/build_garden.js b/build_garden.js index 10c4fcb4..9e092875 100644 --- a/build_garden.js +++ b/build_garden.js @@ -71,7 +71,7 @@ function moveImportStatementUp(filePath, times = 1) { await walk("./Garden/pages", (dir, file, resolve) => { const filePath = path.resolve(dir, file); let data = fs.readFileSync(filePath).toString(); - if (!data.match(/public::/g)) { + if (data.match(/public::/g) == null) { resolve(); return; } @@ -98,9 +98,22 @@ function moveImportStatementUp(filePath, times = 1) { }); } + resolve(); + }); + await walk("./Garden/pages", (dir, file, resolve) => { + const filePath = path.resolve(dir, file); + let data = fs.readFileSync(filePath).toString(); + if (data.match(/public::/g) == null) { + resolve(); + return; + } + + const name = path.basename(file, ".md").replaceAll('___', '/'); + const slug = toSlug(name).replaceAll(/%3F/gi, '').replaceAll('\'', '-'); + if (!indices.includes(slug)) { for (const match of data.matchAll(/\[\[([^\[\]]*)\]\]/g)) { - const pageSlug = toSlug(match[1]); + const pageSlug = pageLinks[match[1]]; referencedBy[pageSlug] = [...(referencedBy[pageSlug] ?? []), name]; } } @@ -172,10 +185,11 @@ function moveImportStatementUp(filePath, times = 1) { `---\n\n> Tagged by: ${taggedBy[title].map(tag => `[${tag}](${pageLinks[tag]})`).join(", ")}\n\n`); } // TODO show context on references? Perhaps in a `::: info` block? - if (title in referencedBy) { + const pageTitle = data.match(/title: "(.+)"/)[1]; + if (pageLinks[pageTitle] in referencedBy) { data = data.replaceAll( /---\n\n/gm, - `---\n\n> Referenced by: ${referencedBy[title].map(tag => `[${tag}](${pageLinks[tag]})`).join(", ")}\n\n`); + `---\n\n> Referenced by: ${referencedBy[pageLinks[pageTitle]].map(tag => `[${tag}](${pageLinks[tag]})`).join(", ")}\n\n`); } // Fix links to /now data = data.replace('NOW', '/now') @@ -192,7 +206,7 @@ import { data } from '${path.relative(path.resolve("site", relPath), path.resolv import { useData } from 'vitepress'; const pageData = useData(); -

${data.match(/title: "(.+)"/)[1]}

+

${pageTitle}

${wc} words, ~${Math.round(wc / 183)} minute read.


\n`); diff --git a/site/garden/chat-glue/index.md b/site/garden/chat-glue/index.md index 2f127401..0ff9ec5f 100644 --- a/site/garden/chat-glue/index.md +++ b/site/garden/chat-glue/index.md @@ -14,7 +14,7 @@ const pageData = useData();

23 words, ~0 minute read.


-> Referenced by: [Commune](/garden/commune/index.md) +> Referenced by: [Commune](/garden/commune/index.md), [My Personal Website](/garden/my-personal-website/index.md), [The Small Web](/garden/the-small-web/index.md) A theoretical chat system designed to solve the problems of transcribing branching conversations into linear timelines. diff --git a/site/garden/commune/index.md b/site/garden/commune/index.md index 52b42f00..1698991b 100644 --- a/site/garden/commune/index.md +++ b/site/garden/commune/index.md @@ -14,7 +14,7 @@ const pageData = useData();

144 words, ~1 minute read.


-> Referenced by: [Federated Identity](/garden/federated-identity/index.md), [/now](/now/index), [Webrings](/garden/webrings/index.md), [Weird](/garden/weird/index.md) +> Referenced by: [Federated Identity](/garden/federated-identity/index.md), [My Personal Website](/garden/my-personal-website/index.md), [/now](/now/index), [Webrings](/garden/webrings/index.md), [Weird](/garden/weird/index.md) An [Open Source](/garden/open-source/index.md) [Matrix](/garden/matrix/index.md) web client built to be better for communities than anything else out there - Currently in development diff --git a/site/garden/digital-gardens/index.md b/site/garden/digital-gardens/index.md index 753a91e9..e2c92085 100644 --- a/site/garden/digital-gardens/index.md +++ b/site/garden/digital-gardens/index.md @@ -15,7 +15,7 @@ const pageData = useData();

67 words, ~0 minute read.


-> Referenced by: [Chronological](/garden/chronological/index.md), [Commune](/garden/commune/index.md), [Garden-RSS](/garden/garden-rss/index.md), [The Cozy Web](/garden/the-cozy-web/index.md), [The Small Web](/garden/the-small-web/index.md) +> Referenced by: [Chronological](/garden/chronological/index.md), [Commune](/garden/commune/index.md), [Garden-RSS](/garden/garden-rss/index.md), [The Cozy Web](/garden/the-cozy-web/index.md), [The Small Web](/garden/the-small-web/index.md), [This Knowledge Hub](/garden/this-knowledge-hub/index.md) Digital Gardens are [Freeform](/garden/freeform/index.md) collections of information made by an individual or community - Alternatives to [Chronological](/garden/chronological/index.md) personal blogs diff --git a/site/garden/federated-identity/index.md b/site/garden/federated-identity/index.md index e93214db..76f9c0bd 100644 --- a/site/garden/federated-identity/index.md +++ b/site/garden/federated-identity/index.md @@ -16,7 +16,7 @@ const pageData = useData();

68 words, ~0 minute read.


-> Referenced by: [Commune](/garden/commune/index.md), [Weird](/garden/weird/index.md) +> Referenced by: [Commune](/garden/commune/index.md), [Fedi v2](/garden/fedi-v2/index.md), [Weird](/garden/weird/index.md) > Tags: [Decentralized](/garden/decentralized/index.md) diff --git a/site/garden/fedi-v2/index.md b/site/garden/fedi-v2/index.md index f2b1fbc5..addd1b1a 100644 --- a/site/garden/fedi-v2/index.md +++ b/site/garden/fedi-v2/index.md @@ -14,7 +14,7 @@ const pageData = useData();

1652 words, ~9 minute read.


-> Referenced by: [Social Media](/garden/social-media/index.md), [Weird](/garden/weird/index.md) +> Referenced by: [Social Media](/garden/social-media/index.md), [The IndieWeb/Signature Blocks](/garden/the-indieweb/signature-blocks/index.md), [Weird](/garden/weird/index.md) A placeholder name for a theoretical new federated network that is client-centric, in contrast to the server-centric [Fediverse](/garden/fediverse/index.md). Many of the ideas here will be implemented as described or similarly by people much smarter than me as part of [Agentic Federation on Iroh](https://github.com/commune-os/weird/discussions/32), an initiative by the [Weird](/garden/weird/index.md) developers. diff --git a/site/garden/fediverse/index.md b/site/garden/fediverse/index.md index 4ebfcfcc..1668f1c5 100644 --- a/site/garden/fediverse/index.md +++ b/site/garden/fediverse/index.md @@ -16,7 +16,7 @@ const pageData = useData();

29 words, ~0 minute read.


-> Referenced by: [ATProto](/garden/atproto/index.md), [Decentralized](/garden/decentralized/index.md), [Fedi v2](/garden/fedi-v2/index.md), [Incremental Social](/garden/incremental-social/index.md), [Mbin](/garden/mbin/index.md), [Weird](/garden/weird/index.md) +> Referenced by: [ActivityPub](/garden/activitypub/index.md), [ATProto](/garden/atproto/index.md), [Decentralized](/garden/decentralized/index.md), [Fedi v2](/garden/fedi-v2/index.md), [Incremental Social](/garden/incremental-social/index.md), [Mbin](/garden/mbin/index.md), [Nostr](/garden/nostr/index.md), [Social Media](/garden/social-media/index.md), [The Small Web](/garden/the-small-web/index.md), [Weird](/garden/weird/index.md) > Tags: [Decentralized](/garden/decentralized/index.md) diff --git a/site/garden/guide-to-incrementals/appeal-to-developers/index.md b/site/garden/guide-to-incrementals/appeal-to-developers/index.md index 9dee4163..0544899d 100644 --- a/site/garden/guide-to-incrementals/appeal-to-developers/index.md +++ b/site/garden/guide-to-incrementals/appeal-to-developers/index.md @@ -14,6 +14,8 @@ const pageData = useData();

636 words, ~3 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + There are a lot of developers in the incremental games community - the genre seems to draw them in, and convert a lot of players _into_ developers. Let's explore the reasons why this genre appeals to developers. ## Incrementals are Easy to Make diff --git a/site/garden/guide-to-incrementals/appeal-to-players/index.md b/site/garden/guide-to-incrementals/appeal-to-players/index.md index 37cc7349..e5d6d757 100644 --- a/site/garden/guide-to-incrementals/appeal-to-players/index.md +++ b/site/garden/guide-to-incrementals/appeal-to-players/index.md @@ -14,6 +14,8 @@ const pageData = useData();

2166 words, ~12 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + This is something that has been discussed and analyzed by many people, and to some extent, I feel like everything that can be said on the topic already has. However, a lot of these analyses are from the perspective of those with not as much experience and involvement within the genre as I'd argue would be necessary for a fully contextualized answer. I'm interested in ludology and part of that includes interpreting games as art, and to that end what constitutes a game, let alone a "good game". Incremental games are oft criticized, unfairly in my biased opinion, of not even constituting games, such as was posited by [this polygon article](https://www.polygon.com/2013/9/30/4786780/the-cult-of-the-cookie-clicker-when-is-a-game-not-a-game). ## Numbers Going Up diff --git a/site/garden/guide-to-incrementals/defining-the-genre/index.md b/site/garden/guide-to-incrementals/defining-the-genre/index.md index d92eca3c..6e146850 100644 --- a/site/garden/guide-to-incrementals/defining-the-genre/index.md +++ b/site/garden/guide-to-incrementals/defining-the-genre/index.md @@ -14,6 +14,8 @@ const pageData = useData();

3429 words, ~19 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + Video games are placed into genres for a variety of reasons. They can give a mental shorthand to set the player's expectations up, they can help a game market itself by its similarities to other, already popular games, and honestly, people just love categorization for its own sake. For this guide, it's important to define the genre so it is clear what games it's even talking about. This poses a problem. "Incremental" is a _horribly_ vague way to define games. _Most_ games have numbers going up in some form or another. We need a more specific definition - similar to how "strategy" can't just mean any game with _any_ amount of strategy because that would be _most_ games. What specifically differentiates incremental games from the rest? diff --git a/site/garden/guide-to-incrementals/navigating-criticism/index.md b/site/garden/guide-to-incrementals/navigating-criticism/index.md index b3f92fdf..1a88aa85 100644 --- a/site/garden/guide-to-incrementals/navigating-criticism/index.md +++ b/site/garden/guide-to-incrementals/navigating-criticism/index.md @@ -14,6 +14,8 @@ const pageData = useData();

747 words, ~4 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + Developing games is fun and exciting and teaches a lot of wonderful skills - I enthusiastically encourage anyone with an interest in game development to try it out - and incremental games are a wonderful way to get started. However, there are many challenges young and inexperienced developers have to face, and I think the hardest one - harder than coding, debugging, balancing, etc. - is handling criticism. When you put your heart and soul into a game it is natural to feel very vulnerable. While I think there's a lot communities can do to ensure they're welcoming, positive and constructive with their criticisms, inevitably you will eventually read some, and potentially a lot, of comments that can deeply affect you. No one is immune to this, from young incremental game developers to the largest content creators you can think of. That's why it's important to be able to process and navigate criticism, because ultimately collecting feedback is essential to the journey to becoming a better developer. On this page, we'll explore how to embrace criticism, grow from it, and continue to post your games publicly with confidence. ## Reading Feedback diff --git a/site/garden/guide-to-incrementals/what-is-content/index.md b/site/garden/guide-to-incrementals/what-is-content/index.md index bceeacd1..25806b7f 100644 --- a/site/garden/guide-to-incrementals/what-is-content/index.md +++ b/site/garden/guide-to-incrementals/what-is-content/index.md @@ -14,6 +14,8 @@ const pageData = useData();

2092 words, ~11 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + If you've been in the incremental games community for any amount of time, you'll quickly find the number one thing players want is _content_. They want as much of it as possible! The most popular incremental games have tons of content, so they just keep stretching on and on and on, introducing mechanic after mechanic, and players love it. In fact, players seem to value the _amount_ of content over the quality of any _specific_ content. However, there's a bit of a lack of understanding concerning _what_ content is, and I'd like to explore what counts as content, and how we measure it. As a baseline definition, I think "content" can just be described as the parts of the game that engage the player, but to truly understand it we need to contextualize what that means and how it affects the gameplay experience. To clarify the purpose of this page, my goal is not to get (too) nitpicky or to attack games with "low content". There's nothing wrong with short / low-content games - I'm quite a big fan of those games myself! This is mostly targeted toward those who _ask_ for content and settle for "long" games, and those who _want_ to provide content but want to make sure they're not just artificially inflating the game. Ultimately, I suppose the goal is to just reduce the amount of artificially inflated content for the sake of having a "longer" game. diff --git a/site/garden/the-beginner-s-guide/index.md b/site/garden/the-beginner-s-guide/index.md index ffed2285..e25da119 100644 --- a/site/garden/the-beginner-s-guide/index.md +++ b/site/garden/the-beginner-s-guide/index.md @@ -15,6 +15,8 @@ const pageData = useData();

70 words, ~0 minute read.


+> Referenced by: [Davey Wreden](/garden/davey-wreden/index.md) + > Tags: [Davey Wreden](/garden/davey-wreden/index.md) My favorite video game of all time, bar none. Created by [Davey Wreden](/garden/davey-wreden/index.md) diff --git a/site/garden/the-indieweb/amplification/index.md b/site/garden/the-indieweb/amplification/index.md index b694473c..2f6663bd 100644 --- a/site/garden/the-indieweb/amplification/index.md +++ b/site/garden/the-indieweb/amplification/index.md @@ -14,6 +14,8 @@ const pageData = useData();

57 words, ~0 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + Refers to reblogging (and re-hosting, sometimes) of someone else's content on your own site [The Internet is a series of webs](https://aramzs.xyz/essays/the-internet-is-a-series-of-webs/) discusses some ideas and best practices for amplification diff --git a/site/garden/the-indieweb/signature-blocks/index.md b/site/garden/the-indieweb/signature-blocks/index.md index e4026d5e..ff4895d0 100644 --- a/site/garden/the-indieweb/signature-blocks/index.md +++ b/site/garden/the-indieweb/signature-blocks/index.md @@ -14,4 +14,6 @@ const pageData = useData();

14 words, ~0 minute read.


+> Referenced by: [Digital Gardens](/garden/digital-gardens/index.md), [Incremental Social](/garden/incremental-social/index.md), [Kronos](/garden/kronos/index.md), [My Personal Website](/garden/my-personal-website/index.md), [Social Media](/garden/social-media/index.md) + A proposal I want to write for posting signed content on your [IndieWeb](/garden/the-small-web/index.md) website diff --git a/site/garden/the-small-web/index.md b/site/garden/the-small-web/index.md index 8c41e39e..0f988a5b 100644 --- a/site/garden/the-small-web/index.md +++ b/site/garden/the-small-web/index.md @@ -15,7 +15,7 @@ const pageData = useData();

771 words, ~4 minute read.


-> Referenced by: [/now](/now/index), [This Knowledge Hub](/garden/this-knowledge-hub/index.md) +> Referenced by: [Commune](/garden/commune/index.md), [Federated Identity](/garden/federated-identity/index.md), [Fedi v2](/garden/fedi-v2/index.md), [My Personal Website](/garden/my-personal-website/index.md), [/now](/now/index), [The IndieWeb/Signature Blocks](/garden/the-indieweb/signature-blocks/index.md), [This Knowledge Hub](/garden/this-knowledge-hub/index.md), [Webrings](/garden/webrings/index.md), [Weird](/garden/weird/index.md) The small web (also known as the indie web, personal web, the web revival movement, and other terms) refers to small, personal, independent websites. It is seen as a direct alternative to the centralized and homogenized websites like X, Meta, and TikTok. [My Personal Website](/garden/my-personal-website/index.md) is part of the small web! diff --git a/site/garden/weird/index.md b/site/garden/weird/index.md index 70e133a1..c676faa1 100644 --- a/site/garden/weird/index.md +++ b/site/garden/weird/index.md @@ -14,7 +14,7 @@ const pageData = useData();

114 words, ~1 minute read.


-> Referenced by: [Commune](/garden/commune/index.md), [Fedi v2](/garden/fedi-v2/index.md), [The Small Web](/garden/the-small-web/index.md) +> Referenced by: [Commune](/garden/commune/index.md), [Fedi v2](/garden/fedi-v2/index.md), [My Personal Website](/garden/my-personal-website/index.md), [The Small Web](/garden/the-small-web/index.md) [Weird](https://weird.one) is an [Open Source](/garden/open-source/index.md) project by the [Commune](/garden/commune/index.md) team currently in development