maddevsio / seo-analyzer

The library for analyze a HTML file to show all of the SEO defects
MIT License
78 stars 12 forks source link

Links not found #19

Open ollebergkvist opened 1 year ago

ollebergkvist commented 1 year ago

I'm trying to run the seo-analyzer in a Next.js (13.2.3) project.

But I'm getting the following output: 🚀 Ready on http://localhost:3000

🚀 Get sitemap from http://localhost:3000

❌ Links not found

Sitemap is generated by next-sitemap on build and is exported to the public folder.

I guess the issue is that seo-analyzer can't detect the sitemap?

I've verified that the sitemap is reachable via http://localhost:3000/sitemap.xml in local development.

How can I resolve this?

Many thanks in advance!

seo-analyzer.js
require('dotenv').config()
const SeoAnalyzer = require('seo-analyzer')

new SeoAnalyzer()
  .inputNextJs(3000)
  .addRule(
    'titleLengthRule',
    { min: 10, max: 50 },
    'imgTagWithAltAttributeRule',
    'aTagWithRelAttributeRule',
    'metaSocialRule',
    {
      properties: [
        'og:url',
        'og:type',
        'og:site_name',
        'og:title',
        'og:description',
        'og:image',
        'og:image:width',
        'og:image:height',
        'twitter:card',
        'twitter:text:title',
        'twitter:description',
        'twitter:image:src',
        'twitter:url',
      ],
    },
    'canonicalLinkRule'
  )
  .outputConsole()
public/
┣ admin/
┃ ┣ assets/
┃ ┣ .gitignore
┃ ┗ index.html
┣ fonts/
┃ ┣ HelveticaNowText-Bold.woff2
┃ ┗ HelveticaNowText-Regular.woff2
┣ scripts/
┃ ┣ scrollbar-width.js
┃ ┣ smartlook.js
┃ ┣ theme.js
┃ ┗ window-height.js
┣ styles/
┃ ┣ globals.css
┃ ┗ swiper.css
┣ favicon.ico
┣ logotype.svg
┣ og_default.png
┣ prisjakt.png
┣ sitemap.xml
┗ sponsors.webp
.next/
┣ cache/
┃ ┣ images/
┃ ┣ swc/
┃ ┣ webpack/
┃ ┗ next-server.js.nft.json
┣ server/
┃ ┣ chunks/
┃ ┣ pages/
┃ ┣ font-loader-manifest.js
┃ ┣ font-loader-manifest.json
┃ ┣ font-manifest.json
┃ ┣ middleware-build-manifest.js
┃ ┣ middleware-manifest.json
┃ ┣ middleware-react-loadable-manifest.js
┃ ┣ pages-manifest.json
┃ ┣ webpack-api-runtime.js
┃ ┗ webpack-runtime.js
┣ static/
┃ ┣ Yv9_L8DMQcC1hKfxrYKCn/
┃ ┣ chunks/
┃ ┣ css/
┃ ┗ media/
┣ BUILD_ID
┣ build-manifest.json
┣ export-marker.json
┣ images-manifest.json
┣ next-server.js.nft.json
┣ package.json
┣ prerender-manifest.json
┣ react-loadable-manifest.json
┣ required-server-files.json
┣ routes-manifest.json
┗ trace