此包已被弃用且不再维护。未建议替代包。

v2.0.1 2020-08-28 13:18 UTC

README

💰 这个对您有用吗?

考虑 在github上赞助我! 🙏

💾 安装

composer require juhlinus/depictr

📝 配置

您可以通过运行如下命令来发布配置: artisan vendor:publish

php artisan vendor:publish --provider="Depictr\ServiceProvider"

🕷 爬虫

以下爬虫默认定义:

return [
    'crawlers' => [
        /*
        |--------------------------------------------------------------------------
        | Search engines
        |--------------------------------------------------------------------------
        |
        | These are the list of all the regular search engines that crawl your
        | website on a regular basis and is the crucial if you want good
        | SEO.
        |
        */
        'googlebot',            // Google
        'duckduckbot',          // DuckDuckGo
        'bingbot',              // Bing
        'yahoo',                // Yahoo
        'yandexbot',            // Yandex

        /*
        |--------------------------------------------------------------------------
        | Social networks
        |--------------------------------------------------------------------------
        |
        | Allowing social networks to crawl your website will help the social
        | networks to create "social-cards" which is what people see when
        | they link to your website on the social network websites.
        |
        */
        'facebookexternalhit',  // Facebook
        'twitterbot',           // Twitter
        'whatsapp',             // WhatsApp
        'linkedinbot',          // LinkedIn
        'slackbot',             // Slack

        /*
        |--------------------------------------------------------------------------
        | Other
        |--------------------------------------------------------------------------
        |
        | For posterity's sake you want to make sure that your website can be
        | crawled by Alexa. This will archive your website so that future
        | generations may gaze upon your craftsmanship.
        |
        */
        'ia_archiver',          // Alexa
    ]
]        

⛔ 排除

Depictr 提供了排除一系列不应处理的 URL 的选项。

这对于像 sitemap.txt 这样的纯文本文件很有用,其中 Panther 会将其包装在一个简化版的 HTML 文件中。允许使用通配符。

默认情况下,在配置文件中排除了 admin 路由及其子路由。

🏞 环境

您可以指定 Depictr 应在哪些环境中运行。默认是 testingproduction