Skip to content

Commit 1823eef

Browse files
committed
Update documentation
1 parent 1d5d7df commit 1823eef

4 files changed

Lines changed: 200 additions & 0 deletions

File tree

README_GITHUB_PAGES.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# GitHub Pages Setup
2+
3+
## Overview
4+
5+
The static site (generated from `docs-src/`) is deployed to GitHub Pages via the CI workflow on every push to `main`.
6+
7+
## Custom Domain
8+
9+
A custom domain is configured at the appsoftwareltd organisation level:
10+
11+
1. **GitHub domain verification** — completed the DNS verification challenge in GitHub organisation settings before adding the custom domain.
12+
2. **DNS record** — added a `CNAME` record (non-proxied / DNS only) pointing the subdomain to `appsoftwareltd.github.io`.
13+
3. **HTTPS** — once GitHub verified the DNS record, HTTPS enforcement was enabled in repo Settings → Pages.
14+
15+
## Notes
16+
17+
- The `docs/` folder is wiped and regenerated on each CI run, so a `CNAME` file must be written by the CI workflow after conversion if a custom domain is used (see `build-docs` job in `.github/workflows/ci.yml`).
18+
- Using `<user/org>.github.io` is an option for repositories without custom domains, or under an org that has a custom domain configured at the org level — in which case GitHub applies the org domain automatically.
19+
- The GitHub Pages source is set to **GitHub Actions** in repo Settings → Pages.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Publishing a Static Site
2+
3+
AS Notes includes a built-in HTML conversion tool that turns your markdown notes into a static website. You can use this to publish your knowledge base as a standalone site or deploy it to GitHub Pages.
4+
5+
## How It Works
6+
7+
The `html-conversion` package scans a folder of markdown files and converts them to HTML. [[Wikilinks]] between pages are automatically resolved to the correct HTML links.
8+
9+
## Prerequisites
10+
11+
- [Node.js](https://nodejs.org) 20 or later
12+
- Your notes in a folder of `.md` files
13+
14+
## Standalone Usage
15+
16+
### 1. Install the converter
17+
18+
Clone or download the `html-conversion` package from the AS Notes repository, then install dependencies:
19+
20+
```bash
21+
cd html-conversion
22+
npm install
23+
npm run build
24+
```
25+
26+
### 2. Convert your notes
27+
28+
```bash
29+
npm run convert -- --input /path/to/your/notes --output /path/to/output
30+
```
31+
32+
The output folder will be wiped and regenerated on each run. Point any static file server at the output folder to preview the result.
33+
34+
### Local preview
35+
36+
You can serve the output locally using any static file server, for example:
37+
38+
```bash
39+
npx serve /path/to/output
40+
```
41+
42+
## Publishing to GitHub Pages
43+
44+
### 1. Add a CI workflow
45+
46+
Create `.github/workflows/pages.yml` in your repository:
47+
48+
```yaml
49+
name: Deploy to GitHub Pages
50+
51+
on:
52+
push:
53+
branches: [main]
54+
55+
jobs:
56+
deploy:
57+
runs-on: ubuntu-latest
58+
permissions:
59+
pages: write
60+
id-token: write
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-node@v4
67+
with:
68+
node-version: '20'
69+
- run: npm ci
70+
working-directory: html-conversion
71+
- run: npm run build
72+
working-directory: html-conversion
73+
- run: npm run convert -- --input ../notes --output ../site
74+
working-directory: html-conversion
75+
- uses: actions/upload-pages-artifact@v3
76+
with:
77+
path: site
78+
- id: deployment
79+
uses: actions/deploy-pages@v4
80+
```
81+
82+
Adjust the `--input` path to match the folder containing your notes.
83+
84+
### 2. Enable GitHub Pages
85+
86+
In your repository go to **Settings → Pages** and set the source to **GitHub Actions**.
87+
88+
### Custom Domain
89+
90+
If you want to serve from a custom domain (e.g. `docs.example.com`):
91+
92+
1. Add a DNS `CNAME` record (non-proxied if using Cloudflare):
93+
```
94+
docs.example.com CNAME <your-github-username>.github.io
95+
```
96+
2. Add a step to your workflow to write the `CNAME` file into the output folder (the converter wipes the output on each run, so this must be done after conversion):
97+
```yaml
98+
- run: echo "docs.example.com" > ../site/CNAME
99+
working-directory: html-conversion
100+
```
101+
3. Enter the domain in **Settings → Pages → Custom domain** and wait for DNS verification.
102+
4. Once verified, enable **Enforce HTTPS**.
103+
104+
> **Note:** If your repository belongs to a GitHub organisation that has a custom domain configured at the org level, GitHub will apply that domain automatically to all repos. In that case you either configure a per-repo custom domain as above, or complete the org-level DNS setup to make the org domain work.

docs-src/pages/Wikilinks.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Wikilinks
2+
3+
Wikilinks are a way to link between notes using a simple double-bracket syntax. They are the core navigation primitive in AS Notes, popularised by tools like Roam Research, Logseq, and Obsidian.
4+
5+
## Basic Syntax
6+
7+
Wrap any page name in double square brackets to create a link:
8+
9+
```
10+
[[Page Name]]
11+
```
12+
13+
AS Notes resolves the link to the matching file anywhere in your workspace — you do not need to specify a folder path or file extension. If a file called `Page Name.md` exists anywhere in the workspace, the link will navigate to it.
14+
15+
## How Resolution Works
16+
17+
Links are resolved by page name only. Given a workspace with these files:
18+
19+
```
20+
notes/
21+
Project Ideas.md
22+
journal/
23+
2026_03_07.md
24+
```
25+
26+
The link `[[Project Ideas]]` resolves correctly regardless of which file it appears in or how deeply nested the files are.
27+
28+
## Nested Wikilinks
29+
30+
AS Notes supports wikilinks nested inside other wikilinks. This allows page names to themselves reference other pages, making it possible to build composite page names that remain fully navigable.
31+
32+
### Single nesting
33+
34+
The outer link's page name includes the inner link text (brackets and all):
35+
36+
```
37+
[[[[AS Notes]] Features]]
38+
```
39+
40+
This creates two links:
41+
- `[[[[AS Notes]] Features]]` — links to a page named `[[AS Notes]] Features`
42+
- `[[AS Notes]]` — links to a page named `AS Notes`
43+
44+
### Double nesting
45+
46+
```
47+
[[[[[[Deep]] Nested]] Page]]
48+
```
49+
50+
This resolves three links:
51+
- `[[[[[[Deep]] Nested]] Page]]` — links to `[[[[Deep]] Nested]] Page`
52+
- `[[[[Deep]] Nested]]` — links to `[[Deep]] Nested`
53+
- `[[Deep]]` — links to `Deep`
54+
55+
### Practical use
56+
57+
Nested wikilinks are useful when you have a topic hierarchy where sub-pages share their parent's name. For example, if you have a page called `AS Notes` and a page called `[[AS Notes]] Changelog`, you can write:
58+
59+
```
60+
See the [[[[AS Notes]] Changelog]] for recent changes.
61+
```
62+
63+
Both the parent and the composite page name remain independently navigable.
64+
65+
## Backlinks
66+
67+
AS Notes maintains a backlink index as you write. The **Backlinks Panel** (`Ctrl+Alt+B` / `Cmd+Alt+B`) shows every note that links to the currently open page, including links via nested wikilinks.
68+
69+
## Rename Tracking
70+
71+
When you rename a file, AS Notes automatically updates all wikilinks that reference that file across your entire workspace — including nested wikilinks where the renamed page appears as an inner component.
72+
73+
## Missing Links
74+
75+
A wikilink to a page that does not yet exist is still valid syntax. AS Notes will highlight it differently and you can navigate to it to create the page. This makes it easy to link-first and write later.

docs-src/pages/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This is the documentation for AS Notes. This documentation was written using AS
44

55
To start, why not read all about [[Wikilinks]].
66

7+
Want to publish your own notes as a website? See [[Publishing a Static Site]].
8+
79
What if we wrote a page about [[Nested [[Wikilinks]]]]?
810

911
What if we wrote a page about [[Missing [[Wikilinks]]]]?

0 commit comments

Comments
 (0)