Add option to config to avoid_renderizer for types of files #91

Closed
knorthfield opened this Issue Jun 13, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@knorthfield

e.g. CSS

@yosymfony

This comment has been minimized.

Show comment
Hide comment
@yosymfony

yosymfony Jun 15, 2016

Member

You already can use avoid_renderizer attribute with css files like in js files. You only need to add that one to the front matter block or metadata file

Member

yosymfony commented Jun 15, 2016

You already can use avoid_renderizer attribute with css files like in js files. You only need to add that one to the front matter block or metadata file

@yosymfony

This comment has been minimized.

Show comment
Hide comment
@yosymfony

yosymfony Jun 23, 2016

Member

This will be a good feature for Spress 2.2.0

Member

yosymfony commented Jun 23, 2016

This will be a good feature for Spress 2.2.0

@jevets

This comment has been minimized.

Show comment
Hide comment
@jevets

jevets Aug 9, 2016

Would love to see this feature. It'd be great to exclude an entire directory, as well as file types as @knorthfield suggests.

Examples:

  • Package managers w/ directories like bower_components or node_modules, with many files that would throw the renderizer.
  • Inherited a large, nasty bunch of theme jungle files, and it's simply impractical to add a front matter or .meta files.

In my case, I'd want the directories/files copied over during build, just not renderized.

jevets commented Aug 9, 2016

Would love to see this feature. It'd be great to exclude an entire directory, as well as file types as @knorthfield suggests.

Examples:

  • Package managers w/ directories like bower_components or node_modules, with many files that would throw the renderizer.
  • Inherited a large, nasty bunch of theme jungle files, and it's simply impractical to add a front matter or .meta files.

In my case, I'd want the directories/files copied over during build, just not renderized.

@yosymfony

This comment has been minimized.

Show comment
Hide comment
@yosymfony

yosymfony Aug 29, 2016

Member

For this feature I propose a new configuration key called avoid_renderizer (this belong to site scope instead of page scope) with two sub-keys: filename_extension and path. The value of those ones is an array with filename extensions and directories respectively in which to apply the "avoid_renderizer" feature. e.g:

# config.yml
avoid_renderizer:
  filename_extensions: ['css', 'js']
  paths: ['assets'] # relative to `content` folder
Member

yosymfony commented Aug 29, 2016

For this feature I propose a new configuration key called avoid_renderizer (this belong to site scope instead of page scope) with two sub-keys: filename_extension and path. The value of those ones is an array with filename extensions and directories respectively in which to apply the "avoid_renderizer" feature. e.g:

# config.yml
avoid_renderizer:
  filename_extensions: ['css', 'js']
  paths: ['assets'] # relative to `content` folder

yosymfony referenced this issue Aug 30, 2016

Added support for setting up the "avoid_renderizer" attribute using o…
…ptions: "avoid_renderizer_path" and "avoid_renderizer_extension"
@yosymfony

This comment has been minimized.

Show comment
Hide comment
@yosymfony

yosymfony Aug 30, 2016

Member

@jevets, @knorthfield Could you help me with the default values?
e.g:

# config.yml
avoid_renderizer:
  filename_extensions: ['css', 'js']
  paths: ['assets', 'bower_components', 'node_modules'] # relative to `content` folder
Member

yosymfony commented Aug 30, 2016

@jevets, @knorthfield Could you help me with the default values?
e.g:

# config.yml
avoid_renderizer:
  filename_extensions: ['css', 'js']
  paths: ['assets', 'bower_components', 'node_modules'] # relative to `content` folder
@knorthfield

This comment has been minimized.

Show comment
Hide comment
@knorthfield

knorthfield Aug 30, 2016

I think you've pretty much got it. I'd add .json as well. Maybe .svg if they get passed through the renderer.

I think you've pretty much got it. I'd add .json as well. Maybe .svg if they get passed through the renderer.

@jevets

This comment has been minimized.

Show comment
Hide comment
@jevets

jevets Aug 30, 2016

I agree with @knorthfield , defaults look good. I'd rather it not try to do too much automatically, is easy enough to config per-project.

If I run into another worth considering as default, will create a new issue for discussion

jevets commented Aug 30, 2016

I agree with @knorthfield , defaults look good. I'd rather it not try to do too much automatically, is easy enough to config per-project.

If I run into another worth considering as default, will create a new issue for discussion

@yosymfony

This comment has been minimized.

Show comment
Hide comment
@yosymfony

yosymfony Aug 31, 2016

Member

Ok. This is ready. Thank you guys

Member

yosymfony commented Aug 31, 2016

Ok. This is ready. Thank you guys

yosymfony added a commit that referenced this issue Aug 31, 2016

yosymfony added a commit that referenced this issue Aug 31, 2016

An "avoid_renderizer" attribute in the front matter of a file has pri…
…ority on filters set up by "avoid_renderizer" in config.yml file. Related with #91

@yosymfony yosymfony referenced this issue Oct 29, 2016

Closed

The roadmap of Spress 2.2.0 #95

12 of 12 tasks complete

@yosymfony yosymfony closed this May 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment