Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sup2point0 committed Jan 28, 2025
1 parent f7db33b commit 09af3e6
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 11 deletions.
40 changes: 38 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
# Squarkdown Docs
<!-- #SQUARK live!
| dest = docs
-->

> [!Note]
> Under construction!
Welcome to the *Squarkdown* docs, where you can find all you need to know about Squarkdown!

```js
/**
* A $state() rune persisted to `localStorage`.
*/
export class PersistedState<T>
{
#key: string;
value = $state<T>() as T;

get key() {
return this.#key;
}

constructor(key: string, init: T)
{
this.#key = key ?? "";
this.value = init;

if (browser) {
let data = localStorage.getItem(this.key);
if (data) {
this.value = JSON.parse(data);
}
}

$effect.root(() => {
$effect(() => {
localStorage?.setItem(this.key, JSON.stringify(this.value));
})
});
}
}
```
2 changes: 1 addition & 1 deletion docs/cleanup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cleanup
<!-- #SQUARK live!
<!-- #SQUARK dead!
| dest = squarkup/cleanup
-->

Expand Down
2 changes: 1 addition & 1 deletion docs/file-config.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuring Squarkup for a File
<!-- #SQUARK live!
<!-- #SQUARK dead!
| dest = squarkup/file
| desc = Flags and fields for configuring how a Markdown file is processed by Squarkdown
| shard = file / squark / charm
Expand Down
6 changes: 3 additions & 3 deletions docs/further-walkthrough.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Making Full Use of Squarkdown
<!-- #SQUARK live!
| dest = further-walkthrough
| dest = docs/further-walkthrough
| desc = A further walkthrough of additional Squarkdown features
| capt = A Further Walkthrough of Additional Squarkdown Features
-->

Squarkdown has grown much beyond moving Markdown files around into a full-blown content deployment framework.[^ framework] There are many other features that can help with automating the process of building up a website, which can be enabled at an instant.
Squarkdown has grown much beyond moving Markdown files around into a full-blown content deployment framework.[^framework] There are many other features that can help with automating the process of building up a website, which can be enabled at an instant.

[^framework]: Okay, ‘framework’ is a bit of a stretch.

Expand Down Expand Up @@ -73,7 +73,7 @@ project/
README.md
```

Getting SvelteKit to look there for assets is gonna be more than a little fiddly (maybe ever impossible), so Squarkdown can save you the pain and just copy all asset files from `assets/` to 'site/static/`.
Getting SvelteKit to look there for assets is gonna be more than a little fiddly (maybe ever impossible), so Squarkdown can save you the pain and just copy all asset files from `assets/` to `site/static/`.

> Now of course, this essentially duplicates the files locally, which can waste a lot of storage space (and assets tend to be the largest part of a repo too) – there’s not really a permanent solution to this, but if you're not working on the site, you can clear the `static/` folder, since the files will be regenerated next time anyway.
Expand Down
4 changes: 4 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Squarkdown Terminology
<!-- #SQUARK dead!
| dest =
| index =
-->

***Squarkdown*** (short for *Stranger Quarkdown*) refers to both this project, and the Markdown syntax that enables special processing.

Expand Down
4 changes: 2 additions & 2 deletions docs/squarkup-config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuring Squarkup for a Repository
<!-- #SQUARK live!
| dest = squarkup/config
<!-- #SQUARK dead!
| dest = docs/squarkup/config
| desc =
-->

Expand Down
2 changes: 1 addition & 1 deletion docs/walkthrough.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Using Squarkdown in a SvelteKit project
<!-- #SQUARK live!
<!-- #SQUARK dead!
| dest = walkthrough
| capt = A guided walkthrough on how to use Squarkdown in a SvelteKit project
-->
Expand Down
2 changes: 1 addition & 1 deletion edu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# *decoded*: Stranger Quarkdown
<!-- #SQUARK live!
| dest = decoded
| dest = info/decoded
| title = decoded: Stranger Quarkdown
| desc = Lessons learnt from development
-->
Expand Down
1 change: 1 addition & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# output
build/
static/
(docs)/

# internal
node_modules/
Expand Down

0 comments on commit 09af3e6

Please sign in to comment.