Place a <link> tag in the html <head>

I know how to place meta tags in the head section. Now I want to place link tags there. How to?

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from dash import Dash, html

app = Dash(
	__name__, 
	meta_tags= [
		dict(name = 'description', content = 'Description of the site'),
		{'http-equiv':'content-language', 'content':'pt-br'}
	]
)

app.layout = [
	html.Header(
		html.Link(href='https://example.com',rel='canonical')
	),
	html.P('Some text')
]

if __name__ == '__main__':
	app.run(debug=True)

Hello @clodoaldo

Welcome to the community!

You can use the hooks system to adjust the index, you can do something similar to the steps shown under the app index, just make it for the head instead of body.

2 Likes