Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use meta directive for SEO #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.d/pr435.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Several small improvements for documentation:

* Add meta description to improve SEO
* Use canonicals on ReadTheDocs (commit 87f639f)
* Pin versions for reproducable doc builds (commit 03fb990)
* Add missing :file:`.readthedocs.yaml` file (commit ec9348a)
* Correct some smaller issues when building (commit f65feab)
4 changes: 4 additions & 0 deletions docs/advanced/combine-pydantic-and-semver.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Combining Pydantic and semver
=============================

.. meta::
:description lang=en:
Combining Pydantic and semver

According to its homepage, `Pydantic <https://pydantic-docs.helpmanual.io>`_
"enforces type hints at runtime, and provides user friendly errors when data
is invalid."
Expand Down
6 changes: 5 additions & 1 deletion docs/advanced/convert-pypi-to-semver.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Converting versions between PyPI and semver
Converting Versions between PyPI and semver
===========================================

.. meta::
:description lang=en:
Converting versions between PyPI and semver

.. Link
https://packaging.pypa.io/en/latest/_modules/packaging/version.html#InvalidVersion

Expand Down
4 changes: 4 additions & 0 deletions docs/advanced/create-subclasses-from-version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Creating Subclasses from Version
================================

.. meta::
:description lang=en:
Creating subclasses from Version class

If you do not like creating functions to modify the behavior of semver
(as shown in section :ref:`sec_dealing_with_invalid_versions`), you can
also create a subclass of the :class:`Version <semver.version.Version>` class.
Expand Down
4 changes: 4 additions & 0 deletions docs/advanced/deal-with-invalid-versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Dealing with Invalid Versions
=============================

.. meta::
:description lang=en:
Dealing with invalid versions

As semver follows the semver specification, it cannot parse version
strings which are considered "invalid" by that specification. The semver
library cannot know all the possible variations so you need to help the
Expand Down
4 changes: 4 additions & 0 deletions docs/advanced/display-deprecation-warnings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Displaying Deprecation Warnings
===============================

.. meta::
:description lang=en:
Displaying and filtering deprecation warnings

By default, deprecation warnings are `ignored in Python <https://docs.python.org/3/library/warnings.html#warning-categories>`_.
This also affects semver's own warnings.

Expand Down
3 changes: 3 additions & 0 deletions docs/advanced/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Advanced topics
===============

.. meta::
:description lang=en:
Advanced topics for Python semver

.. toctree::
:maxdepth: 1
Expand Down
6 changes: 5 additions & 1 deletion docs/advanced/version-from-file.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.. _sec_reading_versions_from_file:

Reading versions from file
Reading Versions from File
==========================

.. meta::
:description lang=en:
Reading versions from file

In cases where a version is stored inside a file, one possible solution
is to use the following function:

Expand Down
4 changes: 4 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
API Reference
=============

.. meta::
:description lang=en:
API reference about Python semver

.. currentmodule:: semver


Expand Down
3 changes: 3 additions & 0 deletions docs/build-semver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Building semver
===============

.. meta::
:description lang=en:
Building semver

.. _PEP 517: https://www.python.org/dev/peps/pep-0517/
.. _PEP 621: https://www.python.org/dev/peps/pep-0621/
Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/add-changelog-entry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
Adding a Changelog Entry
========================

.. meta::
:description lang=en:
Adding a changelog entry with Towncrier

.. include:: ../../changelog.d/README.rst
:start-after: -text-begin-
4 changes: 4 additions & 0 deletions docs/contribute/doc-semver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Documenting semver
==================

.. meta::
:description lang=en:
Documenting semver with type annotations, docstrings, Sphinx directives

Documenting the features of semver is very important. It gives our developers
an overview what is possible with semver, how it "feels", and how it is
used efficiently.
Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/finish-release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Finish the Release
==================

.. meta::
:description lang=en:
Finish the semver release by creating tags

1. Create a tag:

$ git tag -a x.x.x
Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Contributing to semver
======================

.. meta::
:description lang=en:
Contributing to Python semver

The semver source code is managed using Git and is hosted on GitHub::

git clone git://github.com/python-semver/python-semver
Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/prerequisites.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Prerequisites
-------------

.. meta::
:description lang=en:
Overview of prerequisites for contributing

.. -text-begin-

Before you make changes to the code, we would highly appreciate if you
Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/release-procedure.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release Procedure
=================

.. meta::
:description lang=en:
Release procedure: prepare and create the release

The following procedures gives a short overview of what steps are needed
to create a new release.

Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/report-bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Reporting Bugs and Asking Questions
-----------------------------------

.. meta::
:description lang=en:
Reporting bugs and asking questions about semver

If you think you have encountered a bug in semver or have an idea for a new
feature? Great! We like to hear from you!

Expand Down
4 changes: 4 additions & 0 deletions docs/contribute/run-test-suite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Running the Test Suite
======================

.. meta::
:description lang=en:
Running the test suite through tox

We use `pytest`_ and `tox`_ to run tests against all supported Python
versions. All test dependencies are resolved automatically.

Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Semver |version| -- Semantic Versioning
=======================================

.. meta::
:description lang=en:
Semantic versioning for Python

.. include:: readme.rst


Expand Down
4 changes: 4 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Installing semver
=================

.. meta::
:description lang=en:
Installing semver on the system

Release Policy
--------------

Expand Down
3 changes: 3 additions & 0 deletions docs/migration/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Migrating to semver3
====================

.. meta::
:description lang=en:
Migrating from semver version 2 to version 3

.. toctree::
:maxdepth: 1
Expand Down
4 changes: 4 additions & 0 deletions docs/migration/migratetosemver3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Migrating from semver2 to semver3
=================================

.. meta::
:description lang=en:
Migrating from semver2 to semver3

This section describes the visible differences for
users and how your code stays compatible for semver3.
Some changes are backward incompatible.
Expand Down
4 changes: 4 additions & 0 deletions docs/migration/replace-deprecated-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Replacing Deprecated Functions
==============================

.. meta::
:description lang=en:
Replacing deprecated functions

.. versionchanged:: 2.10.0
The development team of semver has decided to deprecate certain functions on
the module level. The preferred way of using semver is through the
Expand Down
4 changes: 4 additions & 0 deletions docs/pysemver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
pysemver |version|
==================

.. meta::
:description lang=en:
Commandline tool pysemver describing all commands and options

Synopsis
--------

Expand Down
4 changes: 4 additions & 0 deletions docs/usage/access-parts-of-a-version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Accessing Parts of a Version Through Names
==========================================

.. meta::
:description lang=en:
Accessing parts of a version through names

The :class:`~semver.version.Version` class contains attributes to access the different
parts of a version:

Expand Down
4 changes: 4 additions & 0 deletions docs/usage/access-parts-through-index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Accessing Parts Through Index Numbers
=====================================

.. meta::
:description lang=en:
Accessing parts through index numbers

.. versionadded:: 2.10.0

Another way to access parts of a version is to use an index notation. The underlying
Expand Down
4 changes: 4 additions & 0 deletions docs/usage/check-compatible-semver-version.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Checking for a Compatible Semver Version
========================================

.. meta::
:description lang=en:
Check for a compatible semver version

To check if a *change* from a semver version ``a`` to a semver
version ``b`` is *compatible* according to semver rule, use the method
:meth:`~semver.version.Version.is_compatible`.
Expand Down
4 changes: 4 additions & 0 deletions docs/usage/check-valid-semver-version.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Checking for a Valid Semver Version
===================================

.. meta::
:description lang=en:
Checking for a valid semver version

If you need to check a string if it is a valid semver version, use the
classmethod :meth:`~semver.version.Version.is_valid`:

Expand Down
4 changes: 4 additions & 0 deletions docs/usage/compare-versions-through-expression.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Comparing Versions through an Expression
========================================

.. meta::
:description lang=en:
Comparing versions through an expression

If you need a more fine-grained approach of comparing two versions,
use the :meth:`~semver.version.Version.match` function. It expects two arguments:

Expand Down
4 changes: 4 additions & 0 deletions docs/usage/compare-versions.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Comparing Versions
==================

.. meta::
:description lang=en:
Comparing versions with semver.compare and the Version class

To compare two versions depends on your type:

* **Two strings**
Expand Down
5 changes: 5 additions & 0 deletions docs/usage/convert-version-into-different-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Converting a Version instance into Different Types
==================================================

.. meta::
:description lang=en:
Converting a version instance into different types


Sometimes it is needed to convert a :class:`~semver.version.Version` instance into
a different type. For example, for displaying or to access all parts.

Expand Down
4 changes: 4 additions & 0 deletions docs/usage/create-a-version.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Creating a Version
==================

.. meta::
:description lang=en:
Creating a version using different methods

.. versionchanged:: 3.0.0

The former :class:`~semver.version.VersionInfo` class
Expand Down
4 changes: 4 additions & 0 deletions docs/usage/determine-version-equality.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Determining Version Equality
============================

.. meta::
:description lang=en:
Determining verison equality

Version equality means for semver, that major, minor, patch, and prerelease
parts are equal in both versions you compare. The build part is ignored.
For example::
Expand Down
4 changes: 4 additions & 0 deletions docs/usage/get-min-and-max-of-multiple-versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Getting Minimum and Maximum of Multiple Versions
================================================

.. meta::
:description lang=en:
Getting minimum and maximum of multiple versions

.. versionchanged:: 2.10.2
The functions :func:`semver.max_ver` and :func:`semver.min_ver` are deprecated in
favor of their builtin counterparts :func:`max` and :func:`min`.
Expand Down