# BOGAMARK Grammar Syntax BOGAMARK is a markup language for BOGAM. BOGAMARK is similar to Markdown, Wikipedia, and Namu Wiki. Use file extension `.bg` (e.g. `example-bogamark.bg`). ## Naming (Files and Titles) - Replace spaces with underscores in filenames Example: - Link: `What_is_Love?_(TWICE_음반)` - Title: `What is Love? (TWICE 음반)` ## Linking Format: `[[link_target|display_text]]` ### Internal Linking ``` [[What_is_Love?_(TWICE_음반)|TWICE's 5th mini album]] → /t/What_is_Love?_(TWICE_음반) [[recipe:chocolate_cake|Chocolate Cake]] → /recipe/chocolate_cake [[post:cooking_tips|Cooking Tips]] → /post/cooking_tips ``` You can use prefix before colon. No prefix defaults to `/t/`. ### External Linking Example: ``` Visit [[https://bluebottlecoffee.com/|Blue Bottle Coffee]] for more information. ``` - All protocols are supported (e.g. http, https, mailto). - Always prefer internal linking over external linking. ### LinkButton Format: `[button(link_target|display_text)]` - Resolves `link_target` like wiki links (protocols, `prefix:slug`, default `/t/`) - Renders as a solid primary-color button. ## Disambiguation Disambiguate using parentheses. Example: "Genesis (Car Brand)" ## Redirects `#REDIRECT [[Target]]` ## Transclusion Same as Wikipedia `<>` ## Table of Contents To specify where to place ToC in article body, write `<>` (case-insensitive). If not specified, ToC will be placed at the top of article body (below article title). To disable ToC, write `<>`. ## Section Heading Cluster information into sections. To title sections, use markdown heading syntax from H2 to H6. For example: `## Section about an aspect of a topic`, `#### Section at depth 3`. Maximum depth is 5 (`###### Maximum depth section`). H1 (`#`) is reserved for topic article title and must not be used for section titles. ## Text Formatting - **Bold**: `**text**` - **Italic**: `*text*` - **Bold + Italic**: `***text***` - **Underline**: `__text__` - **Strikethrough**: `~~text~~` - **Superscript**: `text` - **Subscript**: `text` ## Text Size - `{{{+5 text}}}` - Size +5 (largest) ... - `{{{+1 text}}}` - Size +1 (larger) - `{{{-1 text}}}` - Size -1 (smaller) ... - `{{{-5 text}}}` - Size -5 (smallest) ## Text Color - `{{{#ff6b6b text}}}` - Hex color ## Literal `{{{[[literal]]}}}` renders as `[[literal]]` NOTE: Do not use more than 3 consecutive brackets inside literal blocks. ## Lists ### Unordered Lists (Bullet Points) ``` * List item 1 * List item 1.1 * List item 2 ``` ### Ordered Lists (Numbered Lists) Use `1.` instead of `*` for ordered lists. ``` 1. List item 1 1. List item 1.1 1. List item 2 ``` ### Ordered Lists: Changing Starting Number To start a list from a specific number, use `#n` after the list identifier: ``` 1.#5 This list starts from 5 1. List item 6 1. List item 7 ``` ### Line Breaks in Lists - Use `[br]` macro for line breaks within list items - Empty lines between list items will create separate lists ## Tables A table row starts with `||` and ends with `||`. Multiple cells in a row are separated by `||`. ``` || Row 1 Col 1 || Row 1 Col 2 || || Row 2 Col 1 || Row 2 Col 2 || ``` ### Cell Merging To merge horizontally, use `<-n>` syntax. ``` ||<-2> Two cells merged ||<-2> Two cells || ||<-3> Three cells merged || One cell || ``` To merge vertically, use `<|n>` syntax. ``` ||<|4> Four rows ||<|3> Three rows ||<|2> Two rows || One row || || Space1 || || Space2 || Space3 || || Space4 || Space5 || Space6 || ``` ### Cell Text Alignments Horizontal - `<(>` - Left align (default) - `<:>` - Center align - `<)>` - Right align Vertical - `<^|1>` - Top align - `<|1>` - Middle align (default) - `` - Bottom align ### Table Dimensions - Absolute width: - Relative width: #### Cell Dimensions - Absolute width: - Relative to table width: - Absolute height: - Relative to table height: ### Table Coloring - Priority Order: Cell > Column > Row > Table: bgcolor > colbgcolor > rowbgcolor > tablebgcolor #### Background Colors Cell: Column: Row: Table: #### Text Colors Cell: Column: Row: Table: #### Border Color NOTE: Changing border color changes border thickness from 1px to 2px. ### Table Macros - Remove cell padding: `` - Change line breaking from character-level to word-level: ``, ``, `` ## Escape Use backslash (`\`) to escape: `*`, `[`, `]`, `|`, `#`, `\` - `\*text\*` → `*text*` (not italic) ## Dark Mode Support for Colors Specify color variations for dark mode using comma separation. - Format: `#lightModeColor,#darkModeColor` - Example (Text Color): `{{{#ff6b6b,#6bff6b text}}}` - Example: `` (red in light mode, green in dark mode) ## Embed Media - YouTube Videos: `[youtube(video_id,width=size,start=seconds,end=seconds)]` - Web Images: `[image(url,alt=description,width=size,height=size)]`