macana

Static site generator for Obsidian Vault

Commits at v0.1.2

  1. bc8e53d5 v0.1.2 Shota FUJI authored at Shota FUJI comitted at
  2. a389bf96 Update Roadmap Shota FUJI authored at Shota FUJI comitted at
  3. b245e8af Base URL option This is essential for implementing OpenGraph support and 404 pages. Shota FUJI authored at Shota FUJI comitted at
  4. 715cf0de Docs for YAML frontmatter fields I myself searched codebase for which field to use. Shota FUJI authored at Shota FUJI comitted at
  5. ceda7cb0 Resolve inner page anchor hash link (#foo) Shota FUJI authored at Shota FUJI comitted at
  6. e4a0d0fd Mark default document in YAML frontmatter Shota FUJI authored at Shota FUJI comitted at
  7. c915c6ce Update Roadmap Shota FUJI authored at Shota FUJI comitted at
  8. 28409460 CLI usage document Naming convention is nearly non-existent and there is a bunch of missing options such as default document path and ignoring dotfiles, but at least this is better than nothing. Shota FUJI authored at Shota FUJI comitted at
  9. 03fa7ba4 Update Roadmap Shota FUJI authored at Shota FUJI comitted at
  10. b2faf5a7 CLI I thought library-first design would be great but turned out it's difficult and time-consuming to tidy APIs and documents. CLI-first would be far more simple and also user-friendly. Shota FUJI authored at Shota FUJI comitted at
  11. a51a05d7 v0.1.1 Shota FUJI authored at Shota FUJI comitted at
  12. c6eae1bc Update Roadmap version numbers No breaking changes since v0.1.0. Shota FUJI authored at Shota FUJI comitted at
  13. d61de598 Client-side JavaScript to mark current ToC entry It's useful, actually. While some people call it eye-candy or something, I personally find it an essential for text-heavy documents. Shota FUJI authored at Shota FUJI comitted at
  14. 8a6b9a37 Minify and Highlight client-side JavaScript code The size of JSONCanvas related code became unexpectedly big. The overall minification shrinks around 4kB (28.17kB -> 24.47kB). This `javascript` tagged template literal function also enables my Neovim tree-sitter to highlight the template string as a JavaScript code. Shota FUJI authored at Shota FUJI comitted at
  15. a1ae91e6 JSONCanvas viewport controls UI Shota FUJI authored at Shota FUJI comitted at
  16. d4b1f851 Keyboard navigation for JSONCanvas documents Shota FUJI authored at Shota FUJI comitted at
  17. f9ab2af8 Hide summary marker on Safari Shota FUJI authored at Shota FUJI comitted at
  18. 09fc08b2 JSONCanvas gestures for touch inputs Shota FUJI authored at Shota FUJI comitted at
  19. 8b30cba6 JSONCanvas gestures for pointer devices Shota FUJI authored at Shota FUJI comitted at
  20. 415efba0 Delete unused views (embeds) Since I have changed document embeds to directly embed the HTML, these embeds HTML are no longer used. Shota FUJI authored at Shota FUJI comitted at
  21. 85264c80 Render JSONCanvas in HTML While SVG renderer works well on sane browsers, it does not on Safari. It's looong ignored `<foreignObject>` overflow bug ruins even fairly straightforward usages. Shota FUJI authored at Shota FUJI comitted at
  22. a935aa6b Update Roadmap "Resolve document internal wikilink" was duplicated entry. Shota FUJI authored at Shota FUJI comitted at
  23. f39cd4b4 Client-side script to close menu on navigation (back/forward) On menu-layout, navigating back/forward is confusing due to menu appears after the navigation. Shota FUJI authored at Shota FUJI comitted at
  24. 76923e83 Minify CSS Before: raw=16kB, gzip=3.63kB After: raw=12.44kB, gzip=3.27kB Added build time (Mac mini M1): 15ms~25ms To be honest, I don't think this compression result is not worth the added build time. However, the reduced 3.5kB could reduce consuming memory and CPU times... few micro seconds? I commit this since the journey to find a CSS minify library that was compatible with Deno is extremely tiresome... * `cssnano` imports `caniuse` even though related optimizations are disabled. It statically loads the module hence the access to `<CWD>` (and probably more places like `~/.config` idk), which requires completely unnecessary broad permissions. * `esbuild` is simple and great tool, but WASM is second-class citizen in Deno: requires `--allow-net=deno.land` (or `esm.sh`) or `--allow-read=<vendored path>`. One can embed WASM binary as a base64 or `JSON.parse("Uint8Array")`, but WASM binary of ESBuild weighs 30MB. I tried to open the generated file using the latter method and my nvim froze for minutes, which I had to `kill`. * `lightningcss` looks great, but this is WASM too and weighs 10MB. Better than ESBuild though. * `clean-css` declares itself as in maintenance mode. I tested it but it loads environment variables at init time and access to `cwd`. In the end, CSSO is the only ESM compatible library that works on web platform. Shota FUJI authored at Shota FUJI comitted at
  25. 02d08425 Update Roadmap Shota FUJI authored at Shota FUJI comitted at
  26. 958d71d0 Remember document tree's open state for browsing session This has been so inconvenient. Shota FUJI authored at Shota FUJI comitted at
  27. bf18cea2 Setup GitHub Issue forms I'm not willing to be bothered by low-effort "issues". Shota FUJI authored at Shota FUJI comitted at
  28. b74d7aa4 Usage document Shota FUJI authored at Shota FUJI comitted at
  29. d7d072f4 Add jsdoc comments for public API Shota FUJI authored at Shota FUJI comitted at
  30. c6e88fe1 Fix build fails when document contains lowercase link references For unknown reasons, mdast-util-to-hast holds its reference ID in uppercase. Shota FUJI authored at Shota FUJI comitted at
  31. a801fbb7 Fix document tree UI shows every documents with same name being current Shota FUJI authored at Shota FUJI comitted at
  32. 31c65d56 Document embedding Shota FUJI authored at Shota FUJI comitted at
  33. c2a31c98 Fix toc can't go more than 2 level deep Shota FUJI authored at Shota FUJI comitted at
  34. c2a71556 Add more margin to headigns I felt those are too dense. Shota FUJI authored at Shota FUJI comitted at
  35. 40f7d621 Note for orphaned block identifier Are they correctly parsing Markdown?? Shota FUJI authored at Shota FUJI comitted at
  36. 4544b238 Update Roadmap Shota FUJI authored at Shota FUJI comitted at
  37. c8f5fb26 Hoist block identifer to the parent's ID If a paragraph is more than one line, UA scrolls to the bottommost line. This hides the rest of lines: which is not a user intended. Shota FUJI authored at Shota FUJI comitted at
  38. 9a0aa41c Update Roadmap Shota FUJI authored at Shota FUJI comitted at
  39. 15a35d54 Fix critical level log message and payloads are dimmed Shota FUJI authored at Shota FUJI comitted at
  40. 7e26e612 Fix block identifier cannot be detected when it's the only content on the last line Shota FUJI authored at Shota FUJI comitted at
  41. 7b3eb4cd Support link to block identifier Shota FUJI authored at Shota FUJI comitted at
  42. af93e68c OFM Block Identifier extension Shota FUJI authored at Shota FUJI comitted at
  43. b505eced Wikilink hash resolver for headings Shota FUJI authored at Shota FUJI comitted at
  44. 242529dc Add logging options for docs build script Sometime I need full debug log, sometime I only need build time stats. Or I could just want to know whether the build succeeds. Shota FUJI authored at Shota FUJI comitted at
  45. b29abcb1 Disable log color based on whether stdout is tty It was mostly for jq. But "disabling colors because output is JSON" is completely incorrect: it's assumption based on author's usage, not technical constraints. I myself too sometime want to see colored JSON output for debugging. Shota FUJI authored at Shota FUJI comitted at
  46. 52dd2476 Update roadmap I remembered the missing tasks. Shota FUJI authored at Shota FUJI comitted at
  47. 3edb4ba7 Align directory and document (tree UI) Due to documents not having padding at left, I sometime confuse that the document is at the same level to the parent directory, like this: ``` # actual + dir1 + dir2 + file1 + file2 # confused + dir1 + dir2 + file1 + file2 ``` Shota FUJI authored at Shota FUJI comitted at
  48. 1cc8ae3a Replace "Writing Samples" with "Features" "Features" is more approachable and more common. Shota FUJI authored at Shota FUJI comitted at
  49. f21848e2 Make Roadmap more concrete Shota FUJI authored at Shota FUJI comitted at
  50. 1c5f9c6d Place `<img>` as block element This is as same as Obsidian renders. Also, from my private testing, inline images work horribly. This would work "okay" in most cases. Shota FUJI authored at Shota FUJI comitted at
  51. bf4a2248 Fix document tree uses actual directory name, not metadata name The `currentPath` is from `Document.path`, which consists of metadata names. Shota FUJI authored at Shota FUJI comitted at
  52. 8bc70dc6 Highlight current page in document tree I myself sometimes confused like "wait, where am I?". I could have add more eye-candy, but this is enough. Shota FUJI authored at Shota FUJI comitted at
  53. 12634f1f Align vertical line to chevron on document directory Shota FUJI authored at Shota FUJI comitted at
  54. 47b29d02 Remove unnecessary line-height from inline elements I'm not sure the intent for those (yes, I'm the who wrote those). `<sup>` (superscript) and `<sub>` (subscript) still have `line-height`. Without this, they somehow dramatically expand the line and break the vertical rhythm. Shota FUJI authored at Shota FUJI comitted at
  55. 632084fd Delete unused style Probably related to my old blog styles. Macana does not contain `<button>`, and even if it does, styling should be done via class. Shota FUJI authored at Shota FUJI comitted at
  56. 04687860 Do not set vertical rhythm on body This has been causing a lot of problems. The most important thing here is vertical rhythm is for (usually long) textual content. In the context of documentation/blog website, contents inside `<main>`. Other parts, such as navigation and table of contents, are not suitable for vertical rhythm. Aesthetics and/or space effeciency is more important than the rhythm. Shota FUJI authored at Shota FUJI comitted at
  57. 69036d6f Dev docs for profiling I tried to optimize build process so the docs can be built under 150ms. Currently, on my M1 Mac mini, it takes 180ms~210ms. I think it's too much for just 16 documents. I'm not good at profiling or optimization or whatever. I suck at looking at profiling result. What the fuck is bottom-up? But I have to profile in order to optimize further more. Luckily, Deno/V8's profiler is easy to use and call tree representation is intuitive even for beginers like me. Unfortunately, most of the process time is from third-party libraries. The most time consuming one was refractor (syntax highlighting) and the second was hast-util-to-html or mdast-from-markdown (or inner micromark). All of those are reasonable: refractor's "all" entrypoint (I willingfully choose this) contains every language syntax, thus it takes a lot of time loading and registering syntaxes. Seriealizing HTML and parsing Markdown are, well, time-consuming considering they are written in JavaScript, which is difficult to write performant string ops (esp. spatial efficiency). In its current form, the most impactful performance optimization I can think of is not emitting embed page until required. In order to do that, I have to make significant changes to how page builder handles build queue (or make one). While I found out there are no low-haning fruit for temporal optimization, I believe an experience and knowledge I gained from this should be noted and shared anyhow. So here it is. Shota FUJI authored at Shota FUJI comitted at
  58. 8243be61 Layout properly The whole styles are copy and pasted from my old blog. This patch tidies things up. There still needs some maintenance, such as color tokens and line-height, I think this is okay-ish to commit. Shota FUJI authored at Shota FUJI comitted at
  59. c1e620ab Remove debug texts from test document Shota FUJI authored at Shota FUJI comitted at
  60. d4516531 Fix long external link wraps unnaturally or overflows the page horizontally Shota FUJI authored at Shota FUJI comitted at
  61. d83004e3 Style blockquote Shota FUJI authored at Shota FUJI comitted at
  62. fbdbe5a0 Use helper for HTML class generation instead of simple `const enum` Manual naming using `const enum` works fine. It's definitely better than using bare string literals. However it's error-prone and difficult to maintain short class names: even if I take care on unique prefix constraint, class names would collide inside a namespace if the file have many class names. This problem became noticable when I authored the `from_mdast/code.tsx`, which defines every class names for Prism tokens. This patch frees mental overhead of carefully defining actuall class names, and (hopefully) helps compression algorithms (e.g. gzip) to work better because of repeated patterns after prefixes. Shota FUJI authored at Shota FUJI comitted at
  63. 48b04db3 Delete unused imports I thought it errors on `check` command since LS shows warning on unused imports. Shota FUJI authored at Shota FUJI comitted at
  64. f81aeb55 Do not fade-out document-tree and toc on non-hover environment This effect only works when a user's primary input device is hover-capable device (e.g. mouse, pen) or focus-navigatable device (e.g. keyboard). If a user is using neither of those, the document-tree and toc UI is always dimmed. Or worse, a user may think it as some kind of broken CSS. In order to maintain legibility for non-hover environments (mostly touch-only environments), I restricted the rule to when the primary input device is hover-capable. This prevents the effect from running on non-hover but keyboard navigatable environemts, such as using keyboard on touch-only device. However, as the effect is just to help users for focusing a main content, legibility wins over it. Shota FUJI authored at Shota FUJI comitted at
  65. 49519dad Improve create/update datetime formatting, more concise and consistent This patch reduces clutters in a datetime string and make the string more consistent to other parts of the document. The first and most significant problem was the datetime string is formatted using UA's locale. The UA's locale could be different to a document's locale. This results in inconsistent text formatting: for example, when a user viewing the page with `lang="ja"` but UA uses "en-US", chunk of "en-US" text appears in "ja" document as a result. The second problem is the datetime string is verbose. I can't imagine any usecase where seconds part benefits a user (viewer). The final problem is ugliness of the datetime string in noscript env. It's ISO-8601 string because of timezone. I remembered that `toLocaleString` (`Intl.DateTimeFormat`) can display timezone string, so here it is. Even though the metadata is not properly styled and is still ugly, I'm satisfied how the result looks good without compromising semantic markup and/or build process. Shota FUJI authored at Shota FUJI comitted at
  66. 35ce077d Use page title as a label text for Obsidian's formatting pages With external link icons, they are no longer confusing. This form also looks far better than bare URL. Shota FUJI authored at Shota FUJI comitted at
  67. 8526d465 Style anchors using class selector, rather than type selector Type selector, which selects all tags/elements that matches, often causes unexpected side-effect. For example, if an internal component includes anchor element, the default style for contents also applys to the internal anchor, which is not desirable. Shota FUJI authored at Shota FUJI comitted at
  68. bd077317 Style syntax highlighted code block This patch also removes annoying semi-global style for main contents. Shota FUJI authored at Shota FUJI comitted at
  69. ab50391e Math extension (Obsidian Flavored Markdown) Shota FUJI authored at Shota FUJI comitted at
  70. 53e5cf0e Make embedded document's background transparent (JSONCanvas) File node could have its own color. Shota FUJI authored at Shota FUJI comitted at
  71. 2510eb58 Fix path pointing to one level higher directory Shota FUJI authored at Shota FUJI comitted at
  72. 94b55a12 Use hastscript instead of nano_jsx The first reason for this change is tedious conversion from Markdown to components. Since Hast does not have a concept of "Component", those needs to be converted to custom elements first, then restored by carefully mapping the custom element nodes. During that process, properties are transformed to HTML attributes (e.g. true -> ""). This is very error-prone and exhausting thing to write. The second one is the quality of nano-jsx. The library is, honestly, toy-level. Even though they promote it as "SSR First", HTML seriealization is joke: empty children appears as `children=""`, cannot handle falsy attribute values, renders `true` attribute value as `"true"`, etc... Also, it's TypeScript typing is almost non-existent. Most of the exposed things are typed as `any`. I would not call that a typed library. While hastscript is not perfect either, it's good enough for my HTML generation usecase. It also eliminates Mdast -> Hast -> (JSX runtime) confusing data conversion. I choose not to write wrapper for `<Component/>` usage. It's nice, but not necessary. In fact, normal function call is **far better** than JSX's loose and cryptic typings. The only output changes I observed was "Module" and "Program" in "Architecture.canvas" now overflows (thus broken in Safari). However, it's due to the new more strict CSS. I believe it's improvement, not regression (needs to be fixed the overall JSONCanvas stylings at some point, though). Shota FUJI authored at Shota FUJI comitted at
  73. e635bd88 Style GFM task list extension's output The default output, which mimics GitHub's markup and styles, is horrible. It sets `disabled` attribute that makes the element screen reader unfriendly. Also it does not associate the text to checkbox, which is also screen reader unfriendly. I may revisit styles in the future as the current one is not that pretty... Shota FUJI authored at Shota FUJI comitted at
  74. 419b261c Hide <summary> marker on Webkit Fuck you. Shota FUJI authored at Shota FUJI comitted at
  75. 61f6ac5b Make navigations more subtle when user is not hover/focusing Shota FUJI authored at Shota FUJI comitted at
  76. 316a2b5f Fix ToC is semi-transparent on hover Shota FUJI authored at Shota FUJI comitted at
  77. 73802daf Proper styles for document tree UI Shota FUJI authored at Shota FUJI comitted at
  78. fe773926 Proper style for document title Shota FUJI authored at Shota FUJI comitted at
  79. 49403fee Fix content style having higher priority than component styles I noticed this by seeing non-foldable callout's title being weirdly wrapped. Shota FUJI authored at Shota FUJI comitted at
  80. eb7ac03e Remove unused file Shota FUJI authored at Shota FUJI comitted at
  81. 6c7ccd9e Proper styles for ToC Shota FUJI authored at Shota FUJI comitted at
  82. 4f88c82f Fix TextNode (JSONCanvas) has excessive margin Shota FUJI authored at Shota FUJI comitted at
  83. 9ee3d742 Limit content styles only to body elements Global styles have been a pain point. Shota FUJI authored at Shota FUJI comitted at
  84. 110d8d4e Move Hast related function inside page builder to one place I have been felt those logics are disconnected. Shota FUJI authored at Shota FUJI comitted at
  85. a6c33900 Site name parameter for default page builder Shota FUJI authored at Shota FUJI comitted at
  86. 7c78cb92 Securing iframe embedding This is user's responsibility, but link rot happens. Shota FUJI authored at Shota FUJI comitted at
  87. 6d3a55a2 Use example.com for iframe demonstration Wikipedia is not a great example for embedding. Shota FUJI authored at Shota FUJI comitted at
  88. af930e73 Fix orange being red Shota FUJI authored at Shota FUJI comitted at
  89. 9626d6f3 Fix Canvas having no color other than red and gray Simple typo. Shota FUJI authored at Shota FUJI comitted at
  90. d14df0a6 Proper styles for callout This work is foundation for later styling works. Shota FUJI authored at Shota FUJI comitted at
  91. 5aad74ea Fix callout icon is not visible hast-util-raw seems to lowercases every tagnames. Shota FUJI authored at Shota FUJI comitted at
  92. 432427c4 Fix default opened callout is collapsed hast-util-raw seems to have a bug on attribute handling: it mistake an empty string as an absence of value. Shota FUJI authored at Shota FUJI comitted at
  93. eac79b36 Do not perform actual file write more than once on same file Shota FUJI authored at Shota FUJI comitted at
  94. a9bf5e66 File embed for JSONCanvas Refactor for HTML rendering is to reduce unnecessary Mdast->Hast conversion. Shota FUJI authored at Shota FUJI comitted at
  95. 421500eb Handle HTML Shota FUJI authored at Shota FUJI comitted at
  96. 7e1cacbf Aggregate mdast -> hast handlers into one Shota FUJI authored at Shota FUJI comitted at
  97. a1bcc49a Aggregate mdast fromMarkdown extensions into one Same as micromark's one. Shota FUJI authored at Shota FUJI comitted at
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 772a7246 Text node rendering for JSONCanvas It's easier than I thought. Shota FUJI authored at Shota FUJI comitted at
  104. 4d8d70f7 Fix typo in comments Shota FUJI authored at Shota FUJI comitted at
  105. 984c50de OFM Comment extension (parser/Hast converter) This is not much useful, though. Shota FUJI authored at Shota FUJI comitted at
  106. 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
  107. b1d1fb2e Do not use filesystem timestamp for docs build Git discards timestamps. Shota FUJI authored at Shota FUJI comitted at
  108. 10320234 Fix build fails on frontmatter on but some documents have no frontmatter Shota FUJI authored at Shota FUJI comitted at
  109. 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
  110. 5f3292f9 Fix links in callout title are not resolved Shota FUJI authored at Shota FUJI comitted at
  111. 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
  112. 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
  113. 38793562 Update docs related to Wikilinks Shota FUJI authored at Shota FUJI comitted at
  114. 12468eea Size attribute for wikilink embeds Shota FUJI authored at Shota FUJI comitted at
  115. 2eff673b Fix TreeBuilder can't resolve assets without file extension Shota FUJI authored at Shota FUJI comitted at
  116. 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
  117. be49ad90 Fix test description Artifact caused by copy and paste. Shota FUJI authored at Shota FUJI comitted at
  118. 4e25bdfe Mdast utilities for Wikilink extension Shota FUJI authored at Shota FUJI comitted at
  119. 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
  120. 4892e170 Ignore CI cache directory from Deno checks Otherwise a bunch of errors appears. Shota FUJI authored at Shota FUJI comitted at
  121. 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
  122. 4ea55fd1 Cache Deno intermediate files on GitHub Actions In order to reduce build time. Shota FUJI authored at Shota FUJI comitted at
  123. ff8c292b Setup logging Shota FUJI authored at Shota FUJI comitted at
  124. b933e523 Wikilink OFM syntax parser Shota FUJI authored at Shota FUJI comitted at
  125. a45d481a Fix Promise based path resolution fails Shota FUJI authored at Shota FUJI comitted at
  126. 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
  127. 87f677a9 Remove garbage file I guess Obsidian does not have proper file system access restriction / validation. Shota FUJI authored at Shota FUJI comitted at
  128. 5fa6adc7 Support 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
  129. aded3aa5 Fix YAML frontmatter parser dropping existing metadata Shota FUJI authored at Shota FUJI comitted at
  130. 70fda17c Fix document path ignores metadata name returned by Content Parser Shota FUJI authored at Shota FUJI comitted at
  131. 2356b4e7 Add 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
  132. 9960de32 Internal document link resolution Shota FUJI authored at Shota FUJI comitted at
  133. 98e69711 Delete unused lockfile entries Deno does not delete unused entries. Shota FUJI authored at Shota FUJI comitted at
  134. 06d66add Remove `FileSystemReader.readFile` Less API surface, more consolidated API is better. Shota FUJI authored at Shota FUJI comitted at
  135. 6c4bd037 Removed unused import Shota FUJI authored at Shota FUJI comitted at
  136. e4631a60 Fix asset paths are one depth higher This path resolution things need to be reworked fundamentally. Shota FUJI authored at Shota FUJI comitted at
  137. 0a64c599 Add image size attribute sample on docs It's not a big syntax extension, but it definitely is different to CommonMark (and GFM). Shota FUJI authored at Shota FUJI comitted at
  138. 41e7b19f Make Markdown samples page more user friendly The pages have been test cases. User don't have an idea just by telling "here is GFM samples." Shota FUJI authored at Shota FUJI comitted at
  139. 202533b0 Add source code for the GFM samples Without Markdown source code, people not familier GFM have no clue what those are. Shota FUJI authored at Shota FUJI comitted at
  140. a2d7266a Do not save user provided assets to fixed location User may use those assets in other places. In that case, the build directory ends up containing duplicated asset files. Shota FUJI authored at Shota FUJI comitted at
  141. fa19d6f4 Use ".assets" instead of "assets" The latter would conflict with "Assets". Risk is low, but it would be difficult for user to debug this. Shota FUJI authored at Shota FUJI comitted at
  142. aa50c590 Fix logo.svg being "logo..svg" Shota FUJI authored at Shota FUJI comitted at
  143. 7a1059b0 Remove default shadow from `<img>` It's annoying. Shota FUJI authored at Shota FUJI comitted at
  144. 06de59f1 Resolve image asset file path This mechanism is essential as Macana have separate file I/O. Shota FUJI authored at Shota FUJI comitted at
  145. aa174285 Add "Default Document" feature The primary motivation is to set the link destination for header logo. IMO, websites putting logo on the sticky header or appbar without making it a link to the top/home page is EVIL. This also improved usability by enabling generation of topmost `index.html`, where user would land when they directly put domain name on browser address bar. This can be polished more, such as "specify default document under this directory", but I'm satisfied with the current implementation. It's enough. Shota FUJI authored at Shota FUJI comitted at
  146. 4ada2b92 Image size annotation Markdown extension from Obsidian Flavored Markdown Shota FUJI authored at Shota FUJI comitted at
  147. 44036205 Website logo on header This isn't just an eye candy: similar looking websites need each logos, otherwise visitor would confuse. Shota FUJI authored at Shota FUJI comitted at
  148. f7d6bd9c Fix ToC has no hierarchy Shota FUJI authored at Shota FUJI comitted at
  149. 22fb7ab7 Add favicon feature Shota FUJI authored at Shota FUJI comitted at
  150. 5a73934d Do not include empty directories in tree Shota FUJI authored at Shota FUJI comitted at
  151. 31ed44a8 Fix non-documents are included in the docs build Shota FUJI authored at Shota FUJI comitted at
  152. 03635de9 Add logo This is essential for implementing favicon and site logo feature. Shota FUJI authored at Shota FUJI comitted at
  153. ff974f0b Add user facing docs Shota FUJI authored at Shota FUJI comitted at
  154. e2335bfa Document sorting This is crucial, as the order of file / directories are not guranteed. Escpecially working on cross-platform. Shota FUJI authored at Shota FUJI comitted at
  155. 0394d2d4 Highlight Markdown extension from Obsidian Flavored Markdown This patch also works as foundation / reference code for other internal Markdown extensions. Shota FUJI authored at Shota FUJI comitted at
  156. ce9598bd Fix cursor goes "pointer" even outside navigation link Shota FUJI authored at Shota FUJI comitted at
  157. 789f8375 GitHub Flavored Markdown Shota FUJI authored at Shota FUJI comitted at
  158. 66b67ed0 Simplify content parsing / metadata generation - Remove Metadata Parser - Tree Builder now is also responsible for generating document metadata - Content Parser now can return document metadata The major factor motivating this refactor is the last bullet point. I wrote Metadata Parser with YAML frontmatter parsing...but that is definetely out of scope. What if one want to use HTML as a document and use `<title>` element? What if one want to use JPEG as a document and use EXIF for title and name? At all, metadata derived by content requires content parsing, thus Content Parser returns document metadata. Behaviors and options existed in VaultParser (Metadata Parser) and Tree Parser are re-implemented as a more flexible plugin, TreeBuildStrategy. I noticed those options are, in the end, `map` and `filter`. This design maintains both customizability and ease-of-use. Maybe the TreeBuildStrategy should be more generic so it's defined in the generic Tree Builder interface side (`tree_builder/interface.ts`). But I kept this form as I don't feel necessity for now. Maybe change later. Shota FUJI authored at Shota FUJI comitted at
  159. 8766e56a Move all data type definition into single place Due to each modules owning data models, refactoring and sharing was difficult. Shota FUJI authored at Shota FUJI comitted at
  160. 140c1af0 JSONCanvas support This is not complete. Before supporting Markdown parsing inside Node, I have to redesign metadata parsing flow. Messing Content Parser first would make the redesign more difficult. Also, I believe this state of implementation is good enough to commit. The scope is HUGE. Shota FUJI authored at Shota FUJI comitted at
  161. e2412186 Add roadmap document Useful for initial development. Shota FUJI authored at Shota FUJI comitted at
  162. c91ff476 Move Markdown parsing out of page builder This makes Page Builder more lightweight. Shota FUJI authored at Shota FUJI comitted at
  163. 862b4694 Remove restriction on document name and use them as much as possible Due to the restriction, URI (path) construction has been mess. This change makes document names as a Single Source of Truth for URI. Shota FUJI authored at Shota FUJI comitted at
  164. be6f89e1 Human friendly docs directory names It's ugly. Changing directory names directly was worse due to URL becoming ugly also. Shota FUJI authored at Shota FUJI comitted at
  165. 7d07ad7f Automated docs deploy to GitHub Pages Shota FUJI authored at Shota FUJI comitted at
  166. cf7e93b6 Removed locale assumptions This is better than assuming top-level directories as a locale or entire Vault consists of single locale. Large part is flexibility: one can choose between `<lang>/<..contents..>` structure and `<..contents..>/<lang>` structure. In addition to the flexibility, directory name can be more human friendly, such as "English" rather than "en". This change eliminates the complexity of handling default language not having path prefix. Thanks to this simplification, I can focus on path/name handling more. The last notable change is replace of "locale" to "lang". I initially thought locale would be appropriate as it also covers formatting. However, as the output of this program is (mostly) public viewable website, the content SHOULD NOT specify which locale to use. Instead, UA is responsible for deciding which locale to use for formatting. Shota FUJI authored at Shota FUJI comitted at
  167. 3acf36e6 Display every locales' content on navigation tree As this page layout uses tree for site navigation, I thought this presentation has the best discoverability and usablity. Although the `en/` links does not work at the moment, I'll change path construction strategy so it's kept as-is. Shota FUJI authored at Shota FUJI comitted at
  168. 442736c0 Japanese docs To test multi locale builds. Shota FUJI authored at Shota FUJI comitted at
  169. 6411ac4b Basic page builder Although fundamental data models need improvements. Especially path related data. Shota FUJI authored at Shota FUJI comitted at
  170. c3d0fbb7 Simplify architecture further The "Asset" thing existed because initially both Tree Builder and Page Builder produced assets. However, because of architecture changes I did earlier, Tree Builder no longer produces assets. That change and this change increase the scope of Page Builder massively, but I believe this is far better abstract compared to the previous ones. For instance, if I were to create an Asset Plugin for CSS postprocessing, what I/F needed for that? Even with this simple case, the I/F would be messy because a number of the resulting artifacts could be larger than the input, such as when the source CSS file imports other files. And, more (probably) important plugin, is image optimisation. However, that task requires caller (= Page Builder) to know the result in advance: e.g. a plugin generates WebP and Avif from JPEG file and optimises the JPEG file but Page Builder can't use the former two because it needs to know the plugin produces those files and modify `<img>` tag to `<picture>` tag with corresponding `<source>` tags and `<img>` tag. Considering these, I concluded the "Asset Manager" and "Asset Plugin" system are useless at most. Again, this make Page Builder more fat. But what kind of website assets are needed and how to generate those are differs by websites, at all. Page Builder need to be fat. Shota FUJI authored at Shota FUJI comitted at
  171. f310ec87 Precompress middleware for FileSystem Writer Shota FUJI authored at Shota FUJI comitted at
  172. 28fa1e76 Unexpected overwrite guard for FileSystem Writer This is better as a middleware, because otherwise every writer implementation needs to write their own guard. Shota FUJI authored at Shota FUJI comitted at
  173. a6b0d629 Tree validator for FileSystem Writer Shota FUJI authored at Shota FUJI comitted at
  174. 6e191af6 Disable require-await lint rule The bloat and stupidity of the current JS/TS "recommended" lint ecosystem is astonishing. Shota FUJI authored at Shota FUJI comitted at
  175. 43aa0901 In-memory FileSystem Writer Necessary for testings. Shota FUJI authored at Shota FUJI comitted at
  176. 7d43e235 Deno native FileSystem Writer Shota FUJI authored at Shota FUJI comitted at
  177. d7629394 Simplify architecture data flow "Who own the control?" was not clear. Shota FUJI authored at Shota FUJI comitted at
  178. 8ade6613 Validate generated document tree If Tree Builder does not check its output, then Page Builder has to verify the document tree and abort, which is not only messing responsibility but error-prone. Shota FUJI authored at Shota FUJI comitted at
  179. e3542c60 Multi locale tree builder Shota FUJI authored at Shota FUJI comitted at
  180. 26de357b Single locale tree builder Shota FUJI authored at Shota FUJI comitted at
  181. 940c4074 Metadata parser for Obsidian Vault directory Shota FUJI authored at Shota FUJI comitted at
  182. 0ff591a1 Move filesystem_reader to project root To reflect the architecture change. Shota FUJI authored at Shota FUJI comitted at
  183. 3e52c72f Change architecture and Create glossary The previous archtecture too focused on flexibility and that makes grapsing the whole picture hard and designing interfaces very difficult. It also suffers from the absense of control/data owner: one can't determine which module has the ownership of whole generation process. Shota FUJI authored at Shota FUJI comitted at
  184. 3ac6118c In-memory filesystem reader Shota FUJI authored at Shota FUJI comitted at
  185. 34e2e20d Document for running unit tests As it requires a permission. Shota FUJI authored at Shota FUJI comitted at
  186. c860affc Rename internal document This doc is no longer guideline, but tutorial like guide. Shota FUJI authored at Shota FUJI comitted at
  187. b12244ae Basic FileSystem Reader implementation Shota FUJI authored at Shota FUJI comitted at
  188. c623c111 Remove unnecessary EditorConfig ruleset I don't think Zig is benefitical for this project. Shota FUJI authored at Shota FUJI comitted at
  189. 8d90e0ea Deno CLI application foundation Shota FUJI authored at Shota FUJI comitted at
  190. 04733780 Docs Shota FUJI authored at Shota FUJI comitted at