macana

Static site generator for Obsidian Vault

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
---
createdAt: 2024-04-07T18:00:00+09:00
updatedAt: 2024-04-19T20:00:00+09:00
---

## Document

A parsed note or canvas in a Vault.
A *document* consists of *document metadata* and *document content*.

## Document metadata

Properties describing a *document* or a *document directory* required for generating a website.
*Document metadata* contains those properties:

- *Document name*
- *Document title*
- Whether the document is the default document of Vault
- Description (optional)
- Language (optional)
- Creation date-time (optional)
- Update date-time (optional)

## Document name

An identifier for a document, unique among a directory the document belongs to.

## Document title

Human-readable text representing a title of the *document*.
Although there is no restriction on available characters, you should avoid using control characters. ([Unicode control characters - Wikipedia](https://en.wikipedia.org/wiki/Unicode_control_characters))

## Document directory

A directory (folder) containing *document metadata* and *document directories*.
A document directory consists of *document metadata* of its own and zero or more *document metadata* and/or *document directory*.

## Document tree

Tree structured data contains *document metadata* and *document directories*.

## Document content

A parsed content of note or canvas.

## Document token

A string starts with `mxt_` that is used for referencing a document.

There are places where *Content Parser* needs a reference to *a document* while parsing another *document*, but unable to hold an object reference for the *document*.
In such case, *Content Parser* exchanges target *document*'s file path for a *document token*.
Then, *Page Builder* can exchange the *document token* for an actual *document* object reference later.

## Asset token

A string starts with `mxa_` that is used for referencing an asset.

Because of Macana's file I/O design and multi-phase build process, it's not preferable to pass a reference to an asset file around.
To avoid keeping references for asset files, *Content Parser* exchanges target asset's file path for an *asset token*.
Then, *Page Builder* can exchange the *asset token* for an actual asset file reference later.