• Home
  • Blog
  • About
    Astro Big Doc uses Markdown as CMS rendered with Astro components

    Images

    Simple Image link

    Images are encapsulated inside a component that can open them in a Modal full view for Pan and zoom function
    ![astro markdown render](./astro-markdown-render-small.png)
    Copied!
    will generate this image
    astro markdown render
    ×

    Advanced Image Directive

    In order to give more options, using the image directive allows to pass more arguments from markdown
    :image[]{src=./astro-markdown-render-small.png alt="Astro Markdown Render" height=200}
    Copied!
    will generate this image height adjusted image with respect to the aspect ratio
    Astro Markdown Render

    SVG Image

    ×

    3D Model viewer

    Model Viewer Makrdown plugin
    models from https://modelviewer.dev/editor/

    From a link

    just by inserting a link to a .glb file
    [Astronaut](./Astronaut.glb)
    Copied!
    will generate this 3D model
    Astronaut

    From code

    This piece of code using as code language yaml and code meta-data : glb as follows
    Code
    ×
    will generate this 3D model with the provided files.
    • poster : allows fast page load, by loading the image only first.
    • environment-image : for lighting effect
    Lantern

    Tables

    Markdown Simple Table

    A markdown table like this one
    | Column 1 | Column 2 |
    |----------|----------|
    | Row 1    | Row 1 c2 |
    | Row 2    | Row 2 c2 |
    Copied!
    is a table that has a low number of lines and therfore gets a simple table view
    Column 1Column 2
    Row 1Row 1 c2
    Row 2Row 2 c2
    Showing 1 to 2 of 2 entries
    Previous1Next

    Markdown Data Table

    A table with a high number of lines gets a data-table element with filter and pagination
    NameAgeCity
    Johnny36New York
    John30New York
    Jane28Los Angeles
    Janny22Los Angeles
    Marc28Los Angeles
    Marco21Bahamas
    Joanna29New York
    Joanna29Los Angeles
    Alice32Miami
    Bob27Seattle
    Showing 1 to 10 of 13 entries
    Previous12Next

    XLSX Table

    It is also possible to create tables in xlsx format. This link of .xlsx extension
    [Table1](./Table1.xlsx)
    Copied!
    will generate this data table
    Column 1Column 2Column 3Column 4
    101202303404
    105210315420
    109218327436
    Showing 1 to 3 of 3 entries
    Previous1Next

    Code block

    The code block offers a copy button visible on hover over the code.
    javascript
    const count = 0
    console.log(count)
    Copied!
    python
    for item in my_list:
      print(item)
    Copied!

    Links

    • external link Astro Markdown Render github repo link is external and opens in a new page.
    • Link to the Panzoom entry opens in the same page

    Diagrams from code

    This is a concept where diagrams are generated from a code block that witholds the description needed to generate them. Note these sorts of diagrams are much more informative for automation and LLMs processing than usual bitmaps or vectorial images.

    Plantuml

    This is a plantuml sequence diagram
    ×
    @startuml
    Michael -> Maria : Message(Hello)
    Maria -> Marco : Message(Hi)
    Marco -> Miranda : Message(Hi there)
    Miranda -> Mario : Message(Hallo)
    Mario -> Mathilda: Message(Hallo)
    @enduml
    Copied!

    References

    simple reference

    this is how you can reference a page
    Link to page::image-svg
    Copied!
    will produce this
    Link to image-svg

    deep path reference

    A slug is only unique within a content type, therefore in case of multiple files with the same folder name and title, it is possible to use the automatically generated unique identifier available in the index.json
    Link to page::trees.image-svg
    Copied!
    will link the correct url of the item in path folder/trees/image-svg/readme.md
    Link to trees.image-svg
    • Images
      • Simple Image link
      • Advanced Image Directive
      • SVG Image
    • 3D Model viewer
      • From a link
      • From code
    • Tables
      • Markdown Simple Table
      • Markdown Data Table
      • XLSX Table
    • Code block
    • Links
    • Diagrams from code
      • Plantuml
    • References
      • simple reference
      • deep path reference

    footer