Enhance documentation with SEO metadata and layout

Added a new custom layout template for SEO and social media meta tags. Updated multiple documentation files with metadata for improved search engine optimization and social sharing. Enhanced Sphinx configuration with additional HTML options and meta tags.
This commit is contained in:
xixu-me committed 2025-06-06 17:50:43 +08:00
1 parent abbeab83f1
commit b5f7fa8dca
9 files changed
+154 -2

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
{% extends "!layout.html" %}
{% block extrahead %}
{{ super() }}
<!-- Additional SEO and social meta tags -->
<meta name="application-name" content="tzst">
<meta name="generator" content="Sphinx {{ sphinx_version }}">
<!-- Schema.org markup for search engines -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "tzst",
"description": "A Python library for creating and extracting tar.zst archives with high performance and comprehensive features",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Cross-platform",
"programmingLanguage": "Python",
"license": "https://opensource.org/licenses/MIT",
"url": "https://xixu-me.github.io/tzst/",
"downloadUrl": "https://pypi.org/project/tzst/",
"softwareVersion": "{{ version }}",
"author": {
"@type": "Person",
"name": "Xi Xu"
},
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
<!-- Canonical URL for better SEO -->
{% if pagename != 'index' %}
<link rel="canonical" href="https://xixu-me.github.io/tzst/{{ pagename }}.html">
{% else %}
<link rel="canonical" href="https://xixu-me.github.io/tzst/">
{% endif %}
<!-- Preconnect to external domains for performance -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
{% endblock %}
+10
View File
@@ -1,3 +1,13 @@
---
html_meta:
description: "tzst CLI API - Command-line interface functions and utilities for tar.zst archive operations"
keywords: "tzst CLI API, command line interface, Python CLI, tar.zst commands"
og:title: "tzst CLI API Reference"
og:description: "CLI API documentation for tzst - Command-line interface functions and utilities"
twitter:title: "tzst CLI API Reference"
twitter:description: "CLI API documentation for tzst - Command-line interface functions and utilities"
---
# CLI API # CLI API
The command-line interface module provides comprehensive functionality for the tzst CLI tool, including argument parsing, command execution, and interactive features. The command-line interface module provides comprehensive functionality for the tzst CLI tool, including argument parsing, command execution, and interactive features.
+10
View File
@@ -1,3 +1,13 @@
---
html_meta:
description: "tzst Core API - TzstArchive class and convenience functions for tar.zst archive operations"
keywords: "tzst core API, TzstArchive, Python archive class, tar.zst functions"
og:title: "tzst Core API Reference"
og:description: "Core API documentation for tzst - TzstArchive class and convenience functions"
twitter:title: "tzst Core API Reference"
twitter:description: "Core API documentation for tzst - TzstArchive class and convenience functions"
---
# Core API # Core API
The core module provides the main functionality for working with tzst archives, including the primary `TzstArchive` class and high-level convenience functions. The core module provides the main functionality for working with tzst archives, including the primary `TzstArchive` class and high-level convenience functions.
+13
View File
@@ -1,3 +1,16 @@
---
html_meta:
description: "Complete reference for tzst exception classes and error handling. Learn about TzstError, TzstArchiveError, and other custom exceptions for robust archive operations."
keywords: "tzst exceptions, Python exceptions, error handling, TzstError, TzstArchiveError, archive errors, compression errors"
"og:title": "tzst Exceptions API Reference"
"og:description": "Complete reference for tzst exception classes and error handling. Learn about TzstError, TzstArchiveError, and other custom exceptions for robust archive operations."
"og:type": "article"
"twitter:title": "tzst Exceptions API Reference"
"twitter:description": "Complete reference for tzst exception classes and error handling. Learn about TzstError, TzstArchiveError, and other custom exceptions for robust archive operations."
"article:section": "API Reference"
"article:tag": "exceptions, error handling, API"
---
# Exceptions API # Exceptions API
Custom exception classes used by tzst for comprehensive error handling and debugging. Custom exception classes used by tzst for comprehensive error handling and debugging.
+10
View File
@@ -1,3 +1,13 @@
---
html_meta:
description: "Complete tzst API reference - Core functions, CLI tools, and exception handling for tar.zst archives"
keywords: "tzst API, Python API documentation, tar.zst API reference, archive API"
og:title: "tzst API Reference"
og:description: "Complete API reference for tzst - Core functions, CLI tools, and exception handling"
twitter:title: "tzst API Reference"
twitter:description: "Complete API reference for tzst - Core functions, CLI tools, and exception handling"
---
# API Reference # API Reference
This section contains the complete API documentation for tzst, providing detailed information about classes, functions, and exceptions. This section contains the complete API documentation for tzst, providing detailed information about classes, functions, and exceptions.
+36 -2
View File
@@ -35,6 +35,27 @@ html_static_path = ["_static"]
html_title = f"tzst {version} Documentation" html_title = f"tzst {version} Documentation"
html_short_title = "tzst" html_short_title = "tzst"
# HTML meta tags
html_meta = {
"description": "tzst - A Python library for creating and extracting tar.zst archives with high performance and comprehensive features",
"keywords": "tzst, tar, zstandard, compression, archive, python, extraction, backup",
"author": "Xi Xu",
"robots": "index, follow",
"language": "en",
"viewport": "width=device-width, initial-scale=1.0",
"theme-color": "#2980B9",
"msapplication-TileColor": "#2980B9",
"og:title": "tzst Documentation",
"og:description": "tzst - A Python library for creating and extracting tar.zst archives with high performance and comprehensive features",
"og:type": "website",
"og:url": "https://xixu-me.github.io/tzst/",
"og:image": "https://xixu-me.github.io/tzst/_static/tzst-logo.png",
"twitter:card": "summary_large_image",
"twitter:title": "tzst Documentation",
"twitter:description": "tzst - A Python library for creating and extracting tar.zst archives with high performance and comprehensive features",
"twitter:image": "https://xixu-me.github.io/tzst/_static/tzst-logo.png",
}
# Theme options # Theme options
html_theme_options = { html_theme_options = {
"canonical_url": "https://xixu-me.github.io/tzst/", "canonical_url": "https://xixu-me.github.io/tzst/",
@@ -45,8 +66,21 @@ html_theme_options = {
"collapse_navigation": True, "collapse_navigation": True,
"sticky_navigation": True, "sticky_navigation": True,
"navigation_depth": 4, "navigation_depth": 4,
"includehidden": True, "includehidden": True, "titles_only": False,
"titles_only": False, }
# Additional HTML options
html_favicon = "_static/favicon.ico" # Will show warning until favicon is created
html_logo = "_static/tzst-logo.png" # Will show warning until logo is created
html_use_opensearch = "https://xixu-me.github.io/tzst/"
# HTML context for custom template variables
html_context = {
"display_github": True,
"github_user": "xixu-me",
"github_repo": "tzst",
"github_version": "main",
"conf_py_path": "/docs/",
} }
# -- Extension configuration ------------------------------------------------- # -- Extension configuration -------------------------------------------------
+10
View File
@@ -1,3 +1,13 @@
---
html_meta:
description: "Comprehensive tzst examples - Learn advanced archive creation, extraction, security, and performance optimization"
keywords: "tzst examples, Python archive examples, tar.zst tutorials, Zstandard compression examples"
og:title: "tzst Examples and Tutorials"
og:description: "Comprehensive examples for tzst - archive creation, extraction, security, and performance optimization"
twitter:title: "tzst Examples and Tutorials"
twitter:description: "Comprehensive examples for tzst - archive creation, extraction, security, and performance optimization"
---
# Examples # Examples
This section provides comprehensive examples of using tzst for various scenarios and use cases. This section provides comprehensive examples of using tzst for various scenarios and use cases.
+10
View File
@@ -1,3 +1,13 @@
---
html_meta:
description: "tzst - Next-generation Python library for tar.zst archives with Zstandard compression. Fast, secure, and reliable archive management."
keywords: "tzst, Python, tar.zst, Zstandard, compression, archive, backup, file management"
og:title: "tzst - Next-Generation Archive Management"
og:description: "Fast, secure, and reliable Python library for tar.zst archives with Zstandard compression"
twitter:title: "tzst - Next-Generation Archive Management"
twitter:description: "Fast, secure, and reliable Python library for tar.zst archives with Zstandard compression"
---
# tzst Documentation # tzst Documentation
Welcome to **tzst**, the next-generation Python library engineered for modern archive management, leveraging cutting-edge Zstandard compression to deliver superior performance, security, and reliability. Welcome to **tzst**, the next-generation Python library engineered for modern archive management, leveraging cutting-edge Zstandard compression to deliver superior performance, security, and reliability.
+10
View File
@@ -1,3 +1,13 @@
---
html_meta:
description: "Quick start guide for tzst - Learn how to install and use the Python tar.zst archive library in minutes"
keywords: "tzst tutorial, Python archive tutorial, tar.zst guide, Zstandard compression guide"
og:title: "tzst Quick Start Guide"
og:description: "Learn how to install and use tzst for Python tar.zst archive management in minutes"
twitter:title: "tzst Quick Start Guide"
twitter:description: "Learn how to install and use tzst for Python tar.zst archive management in minutes"
---
# Quick Start Guide # Quick Start Guide
This guide will get you up and running with tzst in just a few minutes. This guide will get you up and running with tzst in just a few minutes.