Page prevents common page degradation scenarios, which lead to gradual loss of page ranking:
- Losing relevant metadata when changing HTML view templates or database models.
- Duplicating metadata fields on the same page.
- Duplicating metadata on different publicly available pages.
- Forgetting to enforce minimum and recommended metadata field sizes.
- Forgetting to enforce UTF normalization on page content.
The library works by providing a reasonable Goland test suite and a command line tool that any HTML page should pass in order to fit current search engine optimization expectations.
None of the top website fit the "best practice." This indicates that companies are not regularly testing search engine optimization in between hiring consultants.
When page tests run with --short flag, all external page
resources are not loaded or checked.
go get -u github.com/dkotik/pageseo@latestimport (
"bytes"
"testing"
"github.com/dkotik/pageseo"
)
func TestSearchEngineOptimization(t *testing.T) {
validator := pageseo.NewStrict(
pageseo.Requirements{
// override requirements as needed
Title: pageseo.NewTitleValidator(
pageseo.StringConstraints{
MinimumLength: 12,
MaximumLength: pageseo.DefaultMaximumTitleLength * 4,
Normalizer: pageseo.NomalizeLineToNFC,
},
),
},
)
t.Run("index.html", validator.TestReader(
t.Name(), // identify the origin for content de-duplication
bytes.NewReader([]byte("<html><p>index</p></html>")),
))
t.Run("sitemap.html", validator.TestReader(
t.Name(), // identify the origin for content de-duplication
bytes.NewReader([]byte("<html><p>sitemap</p></html>")),
))
}- MacOS:
brew tap dkotik/tap brew install curl pageseo
- Debian Package: latest release
- Linux Binary: latest release
- Windows Binary: latest release
- Build from source:
go install github.com/dkotik/pageseo/cmd/pageseo@latest
pageseo --strict --verbose --failfast=false ./**/*.html- Provide a command line scanner that can crawl live websites.
- Provide a command line scanner that can validate statically generated websites.
- Unique contraint by namespace with a namespace flag for CLI.
- Add missing social validators, as image and URL are not tested: opengraph.go:55: unknown Open Graph properties: opengraph.go:57: - og:image:height opengraph.go:57: - og:image:type opengraph.go:57: - og:image:width twitter.go:58: unknown Twitter properties: twitter.go:60: - twitter:image:alt
- analyze
fb:meta data - load /sitemap
- support
--jsontag and redirect t.Output() writers to t.Attr() - Provide a service that can crawl a target at an interval, and pause at failing crawl until the issue is fixed.
- add
monitorcommand that rescans the website daily for SEO purity and broken links - Validate image sizes.
- Validate dependencies in style sheets.
- Front-end Check List: an extended page validation list.
- SEO Crawler: unmaintained.
- Astro SEO Plugin.