docs(api/filter): before_post_render & after_post_render process all files#1506
Closed
curbengh wants to merge 1 commit intohexojs:masterfrom
Closed
docs(api/filter): before_post_render & after_post_render process all files#1506curbengh wants to merge 1 commit intohexojs:masterfrom
curbengh wants to merge 1 commit intohexojs:masterfrom
Conversation
SukkaW
reviewed
Aug 8, 2020
source/api/filter.md
Outdated
| }); | ||
| ``` | ||
|
|
||
| This filter matches every files in the `source/` folder, it may be necessary to skip non-markdown files, unless those files are listed in [`config.skip_render`](/docs/configuration#Directory); `themes/<your-theme>/source/` folder is not processed by this filter. |
Member
There was a problem hiding this comment.
Last time I checked, before_post_render only processes files under source/_posts directories.
Contributor
Author
There was a problem hiding this comment.
I did a check before this PR, both before_post_render and after_post_render processes everything in source/.
hexo.extend.filter.register('after_post_render', function(data){
if (data.source.endsWith('.md') === false) console.log(data.content.substring(0, 50))
return data;
});I put a CSS file source/css/foo.css and it did show the file content, including in before_post_render filter.
Contributor
Author
There was a problem hiding this comment.
can confirm issue https://repl.it/repls/DefenselessHightechFormats#index.js
5 tasks
62e2042 to
586f9b4
Compare
586f9b4 to
5555fb4
Compare
Member
|
Will be fixed in hexojs/hexo#5118 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #581
Check List
Please read and check followings before submitting a PR.
nameis unique.linkURL is correct.previewURL is correct.previewURL web site is rendered correctly.source/themes/screenshots.name.800 * 500.png.nameis unique.linkURL is correct.enEnglishkoKoreanpt-brBrazilian PortugueseruRussianthThaizh-cnsimplified Chinesezh-twtraditional Chinese