Commits at f81aeb55ade2260e11d9b6d82641392aea70e6e4
a9bf5e66File embed for JSONCanvas
Refactor for HTML rendering is to reduce unnecessary Mdast->Hast conversion.
Shota FUJI
authored at
Shota FUJI
comitted at
a1bcc49aAggregate mdast fromMarkdown extensions into one
Same as micromark's one.
Shota FUJI
authored at
Shota FUJI
comitted at
cbb403ecMake OFM image size parser to Mdast extension
I noticed an extension can be just a transform function when implementing OFM callout extension.
This is good.
Shota FUJI
authored at
Shota FUJI
comitted at
195452c5Aggregate micromark extensions into one
For usability. It's good abstraction IMO.
Inclusion of gfm is actually valid, as OFM includes subset of GFM.
Shota FUJI
authored at
Shota FUJI
comitted at
627b53c5Add comments on Safari's SVG rendering bug
I tried to apply workaround. It surely fixed position problem; however, it completely
ruined the rendering of non-overflowing elements. Safari is the new IE, yes.
If I could solve scroll (layout) problem on the canvas rendering, I'll switch to
SVG + HTML approach. It's ridiculous to abandon the most correct and semantic document
due to one problematic broken browser, but this is what we got. Cult made of normies and
fanboys encouraging unhealthy and uncompetetive web. At least Chrome does not have
this lot of rendering/compositing bugs.
Shota FUJI
authored at
Shota FUJI
comitted at
78f20ea9Implement complete JSONCanvas renderer
Even though files are 404 and Safari goes wild, basic rendering feature is done.
Shota FUJI
authored at
Shota FUJI
comitted at
4be26f81Move JSONCanvas layout related functions out to separate file
I wanted to add sub-components, but the file was large.
Shota FUJI
authored at
Shota FUJI
comitted at
772a7246Text node rendering for JSONCanvas
It's easier than I thought.
Shota FUJI
authored at
Shota FUJI
comitted at
984c50deOFM Comment extension (parser/Hast converter)
This is not much useful, though.
Shota FUJI
authored at
Shota FUJI
comitted at
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