Skip to content

Commit

Permalink
docs: fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
sytone authored Nov 19, 2024
1 parent a4b5e22 commit fa29a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Render/HandlebarsHelpers/MarkdownTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `markdownTable`\-helper will generate a markdown table based off the provide
There is a option to specify the columns, this allows you to change the heding and set alignment. To set these you need to create a JSON blob and add it to the handlebars helper under `columns`. If you do this it will use the order in the JSON file to replace the headings and set alignment, so if you have 5 columns being returned then you need to have 5 JSON objects in the JSON array and they will be applied in the same order the query returns the columns. Avoid using the wildcard to return columns in this case.
In the example below the query is `SELECT TOP 5 basename, modified FROM obsidian_notes ORDER BY modified DESC`. This mean we have two columns returned in the order of basename and then modified. To change the titles in the table to be *nicer* you can create a JON array with two objects, as alignment is optional you can skip adding this. The required field in the object is `name`. So `{ "name": "This is the better Title" }` is valid for a column replacement without an alignment, in this case it will be left aligned.
In the example below the query is `SELECT TOP 5 basename, modified FROM obsidian_notes ORDER BY modified DESC`. This mean we have two columns returned in the order of `basename` and then `modified`. To change the titles in the table to be *nicer* you can create a JSON array with two objects, as alignment is optional you can skip adding this. The required field in the object is `name`. So `{ "name": "This is the better Title" }` is valid for a column replacement without an alignment, in this case it will be left aligned.
Alignment options are `left`, `right` and `center`, so if you want to change the alignment of a column add the `align` field to the JSON object after `name`. So using the example above to makeit center aligned you would use `{ "name": "This is the better Title", "align": "center" }`.
Expand Down

0 comments on commit fa29a00

Please sign in to comment.