Skip to content

Commit f0329cd

Browse files
committedMar 17, 2025·
Extend custom component description for markdown helper
1 parent 261f76c commit f0329cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎examples/official-site/custom_components.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Each page in SQLPage is composed of a `shell` component,
1616
which contains the page title and the navigation bar,
1717
and a series of normal components that display the data.
1818
19-
The `shell` component is always present unless explicitly skipped via the `?_sqlpage_embed` query parameter.
19+
The `shell` component is always present unless explicitly skipped via the `?_sqlpage_embed` query parameter.
2020
If you don''t call it explicitly, it will be invoked with the default parameters automatically before your first component
2121
invocation that tries to render data on the page.
2222
@@ -88,7 +88,7 @@ For instance, you can easily create a multi-column layout with the following cod
8888
</div>
8989
```
9090
91-
For custom styling, you can write your own CSS files
91+
For custom styling, you can write your own CSS files
9292
and include them in your page header.
9393
You can use the `css` parameter of the default [`shell`](./documentation.sql?component=shell#component) component,
9494
or create your own custom `shell` component with a `<link>` tag.
@@ -132,7 +132,7 @@ and SQLPage adds a few more:
132132
- `static_path`: returns the path to one of the static files bundled with SQLPage. Accepts arguments like `sqlpage.js`, `sqlpage.css`, `apexcharts.js`, etc.
133133
- `app_config`: returns the value of a configuration parameter from sqlpage''s configuration file, such as `max_uploaded_file_size`, `site_prefix`, etc.
134134
- `icon_img`: generate an svg icon from a *tabler* icon name
135-
- `markdown`: renders markdown text
135+
- `markdown`: renders markdown text. Accepts an optional 2nd argument `''allow_unsafe''` that will render embedded html blocks: use only on trusted content. See the [Commonmark spec](https://spec.commonmark.org/0.31.2/#html-blocks) for more info.
136136
- `each_row`: iterates over the rows of a query result
137137
- `typeof`: returns the type of a value (`string`, `number`, `boolean`, `object`, `array`, `null`)
138138
- `rfc2822_date`: formats a date as a string in the [RFC 2822](https://tools.ietf.org/html/rfc2822#section-3.3) format, that is, `Thu, 21 Dec 2000 16:01:07 +0200`
@@ -178,7 +178,7 @@ Some interesting examples are:
178178
179179
- [The `shell` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/shell.handlebars)
180180
- [The `card` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/card.handlebars): simple yet complete example of a component that displays a list of items.
181-
- [The `table` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/table.handlebars): more complex example of a component that uses
181+
- [The `table` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/table.handlebars): more complex example of a component that uses
182182
- the `eq`, `or`, and `sort` handlebars helpers,
183183
- the `../` syntax to access the parent context,
184184
- and the `@key` to work with objects whose keys are not known in advance.

0 commit comments

Comments
 (0)
Please sign in to comment.