Sitemap for a panel app

Hello,

I have a panel app with an example code below:

import pandas as pd
import panel as pn
pn.extension('tabulator',notifications=True)

button = pn.widgets.Button(name = 'read') 
...
...

pn.Row(button).servable();

My Procfile is as below:

web: panel serve --address=β€œ0.0.0.0” --port=$PORT app.ipynb --allow-websocket-origin=www.example.com

requirements.txt content as below:

pandas
panel

All files are placed in my GitHub repository and working well when I deploy it in Heroku.

I want to add a sitemap to make the webpage visible in google search, however I could not find a way to do it.

I need to place it to the URL www.example.com/sitemap.xml I have sitemap.xml file ready. I don’t know how to create and connect it in the app code.

Anyone can give me some ideas to make it please?

Thanks.

Sencer

1 Like

I believe I saw @philippjfr adding some functionality for serving additional files at custom endpoints via pn.serve. But now I cannot find it.

I’ve added a feature request here Add parameter to panel serve to serve sitemap.xml Β· Issue #4308 Β· holoviz/panel (github.com). Please upvote if you think its important.

Hello @Sencer , welcome to the site!

I took the liberty to slightly modify your post:
To display nicely formated code, it is sufficient to enclose it
with three backticks: ```

3 Likes