Expand description
IndexNow for Laravel Rust: tell search engines a URL changed, the moment it changes.
IndexNow is a small protocol: you publish a key file on your domain, then POST the URLs that changed. Bing, Yandex, Seznam, Naver and Yep consume it, and one submission to the shared endpoint reaches all of them. Google does not participate, so this complements your sitemap, it does not replace it.
This crate wires the protocol into your models, so publishing a post submits its URL and unpublishing it submits the URL again, which is the part most implementations miss.
ⓘ
IndexNowServiceProvider::new().track(
indexnow::track::<Post>()
.url_template("https://example.com/blog/{slug}")
.when_holds("status", "published"),
)It is the port of the PHP package edulazaro/laraindexnow
to Laravel Rust 0.1 (beta), and its API follows the framework’s changes until 1.0.
Re-exports§
pub use config::Driver;pub use config::IndexNowConfig;pub use config::LogMode;pub use events::SubmissionFailed;pub use events::UrlsSubmitted;pub use keys::KeyRepository;pub use manager::IndexNow;pub use manager::IntoUrls;pub use manager::without_submissions;pub use policy::Policy;pub use provider::IndexNowServiceProvider;pub use record::Change;pub use record::ChangeKind;pub use record::Record;pub use registration::Op;pub use registration::Registration;pub use result::RetryableSubmission;pub use result::SubmissionResult;pub use source::Page;pub use source::Source;pub use sources::ModelSource;pub use sources::SitemapSource;pub use submitter::Fake;pub use submitter::Submitter;pub use value::Attr;
Modules§
- config
- console
- events
- jobs
- keys
- manager
- observer
- policy
- provider
- record
- registration
- result
- source
- sources
- submitter
- support
- tracked
- value
Functions§
- fake
- Replace the transport with one that records what would have been submitted, and bypass the
queue. Assert on the returned
Fake. - manager
- The IndexNow service of the running application.
- sitemap
- Register a sitemap, or a sitemap index, as a source while the application runs.
- source
- Register a source for
indexnow:duewhile the application runs. - sources
- The sources
indexnow:duereads. - submit
- Buffer URLs and let the queue send them. Sent inline when the queue is disabled.
- submit_
model - Submit the URL of a tracked record, resolved from its registrations.
- submit_
now - Send URLs inline and return what the endpoint said.
- track
- Start tracking a model. Chain the rules on the returned
Registrationand hand it toIndexNowServiceProvider::track.