Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get "fields" like last mod date? Setting "field" in options does nothing. #145

Open
pronode opened this issue Aug 18, 2024 · 2 comments

Comments

@pronode
Copy link

pronode commented Aug 18, 2024

So I set options like this:

const sitemap = new Sitemapper({ url: host, field: { loc: true, lastmod: true, changefreq: true, priority: true } });

and then

sitemap
	.fetch()
	.then(function (data) {
		console.log(data);
	});

But this just displays an array of sites, nothing more.

Am I missing something here?

@pronode pronode changed the title How to get "fields" like last mod date? Setting "fields" in options does nothing. How to get "fields" like last mod date? Setting "field" in options does nothing. Aug 18, 2024
@PhoenixR49
Copy link

I have the same problem

@rchiba
Copy link
Contributor

rchiba commented Nov 7, 2024

I encountered the same issue, and then realized that it is actually "fields" even though the README incorrectly states that it is "field". Related pull request to update the documentation: #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants