macana

Static site generator for Obsidian Vault

Commits at ff8c292bd7492d8120e3509774985fc6e4dac3cf

  1. ff8c292b Setup logging Shota FUJI authored at Shota FUJI comitted at
  2. b933e523 Wikilink OFM syntax parser Shota FUJI authored at Shota FUJI comitted at
  3. a45d481a Fix Promise based path resolution fails Shota FUJI authored at Shota FUJI comitted at
  4. 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
  5. 87f677a9 Remove garbage file I guess Obsidian does not have proper file system access restriction / validation. Shota FUJI authored at Shota FUJI comitted at
  6. 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
  7. aded3aa5 Fix YAML frontmatter parser dropping existing metadata Shota FUJI authored at Shota FUJI comitted at
  8. 70fda17c Fix document path ignores metadata name returned by Content Parser Shota FUJI authored at Shota FUJI comitted at
  9. 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
  10. 9960de32 Internal document link resolution Shota FUJI authored at Shota FUJI comitted at
  11. 98e69711 Delete unused lockfile entries Deno does not delete unused entries. Shota FUJI authored at Shota FUJI comitted at
  12. 06d66add Remove `FileSystemReader.readFile` Less API surface, more consolidated API is better. Shota FUJI authored at Shota FUJI comitted at
  13. 6c4bd037 Removed unused import Shota FUJI authored at Shota FUJI comitted at
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. aa50c590 Fix logo.svg being "logo..svg" Shota FUJI authored at Shota FUJI comitted at
  21. 7a1059b0 Remove default shadow from `<img>` It's annoying. Shota FUJI authored at Shota FUJI comitted at
  22. 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
  23. 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
  24. 4ada2b92 Image size annotation Markdown extension from Obsidian Flavored Markdown Shota FUJI authored at Shota FUJI comitted at
  25. 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
  26. f7d6bd9c Fix ToC has no hierarchy Shota FUJI authored at Shota FUJI comitted at
  27. 22fb7ab7 Add favicon feature Shota FUJI authored at Shota FUJI comitted at
  28. 5a73934d Do not include empty directories in tree Shota FUJI authored at Shota FUJI comitted at
  29. 31ed44a8 Fix non-documents are included in the docs build Shota FUJI authored at Shota FUJI comitted at
  30. 03635de9 Add logo This is essential for implementing favicon and site logo feature. Shota FUJI authored at Shota FUJI comitted at
  31. ff974f0b Add user facing docs Shota FUJI authored at Shota FUJI comitted at
  32. 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
  33. 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
  34. ce9598bd Fix cursor goes "pointer" even outside navigation link Shota FUJI authored at Shota FUJI comitted at
  35. 789f8375 GitHub Flavored Markdown Shota FUJI authored at Shota FUJI comitted at
  36. 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
  37. 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
  38. 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
  39. e2412186 Add roadmap document Useful for initial development. Shota FUJI authored at Shota FUJI comitted at
  40. c91ff476 Move Markdown parsing out of page builder This makes Page Builder more lightweight. Shota FUJI authored at Shota FUJI comitted at
  41. 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
  42. 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
  43. 7d07ad7f Automated docs deploy to GitHub Pages Shota FUJI authored at Shota FUJI comitted at
  44. 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
  45. 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
  46. 442736c0 Japanese docs To test multi locale builds. Shota FUJI authored at Shota FUJI comitted at
  47. 6411ac4b Basic page builder Although fundamental data models need improvements. Especially path related data. Shota FUJI authored at Shota FUJI comitted at
  48. 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
  49. f310ec87 Precompress middleware for FileSystem Writer Shota FUJI authored at Shota FUJI comitted at
  50. 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
  51. a6b0d629 Tree validator for FileSystem Writer Shota FUJI authored at Shota FUJI comitted at
  52. 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
  53. 43aa0901 In-memory FileSystem Writer Necessary for testings. Shota FUJI authored at Shota FUJI comitted at
  54. 7d43e235 Deno native FileSystem Writer Shota FUJI authored at Shota FUJI comitted at
  55. d7629394 Simplify architecture data flow "Who own the control?" was not clear. Shota FUJI authored at Shota FUJI comitted at
  56. 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
  57. e3542c60 Multi locale tree builder Shota FUJI authored at Shota FUJI comitted at
  58. 26de357b Single locale tree builder Shota FUJI authored at Shota FUJI comitted at
  59. 940c4074 Metadata parser for Obsidian Vault directory Shota FUJI authored at Shota FUJI comitted at
  60. 0ff591a1 Move filesystem_reader to project root To reflect the architecture change. Shota FUJI authored at Shota FUJI comitted at
  61. 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
  62. 3ac6118c In-memory filesystem reader Shota FUJI authored at Shota FUJI comitted at
  63. 34e2e20d Document for running unit tests As it requires a permission. Shota FUJI authored at Shota FUJI comitted at
  64. c860affc Rename internal document This doc is no longer guideline, but tutorial like guide. Shota FUJI authored at Shota FUJI comitted at
  65. b12244ae Basic FileSystem Reader implementation Shota FUJI authored at Shota FUJI comitted at
  66. c623c111 Remove unnecessary EditorConfig ruleset I don't think Zig is benefitical for this project. Shota FUJI authored at Shota FUJI comitted at
  67. 8d90e0ea Deno CLI application foundation Shota FUJI authored at Shota FUJI comitted at
  68. 04733780 Docs Shota FUJI authored at Shota FUJI comitted at