# Macro Pack Your site can include macros from the Macro Pack app by Warsaw Dynamics. Each example below is the real macro, shown as it appears once your site is published. ## Code Code is published as a formatted code block in the language you chose. ``` def shipping_cost(weight_kg: float, express: bool = False) -> float: """Price a parcel by weight, with a flat supplement for next-day delivery.""" base = 3.95 + 1.20 * max(0, weight_kg - 1) return round(base + (6.50 if express else 0), 2) print(shipping_cost(2.5, express=True)) ``` ## JSON JSON is published as a readable, indented code block. ``` { "site": { "title": "Help centre", "language": "en-GB", "search": true }, "navigation": [ "Get started", "Guides", "Troubleshooting" ], "contact": { "email": "support@example.com", "hours": "09:00-17:30" } } ``` ## HTML HTML from the macro is shown in a frame of its own, so its styling stays inside it. ## LaTeX A block equation is typeset and centred on its own line. \int_0^1 x^2 \, dx = \frac{1}{3} The inline macro sits inside a sentence: the area of a circle is `\pi r^2` for a radius r. ## Markdown Markdown is published as formatted text, with its lists and quotes. ### Before your first site 1. Choose the spaces you want to publish. 2. Pick a theme and add your logo. 3. Preview the site, then publish. > Pages you restrict in Confluence stay off the site. ## Swagger / OpenAPI An OpenAPI or Swagger definition is published as browsable API documentation. Loading API documentation… ## draw.io On a published site, a draw.io diagram from this macro has no preview image: visitors open it in a viewer from a button. Open draw.io diagram