From 06c80e264c9281541a43e18486cff86f7b4ab328 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 28 Dec 2021 09:07:32 -0800 Subject: [PATCH] docs.comma.ai add sitemap and robots.txt (#23259) * add sitemap generator * update conf for seo * remove cmake var * relock * fix html_baseurl * more fixes * newline Co-authored-by: Willem Melching old-commit-hash: c95202bd1c1882f30dbb153d58de4d875cdbf025 --- Pipfile | 4 ++-- Pipfile.lock | 4 ++-- docs/_static/logo.png | 3 +++ docs/_static/robots.txt | 2 ++ docs/conf.py | 28 ++++++++++++++++++++++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 docs/_static/logo.png create mode 100644 docs/_static/robots.txt diff --git a/Pipfile b/Pipfile index 2336552c28..fe16f485c8 100644 --- a/Pipfile +++ b/Pipfile @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46258ab149de8606b809e271264382d5450c11e914bb72c37697345290bd39f1 -size 1215 +oid sha256:5f2b0d547ef23a2ca1279e516813c82d4dc1a6b258d5e1356bfbe59211459068 +size 1236 diff --git a/Pipfile.lock b/Pipfile.lock index 8610993c34..19e39886cb 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:871bf11488728e41699192b10314fde73cd8ca57acc803d452de76ac756bf3af -size 144757 +oid sha256:2e3700d16d52db5ed0b47e55dee17c900f0b9bbfd8cf865e911f00d7a6d85403 +size 146742 diff --git a/docs/_static/logo.png b/docs/_static/logo.png new file mode 100644 index 0000000000..0e7577dae1 --- /dev/null +++ b/docs/_static/logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42bc589954cad7f16cef694887dee2c819378f7dacfdddea2ff833ff65a109fd +size 1122 diff --git a/docs/_static/robots.txt b/docs/_static/robots.txt new file mode 100644 index 0000000000..3bcd24fb5d --- /dev/null +++ b/docs/_static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Sitemap: https://docs.comma.ai/sitemap.xml \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 0d33637a14..ab384369df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,6 +25,7 @@ sys.path.insert(0, os.path.abspath('..')) project = 'openpilot' copyright = '2021, comma.ai' author = 'comma.ai' +language = 'en' # -- General configuration --------------------------------------------------- @@ -37,8 +38,34 @@ extensions = [ 'sphinx.ext.viewcode', # Add view code link to modules 'sphinx_rtd_theme', # Read The Docs theme 'myst_parser', # Markdown parsing + 'sphinx_sitemap', # sitemap generation for SEO ] +myst_html_meta = { + "description": "openpilot docs", + "keywords": "op, openpilot, docs, documentation", + "robots": "all,follow", + "googlebot": "index,follow,snippet,archive", + "property=og:locale": "en_US", + "property=og:site_name": "docs.comma.ai", + "property=og:url": "https://docs.comma.ai", + "property=og:title": "openpilot Docuemntation", + "property=og:type": "website", + "property=og:image:type": "image/jpeg", + "property=og:image:width": "400", + "property=og:image": "https://docs.comma.ai/_static/logo.png", + "property=og:image:url": "https://docs.comma.ai/_static/logo.png", + "property=og:image:secure_url": "https://docs.comma.ai/_static/logo.png", + "property=og:description": "openpilot Documentation", + "property=twitter:card": "summary_large_image", + "property=twitter:logo": "https://docs.comma.ai/_static/logo.png", + "property=twitter:title": "openpilot Documentation", + "property=twitter:description": "openpilot Documentation" +} + +html_baseurl = 'https://docs.comma.ai/' +sitemap_filename = "sitemap.xml" + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -59,3 +86,4 @@ html_theme = 'sphinx_rtd_theme' # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_extra_path = ['_static']