Writer Framework provides powerful options for optimizing your application’s metadata to improve SEO (Search Engine Optimization) and enhance how your content appears when shared on social networks. These options are available in the writer.serve.configure_webpage_metadata function available in the server_setup.py file.
The page title is a crucial element for your application’s SEO. Web crawlers and bots will see this title without loading the full application. By default, they will see Writer Framework.
HTTP headers allow you to specify a title, description, and keywords that search engines will use to understand and index your content. You can configure these tags using the meta parameter.
Copy
# ./server_setup.pywriter.serve.configure_webpage_metadata( title="My Amazing App", meta={ "description": "My amazing app", "keywords": "WF, Amazing, AI App", "author": "Amazing Company" })
You can also generate meta tags dynamically using a function:
When users share links to your application on social networks, those platforms will attempt to fetch metadata to create rich previews of your content. You can configure the OpenGraph tags to improve the appearance of your content when shared.
Copy
# ./server_setup.pywriter.serve.configure_webpage_metadata( opengraph_tags= { "og:title": "My App", "og:description": "My amazing app", "og:image": "https://myapp.com/logo.png", "og:url": "https://myapp.com" })
Like meta tags, OpenGraph tags can also be generated dynamically: