Browse Source

Merges pull request #24

Issue#173 Render 30818 wiki pages
master
silberengel 11 months ago
parent
commit
56dde855e6
No known key found for this signature in database
GPG Key ID: 962BEC8725790894
  1. 2
      src/lib/consts.ts
  2. 2
      src/lib/navigator/EventNetwork/Legend.svelte
  3. 2
      src/lib/navigator/EventNetwork/NodeTooltip.svelte
  4. 2
      src/lib/stores.ts
  5. 16
      src/routes/about/+page.svelte
  6. 2
      src/routes/visualize/+page.svelte

2
src/lib/consts.ts

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
export const wikiKind = 30818;
export const indexKind = 30040;
export const zettelKinds = [ 30041 ];
export const zettelKinds = [ 30041, 30818 ];
export const standardRelays = [ 'wss://thecitadel.nostr1.com', 'wss://relay.noswhere.com' ];
export const bootstrapRelays = [ 'wss://purplepag.es', 'wss://relay.noswhere.com' ];

2
src/lib/navigator/EventNetwork/Legend.svelte

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
<span class="legend-circle content"></span>
<span class="legend-letter">C</span>
</div>
<span>Content events (kind 30041) - Publication sections</span>
<span>Content events (kinds 30041, 30818) - Publication sections</span>
</li>
<li class="legend-item">
<svg class="w-6 h-6 mr-2" viewBox="0 0 24 24">

2
src/lib/navigator/EventNetwork/NodeTooltip.svelte

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
<div class="space-y-2">
<div class="font-bold text-base">{node.title}</div>
<div class="text-gray-600 dark:text-gray-400 text-sm">
{node.type} ({node.isContainer ? "30040" : "30041"})
{node.type} ({node.kind})
</div>
<div
class="text-gray-600 dark:text-gray-400 text-sm overflow-hidden text-ellipsis"

2
src/lib/stores.ts

@ -3,6 +3,6 @@ import { FeedType } from "./consts"; @@ -3,6 +3,6 @@ import { FeedType } from "./consts";
export let idList = writable<string[]>([]);
export let alexandriaKinds = readable<number[]>([30040, 30041]);
export let alexandriaKinds = readable<number[]>([30040, 30041, 30818]);
export let feedType = writable<FeedType>(FeedType.StandardRelays);

16
src/routes/about/+page.svelte

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<Heading tag='h1' class='h-leather text-left mb-4'>About</Heading>
<P class="mb-3">
Alexandria is a reader and writer for <A href="/publication?d=gitcitadel-project-documentation-curated-publications-specification-7-by-stella-v-1">curated publications</A> (in Asciidoc), and will eventually also support long-form articles (Markdown) and wiki pages (Asciidoc). It is produced by the <A href="/publication?d=gitcitadel-project-documentation-gitcitadel-project-1-by-stella-v-1">GitCitadel project team</A>.
Alexandria is a reader and writer for <A href="/publication?d=gitcitadel-project-documentation-curated-publications-specification-7-by-stella-v-1">curated publications</A> (in Asciidoc), wiki pages (Asciidoc), and will eventually also support long-form articles (Markdown). It is produced by the <A href="/publication?d=gitcitadel-project-documentation-gitcitadel-project-1-by-stella-v-1">GitCitadel project team</A>.
</P>
<P class="mb-3">
@ -34,11 +34,11 @@ @@ -34,11 +34,11 @@
</P>
<P class="mb-3">
If you click on a card, which represents a 30040 index event, the associated reading view opens to the publication. The app then pulls all of the content events (30041s), in the order in which they are indexed, and displays them as a single document.
If you click on a card, which represents a 30040 index event, the associated reading view opens to the publication. The app then pulls all of the content events (30041s and 30818s for wiki pages), in the order in which they are indexed, and displays them as a single document.
</P>
<P class="mb-3">
Each 30041 section is also a level in the table of contents, which can be accessed from the floating icon top-left in the reading view. This allows for navigation within the publication. (This functionality has been temporarily disabled.)
Each content section (30041 or 30818) is also a level in the table of contents, which can be accessed from the floating icon top-left in the reading view. This allows for navigation within the publication. (This functionality has been temporarily disabled.)
</P>
<div class="flex flex-col items-center space-y-4 my-4">
@ -94,5 +94,15 @@ @@ -94,5 +94,15 @@
<Img src="/screenshots/Documentation.png" alt="Documentation" class='image-border rounded-lg' width="400" />
</div>
<Heading tag='h3' class='h-leather mb-3'>For wiki pages</Heading>
<P class="mb-3">
Alexandria now supports wiki pages (kind 30818), allowing for collaborative knowledge bases and documentation. Wiki pages use the same Asciidoc format as other publications but are specifically designed for interconnected, evolving content.
</P>
<P class="mb-3">
Wiki pages can be linked to from other publications and can contain links to other wiki pages, creating a web of knowledge that can be navigated and explored.
</P>
</main>
</div>

2
src/routes/visualize/+page.svelte

@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
// Fetch the referenced content events
const contentEvents = await $ndkInstance.fetchEvents(
{
kinds: [30041],
kinds: [30041, 30818],
ids: Array.from(contentEventIds),
},
{

Loading…
Cancel
Save