Skip to content

Commit bc2c118

Browse files
authored
Merge pull request #393 from amrutadotorg/patch-10
adding image_og property to the shell component
2 parents 58b6191 + 3a2ca5c commit bc2c118

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
764764
('javascript', 'The URL of a Javascript file to load and execute on the page.', 'URL', TRUE, TRUE),
765765
('rss', 'The URL of an RSS feed to display in the top navigation bar. You can use the rss component to generate the field.', 'URL', TRUE, TRUE),
766766
('image', 'The URL of an image to display next to the page title.', 'URL', TRUE, TRUE),
767+
('social_image', 'The URL of the preview image that will appear in the Open Graph metadata when the page is shared on social media.', 'URL', TRUE, TRUE),
767768
('icon', 'Name of an icon (from tabler-icons.io) to display next to the title in the navigation bar.', 'ICON', TRUE, TRUE),
768769
('menu_item', 'Adds a menu item in the navigation bar at the top of the page. The menu item will have the specified name, and will link to as .sql file of the same name. A dropdown can be generated by passing a json object with a `title` and `submenu` properties.', 'TEXT', TRUE, TRUE),
769770
('search_target', 'When this is set, a search field will appear in the top navigation bar, and load the specified sql file with an URL parameter named "search" when the user searches something.', 'TEXT', TRUE, TRUE),

sqlpage/templates/shell.handlebars

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<link rel="alternate" type="application/rss+xml" title="{{title}}" href="{{rss}}">
4444
{{/if}}
4545
<meta name="generator" content="SQLPage"/>
46+
47+
{{#if social_image}}
48+
<meta property="og:image" content="{{social_image}}"/>
49+
{{/if}}
4650
</head>
4751

4852
<body class="layout-{{default layout 'boxed'}}" {{#if theme}}data-bs-theme="{{theme}}"{{/if}}>

0 commit comments

Comments
 (0)