From 1ba8a422926fc9f8d097002e4aa531742e2d4a4c Mon Sep 17 00:00:00 2001
From: Silberengel
Date: Tue, 13 May 2025 18:22:57 +0200
Subject: [PATCH] update docs, correct wikilinks, and fix border styling closes
Issue#215
---
README.md | 2 +-
src/app.css | 13 +++++++++++++
src/lib/utils/markup/MarkupInfo.md | 23 ++++++++++++-----------
src/lib/utils/markup/basicMarkupParser.ts | 4 ++--
src/routes/contact/+page.svelte | 4 ++--
tests/integration/markupTestfile.md | 2 +-
6 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index a88553e..b7cffbb 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ For a thorough introduction, please refer to our [project documention](https://n
## Issues and Patches
-If you would like to suggest a feature or report a bug, or submit a patch for review, please use the [Nostr git interface](https://gitcitadel.com/r/naddr1qvzqqqrhnypzplfq3m5v3u5r0q9f255fdeyz8nyac6lagssx8zy4wugxjs8ajf7pqyt8wumn8ghj7ur4wfcxcetjv4kxz7fwvdhk6tcqpfqkcetcv9hxgunfvyamcf5z) on our homepage.
+If you would like to suggest a feature or report a bug, please use the [Alexandria Contact page](https://next-alexandria.gitcitadel.eu/contact).
You can also contact us [on Nostr](https://njump.me/nprofile1qqsggm4l0xs23qfjwnkfwf6fqcs66s3lz637gaxhl4nwd2vtle8rnfqprfmhxue69uhhg6r9vehhyetnwshxummnw3erztnrdaks5zhueg), directly.
diff --git a/src/app.css b/src/app.css
index fe399b6..dc4ccc5 100644
--- a/src/app.css
+++ b/src/app.css
@@ -436,4 +436,17 @@
display: flex;
flex-direction: column;
}
+
+ /* Input styles */
+ input[type="text"],
+ input[type="email"],
+ input[type="password"],
+ input[type="search"],
+ input[type="number"],
+ input[type="tel"],
+ input[type="url"],
+ textarea {
+ @apply bg-primary-0 dark:bg-primary-1000 text-gray-800 dark:text-gray-300 border-s-4 border-primary-200 rounded shadow-none px-4 py-2;
+ @apply focus:border-primary-400 dark:focus:border-primary-500;
+ }
}
\ No newline at end of file
diff --git a/src/lib/utils/markup/MarkupInfo.md b/src/lib/utils/markup/MarkupInfo.md
index 0744850..dc8c18f 100644
--- a/src/lib/utils/markup/MarkupInfo.md
+++ b/src/lib/utils/markup/MarkupInfo.md
@@ -2,9 +2,9 @@
Alexandria supports multiple markup formats for different use cases. Below is a summary of the supported tags and features for each parser, as well as the formats used for publications and wikis.
-## Basic Markdown Parser
+## Basic Markup Parser
-The **basic markdown parser** supports:
+The **basic markup parser** follows the [Nostr best-practice guidelines](https://github.com/nostrability/nostrability/issues/146) and supports:
- **Headers:**
- ATX-style: `# H1` through `###### H6`
@@ -18,19 +18,19 @@ The **basic markdown parser** supports:
- **Links:** `[text](url)`
- **Images:** ``
- **Hashtags:** `#hashtag`
-- **Nostr identifiers:** npub, nprofile, nevent, naddr, note, with or without `nostr:` prefix
-- **Emoji shortcodes:** `:smile:`
+- **Nostr identifiers:** npub, nprofile, nevent, naddr, note, with or without `nostr:` prefix (note is deprecated)
+- **Emoji shortcodes:** `:smile:` will render as 😄
-## Advanced Markdown Parser
+## Advanced Markup Parser
-The **advanced markdown parser** includes all features of the basic parser, plus:
+The **advanced markup parser** includes all features of the basic parser, plus:
- **Inline code:** `` `code` ``
-- **Syntax highlighting:** for code blocks in over 100 languages
+- **Syntax highlighting:** for code blocks in many programming languages (from [highlight.js](https://highlightjs.org/))
- **Tables:** Pipe-delimited tables with or without headers
-- **Footnotes:** `[^1]` and `[ ^1 ]: footnote text`
-- **Wikilinks:** `[[Page Name]]` (NIP-54)
-- **Better footnote rendering:** with backreferences and unique numbering
+- **Footnotes:** `[^1]` or `[^Smith]`, which should appear where the footnote shall be placed, and will be displayed as unique, consecutive numbers
+- **Footnote References:** `[^1]: footnote text` or `[^Smith]: Smith, Adam. 1984 "The Wiggle Mysteries`, which will be listed in order, at the bottom of the event, with back-reference links to the footnote, and text footnote labels appended
+- **Wikilinks:** `[[NIP-54]]` will render as a hyperlink and goes to [NIP-54](https://next-alexandria.gitcitadel.eu/publication?d=nip-54) (Will later go to our new disambiguation page.)
## Publications and Wikis
@@ -51,4 +51,5 @@ For more information on AsciiDoc, see the [AsciiDoc documentation](https://ascii
**Note:**
- The markdown parsers are primarily used for comments, issues, and other user-generated content.
- Publications and wikis are rendered using AsciiDoc for maximum expressiveness and compatibility.
-- All URLs are sanitized to remove tracking parameters, and YouTube links are presented in a clean, privacy-friendly format.
\ No newline at end of file
+- All URLs are sanitized to remove tracking parameters, and YouTube links are presented in a clean, privacy-friendly format.
+- [Here is a test markup file](/tests/integration/markupTestfile.md) that you can use to test out the parser and see how things should be formatted.
\ No newline at end of file
diff --git a/src/lib/utils/markup/basicMarkupParser.ts b/src/lib/utils/markup/basicMarkupParser.ts
index 781ed23..cbd843b 100644
--- a/src/lib/utils/markup/basicMarkupParser.ts
+++ b/src/lib/utils/markup/basicMarkupParser.ts
@@ -142,9 +142,9 @@ function replaceWikilinks(text: string): string {
return text.replace(/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g, (_match, target, label) => {
const normalized = normalizeDTag(target.trim());
const display = (label || target).trim();
- const url = `https://next-alexandria.gitcitadel.eu/publication?d=${normalized}`;
+ const url = `./publication?d=${normalized}`;
// Output as a clickable with the [[display]] format and matching link colors
- return `[[${display}]]`;
+ return `${display}`;
});
}
diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte
index a152bff..13b6899 100644
--- a/src/routes/contact/+page.svelte
+++ b/src/routes/contact/+page.svelte
@@ -280,7 +280,7 @@
- You can contact us on Nostr npub1s3h…75wz or you can view submitted issues on the Alexandria repo page.
+ You can contact us on Nostr GitCitadel or you can view submitted issues on the Alexandria repo page.
Submit an issue
@@ -329,7 +329,7 @@