Skip to content

Releases: bojieyang/indexnow-action

v2.0

22 Jan 09:09
99fa50c
Compare
Choose a tag to compare

What's Changed

  • Upgrade nodes version to v20.
  • Use native fetch api instead of cross-fetch.
  • Fix issue #136 by @TheJiahao.

New Contributors

v1.1.2

25 Jun 04:22
054229e
Compare
Choose a tag to compare

Upgrade fast-xml-parser to 4.2.5 to fix regex vulnerability security issue.

IndexNow Action

13 Mar 09:05
v1
054229e
Compare
Choose a tag to compare

A GitHub Action that automatically submits URLs to participating search engines through the IndexNow protocol.

Usage

Prerequisites

The key file has been obtained from IndexNow and added to your website.

If you don't know how to get the key file, see IndexNow Document.

Basic

steps:
  # v1 is the latest major version following the action-versioning guide.
  - uses: bojieyang/indexnow-action@v1
    with:
      sitemap-location: "https://example.com/sitemap.xml" # your sitemap location, must start with http(s).
      key: ${{ secrets.INDEXNOW_KEY }} # The key you get from IndexNow.

Examples

A complete example used in my blog shows below:

name: "IndexNow"
on:
  schedule:
    # Set the schedule time
    - cron: "0 2 * * *"

jobs:
  check-and-submit:
    runs-on: ubuntu-latest
    steps:
      - name: indexnow-action
        uses: bojieyang/indexnow-action@v1
        with:
          sitemap-location: "https://bojieyang.github.io/sitemap.xml"
          key: ${{ secrets.INDEXNOW_KEY }}

View code from here.

Inputs

  • sitemap-location
    required.
    The location of sitemap file in your website. Must start with https or http(e.g., https://example.com/sitemap.xml).

  • key
    required.
    The IndexNow key that you get from search engines.

    Note DO NOT stored as plaintext in the workflow file. Use GitHub Secrets instead.
    More about GitHub Secrets, see Encrypted Secrets.

  • key-location
    optional.
    Location of the IndexNow key file that you customed.
    If not set, it will assume that there is a file named {your-indexnow-key}.txt in the root directory of the website(e.g., https://example.com/{your-indexnow-key}.txt).

    Note DO NOT stored as plaintext in the workflow file. Use GitHub Secrets instead.
    More about GitHub Secrets, see Encrypted Secrets.

  • since
    optional.
    The lastmod field in the sitemap that for past {n} {since-unit} will be submit. The default value is 1.

  • since-unit
    optional.
    The unit of since. Available units are minute, hour, day, week, month and year. The default value is day.

  • endpoint
    optional.

    The endpoint of a special search engine. Available units are api.indexnow.org, www.bing.com, search.seznam.cz and yandex.com. For more details, see: IndexNow FAQ. The default value is www.bing.com.

  • limit
    optional.
    The upper limit for submitting URLs. The default value is 100.

  • timeout
    optional.
    The timeout both fetch sitemap and submit to the search engine in milliseconds. The default value is 10000 (10 seconds).

  • failure-strategy
    optional
    Define the strategy when submit failed. Available strategy are ignore and error.
    For ignore, will outputting an notice only.
    For error, outputting an error message also sets the status of action to fail. The Default value is ignore.

Maintainers

@bojeyang

Acknowledgements

Use @seantomburke/sitemapper to fetch and parse sitemap.

Contributing

Contributions are welcome! Please create an issue and if applicable, a design before proceeding with code.

License

The scripts and documentation in this project are released under the MIT License

v1.1.1

08 Jun 02:55
Compare
Choose a tag to compare

Security

  • Upgrade fast-xml-parser to 4.2.4 to fix entity parsing issue.

v1.1.0

31 Mar 15:39
86bea77
Compare
Choose a tag to compare

Added

  • Support RSS 2.0 and Atom 1.0 format as sitemap.

v1.0.0

12 Mar 07:47
f0e154a
Compare
Choose a tag to compare

This is a GitHub Action that automatically submits URLs to participating search engines through the IndexNow protocol.