Commits at 52dd247609b4dca6ed00afbb5526e7eaefb35288
a10dc8fcSyntax highlighting feature
Though styles are almost nothing. It's too early to add styles.
I considered - actually researched almost a day - tree-sitter for highlighting.
However, the state of the ecosystem is not ready to use for web/WASM environment.
* Some parsers use unexported C-API, which causes runtime panic.
* Markdown parser requires block parsing -> inline parsing per blocks.
* Generated parsers are large in general (e.g. TSX = ~3MB in WASM,
~5MB in `Uint8Array(JSON.parse("[0,...]"))` form).
* Parser alone is barely usable: query, especially tailor made highlight query is
needed for **each parsers**. (most of the parser I saw have "highlight.scm" but
it seems to be for reference)
While refractor requires additional tree-traversal for removing too generic
classes, I believe this is way too efficient and reliable compare to tree-sitter
(and its ecosystem) in its current state.
Shota FUJI
authored at
Shota FUJI
comitted at
b1d1fb2eDo not use filesystem timestamp for docs build
Git discards timestamps.
Shota FUJI
authored at
Shota FUJI
comitted at
10320234Fix build fails on frontmatter on but some documents have no frontmatter
Shota FUJI
authored at
Shota FUJI
comitted at
bff3e60cCreation and update timestamp in metadata
This is essential for me. This also enables user to sort documents based on
update or creation date.
Shota FUJI
authored at
Shota FUJI
comitted at
549a169cRendering callouts
Renders ugly. Styles are global. No colors. Links inside are not resolved.
However, this satisfies minimum required functionality and semantically
correct (except the broken links).
This still needs work so title part will be represented as a Mdast children
and later Mdast utility can work on that (I mean, link resolver).
I'll add appropriate styles at final styling process.
Shota FUJI
authored at
Shota FUJI
comitted at
be56e8d4OFM Callout extension Mdast utility
This is implemented as a transformer. I tried to implemented from syntax parser
but micromark's documentation on document parser (or, say, architecture as a whole)
is not great and unable to do that. Majority of the time I wasted was battling against
default parsers and undocumented APIs.
Surprisingly, this transformer approach is pretty robust. Phrasing parsing is already
done at the blockquote parser so I just needed split & replace. Easy.
Shota FUJI
authored at
Shota FUJI
comitted at
2eff673bFix TreeBuilder can't resolve assets without file extension
Shota FUJI
authored at
Shota FUJI
comitted at
55489dccMove ignore functionality to independent one
The problem is, "shortest path when possible" resolution
looks up for the ignored directories and files even if
it was ignored at the scan phase.
Shota FUJI
authored at
Shota FUJI
comitted at
4ad002ffUse separate GitHub Actions cache for each workflow
Deno does not download every modules listed in the lockfile.
Instead, it lazily downloads imported file: thus, the contents of
`$DENO_DIR` depends on "what module Deno loaded". Since workflows
run different entrypoints (deploy=docs/build.ts, test=test files),
only one of workflow benefit from cache and others could face a
lot of cache misses.
Shota FUJI
authored at
Shota FUJI
comitted at
4892e170Ignore CI cache directory from Deno checks
Otherwise a bunch of errors appears.
Shota FUJI
authored at
Shota FUJI
comitted at
13fc4272GitHub Actions for code validity
In case when I forgot to run these command on my machine.
Shota FUJI
authored at
Shota FUJI
comitted at
4ea55fd1Cache Deno intermediate files on GitHub Actions
In order to reduce build time.
Shota FUJI
authored at
Shota FUJI
comitted at
d33714c6"Shortest path when possible" link resolution
This is essential as Obsidian made it default (really, wtf?)
Shota FUJI
authored at
Shota FUJI
comitted at
87f677a9Remove garbage file
I guess Obsidian does not have proper file system access restriction / validation.
Shota FUJI
authored at
Shota FUJI
comitted at
5fa6adc7Support for absolute path resolution and extensions-less path
Even though Obsidian docs says it's not for Markdown link, it uses
the non-relative / extension-less path such as when it auto-update
paths on file move/rename.
Shota FUJI
authored at
Shota FUJI
comitted at
70fda17cFix document path ignores metadata name returned by Content Parser
Shota FUJI
authored at
Shota FUJI
comitted at
2356b4e7Add license information on docs copyright footer
Without the license attribution, strictly speaking, anyone clicked "Fork" on GitHub
and pushed their own patch to master branch, they violates the CC-BY-4.0 license.
Shota FUJI
authored at
Shota FUJI
comitted at