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

feat: add generate sitemap.txt #136

Merged
merged 4 commits into from
Feb 22, 2022
Merged

feat: add generate sitemap.txt #136

merged 4 commits into from
Feb 22, 2022

Conversation

uiolee
Copy link
Member

@uiolee uiolee commented Feb 13, 2022

  • default generate sitemap.txt and sitemap.xml
  • generator.js add judge path string or array
  • template.js add extname(path) to chose template
sitemap:
    path:
    - sitemap.xml
    - sitemap.txt	#remove it to disable
    template_txt: sitemap.txt	#(optional)

- default generate `sitemap.txt` and `sitemap.xml`
- `generator.js` judge `path` string or array
- `template.js` `extname(path)` to chose template
```
sitemap:
    path:
    - sitemap.xml
    - sitemap.txt	#remove it to disable
	template_txt: sitemap.txt	#(optional)
```
@coveralls
Copy link

coveralls commented Feb 14, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling be922a3 on uiolee:master into 947e5c3 on hexojs:master.

testcode: fix generator.js coverage branch coverage 100% and add txt test.
@uiolee uiolee closed this Feb 16, 2022
@uiolee uiolee reopened this Feb 16, 2022
tomap
tomap previously approved these changes Feb 18, 2022
@tomap
Copy link
Contributor

tomap commented Feb 18, 2022

Looks ok. In which case would you need a txt file?

@tomap
Copy link
Contributor

tomap commented Feb 18, 2022

Looks ok. I. Which case would you need a txt file?

Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uiolee
Thank you for your contribution :)

Would you please delete a comment out code?
And please update the options section in the README.

lib/template.js Outdated Show resolved Hide resolved
test/index.js Outdated Show resolved Hide resolved
test/index.js Outdated Show resolved Hide resolved
test/index.js Outdated Show resolved Hide resolved
@yoshinorin
Copy link
Member

@tomap

However, in addition to the XML protocol, we support RSS feeds and text files, which provide more limited information.
https://www.sitemaps.org/protocol.html#otherformats

According to the Sitemaps specifications, it can be provided as text file. IMHO we can accept this because this PR is based on the specifications.

@uiolee
Copy link
Member Author

uiolee commented Feb 20, 2022

@tomap

Looks ok. I. Which case would you need a txt file?

txt file function as xml file. a few search engines support both xml and txt.

in my own case, i summit both txt and xml file to search engines.
on the other hand, i use txt file to include my site's urls, then i can summit they conveniently by API or manual.

Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uiolee

LGTM.
Thank you for your contribution :)

We are going to publish a new version.

@yoshinorin yoshinorin merged commit 4e89ead into hexojs:master Feb 22, 2022
@yoshinorin
Copy link
Member

@uiolee

We published a new version.
Thank you :)

https://github.com/hexojs/hexo-generator-sitemap/releases/tag/3.0.0

@SukkaW SukkaW mentioned this pull request Mar 11, 2022
SukkaW added a commit that referenced this pull request Mar 11, 2022
uiolee added a commit to uiolee/hexo-generator-sitemap that referenced this pull request May 1, 2023
@uiolee uiolee changed the title (feat) add generate sitemap.txt feat: add generate sitemap.txt Aug 15, 2023
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

Successfully merging this pull request may close these issues.

None yet

4 participants