Still.Preprocessor.OutputPath (Still v0.8.0) View Source

Sets the output path of a file. If the key :permalink is present in the metadata, it is used as the output path. If not, the output path is set using the :input_file and :extension keys.

:permalink can use EEx interpolation and reference most variables that would have been available in the templates. For instance, combined with pagination, one can change the generated output like so:

permalink: data/<%= pagination.page_nr + 1 %>.html
pagination:
  data: some.global.data
  size: 3
---

# Page <%= pagination.page_nr + 1 %>

So the first page is data/2.html instead of the default data/1.html.

This preprocessor is bypassed when the :output_path key is already set.

Link to this section Summary

Functions

Runs after the next preprocessors finish running.

Runs the current preprocessor and invokes the next one.

Runs the Elixir.Still.SourceFile through the current preprocessor and the next.

Link to this section Functions

Link to this function

after_render(source_file)

View Source

Runs after the next preprocessors finish running.

Returns the resulting Elixir.Still.SourceFile.

Runs the current preprocessor and invokes the next one.

Returns the resulting Elixir.Still.SourceFile.

Runs the Elixir.Still.SourceFile through the current preprocessor and the next.

Link to this function

run(source_file, next_preprocessors)

View Source