macana

Static site generator for Obsidian Vault

Commits at c8f5fb265e0741bf2d247855d1aca11939136074

  1. a1bcc49a Aggregate mdast fromMarkdown extensions into one Same as micromark's one. Shota FUJI authored at Shota FUJI comitted at
  2. cbb403ec Make 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
  3. 195452c5 Aggregate 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
  4. 627b53c5 Add 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
  5. 78f20ea9 Implement 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
  6. 4be26f81 Move 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
  7. 772a7246 Text node rendering for JSONCanvas It's easier than I thought. Shota FUJI authored at Shota FUJI comitted at
  8. 4d8d70f7 Fix typo in comments Shota FUJI authored at Shota FUJI comitted at
  9. 984c50de OFM Comment extension (parser/Hast converter) This is not much useful, though. Shota FUJI authored at Shota FUJI comitted at
  10. a10dc8fc Syntax 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
  11. b1d1fb2e Do not use filesystem timestamp for docs build Git discards timestamps. Shota FUJI authored at Shota FUJI comitted at
  12. 10320234 Fix build fails on frontmatter on but some documents have no frontmatter Shota FUJI authored at Shota FUJI comitted at
  13. bff3e60c Creation 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
  14. 5f3292f9 Fix links in callout title are not resolved Shota FUJI authored at Shota FUJI comitted at
  15. 549a169c Rendering 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
  16. be56e8d4 OFM 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
  17. 38793562 Update docs related to Wikilinks Shota FUJI authored at Shota FUJI comitted at
  18. 12468eea Size attribute for wikilink embeds Shota FUJI authored at Shota FUJI comitted at
  19. 2eff673b Fix TreeBuilder can't resolve assets without file extension Shota FUJI authored at Shota FUJI comitted at
  20. 55489dcc Move 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
  21. be49ad90 Fix test description Artifact caused by copy and paste. Shota FUJI authored at Shota FUJI comitted at
  22. 4e25bdfe Mdast utilities for Wikilink extension Shota FUJI authored at Shota FUJI comitted at
  23. 4ad002ff Use 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
  24. 4892e170 Ignore CI cache directory from Deno checks Otherwise a bunch of errors appears. Shota FUJI authored at Shota FUJI comitted at
  25. 13fc4272 GitHub Actions for code validity In case when I forgot to run these command on my machine. Shota FUJI authored at Shota FUJI comitted at
  26. 4ea55fd1 Cache Deno intermediate files on GitHub Actions In order to reduce build time. Shota FUJI authored at Shota FUJI comitted at
  27. ff8c292b Setup logging Shota FUJI authored at Shota FUJI comitted at
  28. b933e523 Wikilink OFM syntax parser Shota FUJI authored at Shota FUJI comitted at
  29. a45d481a Fix Promise based path resolution fails Shota FUJI authored at Shota FUJI comitted at
  30. 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