From ea920631eff963c2ab63f70b4c770f99c090b137 Mon Sep 17 00:00:00 2001 From: Fabien Arcellier Date: Mon, 2 Dec 2024 10:31:02 +0100 Subject: [PATCH] docs: configures the documentation architecture for the local environment * fix: improve the documentation of seo section --- docs/framework/seo.mdx | 6 +++++- docs/mint.json | 31 ++++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/docs/framework/seo.mdx b/docs/framework/seo.mdx index 01af89993..085b6ed49 100644 --- a/docs/framework/seo.mdx +++ b/docs/framework/seo.mdx @@ -1,5 +1,5 @@ --- -title: "SEO" +title: "Seo and social sharing" mode: "wide" --- @@ -41,6 +41,7 @@ writer.serve.configure_webpage_metadata( You can also use a function to generate the meta tags dynamically. +*./server_setup.py* ```python def _meta(): last_news = db.get_last_news() @@ -57,6 +58,7 @@ writer.serve.configure_webpage_metadata(meta=_meta) When you share a link on social networks, they will try to fetch the metadata of the page to display a preview. +*./server_setup.py* ```python writer.serve.configure_webpage_metadata( opengraph_tags= { @@ -66,9 +68,11 @@ writer.serve.configure_webpage_metadata( "og:url": "https://myapp.com" } ) +``` You can also use a function to generate the opengraph tags dynamically. +*./server_setup.py* ```python def _opengraph_tags(): last_news = db.get_last_news() diff --git a/docs/mint.json b/docs/mint.json index 767ba68eb..246cf5839 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -32,23 +32,20 @@ "framework/introduction", "framework/quickstart", "framework/ai-module", - "framework/cloud-deploy", - "framework/sample-apps" + "framework/sample-apps", + "framework/component-list-link" ] }, { "group": "Guides", "pages": [ "framework/application-state", - "framework/event-handlers", + "framework/backend-initiated-actions", "framework/builder-basics", + "framework/event-handlers", "framework/handling-inputs", - "framework/dataframe", - "framework/backend-driven-ui", - "framework/stylesheets", - "framework/frontend-scripts", - "framework/custom-components", - "framework/authentication" + "framework/dataframe", + "framework/repeater" ] }, { @@ -64,19 +61,23 @@ "group": "Deployment", "pages": [ "framework/cloud-deploy", - "framework/deploy-with-docker", - "framework/testing" + "framework/deploy-with-docker" ] }, { "group": "Advanced", "pages": [ - "framework/repeater", - "framework/backend-initiated-actions", + "framework/authentication", + "framework/backend-driven-ui", + "framework/custom-components", + "framework/custom-server", + "framework/frontend-scripts", "framework/page-routes", "framework/sessions", - "framework/custom-server", - "framework/state-schema" + "framework/state-schema", + "framework/stylesheets", + "framework/testing", + "framework/seo" ] }, {