algoo / jfmengine

A soft fork of JSSG for algoo websites use case
Other
0 stars 0 forks source link

Add a CLI command allowing to check metadata #15

Closed lebouquetin closed 2 months ago

lebouquetin commented 3 months ago

In web pages, metadata allow to improve searchability of the pages (SEO).

A CLI command which help to detect which pages are well documented and which ones are not would be very helpful.

Expected:

A a list of metadata keys to be found in every content, something like:

JFME_CONTENT_REQUIRED_METADATA=[
    "title", "slug", "description", "language", "lang", "og:title", "og:description", "og:type",
    "og:site_name", "og:url", "og:image", "og:locale"
]

The when running the CLI command the result would be to identify missing metatada.

./manage.py check-metadata [--verbose] [content path]

which would return a status for all pages with a percentage (x% computed based on required metadata found vs required metadata total number)

Example of result:

80% fr-index.md
90% en-index.md
✓✓✓ dns-generator.md

Example of verbose result:

80% fr-index.md
    - og:image is missing
    - language is empy
90% en-index.md
    - og:site_name is empty
✓✓✓ dns-generator.md
ClmntBcqt commented 2 months ago

Merged in #36