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

Generated sitemap should not exclude pages matched by config skip_render #148

Open
dharFr opened this issue Dec 31, 2022 · 2 comments
Open

Comments

@dharFr
Copy link

dharFr commented Dec 31, 2022

Hi there,

Hexo configuration documentation claims that skip_render setting contains "Paths that will be copied to public raw, without being rendered". As far as I understand this implies those files will be deployed as they are, not that they will be ignored.

The provided example, copied/pasted bellow, suggest the same:

skip_render: "mypage/**/*"
# will output `source/mypage/index.html` and `source/mypage/code.js` without altering them.

→ In this example, source/mypage/index.html will be deployed and then it should be included in the sitemap.

Not sure what would be the best approach to address this, but it seems to me files matched by the skip_render setting shouldn't be excluded from the generated sitemap (or at list a subset of them, such as .html files for example).

Best

@stevenjoezhang
Copy link
Member

Relevant code here:

if (Array.isArray(skip_render)) {
skipRenderList.push(...skip_render);
} else if (typeof skip_render === 'string') {
if (skip_render.length > 0) {
skipRenderList.push(skip_render);
}
}

@uiolee
Copy link
Member

uiolee commented Feb 8, 2023

skip_render will be ignored. if you have a few files, you can copy template and add yout files in it.

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