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

Pass filename through to HTML pipeline #56

Merged
merged 3 commits into from
Jun 29, 2018

Conversation

ind1go
Copy link
Contributor

@ind1go ind1go commented Jun 27, 2018

I think I can achieve #51 (relative hrefs) through a mixture of a custom html-pipeline filter and some code in some custom layouts. However, in order to do so I need to know the filename that the file is being written to. This allows me to determine the 'depth' relative to some base path of the current file, and therefore add the right number of ../ entries to get out of there.

This pull request passes the filename through to the pipeline's context (on a per-file basis rather than the overarching pipeline-wide context).

Fixes #51.

@ind1go ind1go force-pushed the filename-context branch from 296db2b to 5f1338f Compare June 27, 2018 19:50
@ind1go
Copy link
Contributor Author

ind1go commented Jun 27, 2018

Tests pass again after rebasing on your most recent PR. 👍

@gjtorikian
Copy link
Collaborator

This looks great. Thank you so much.

@gjtorikian gjtorikian merged commit 674e244 into brettchalupa:master Jun 29, 2018
@ind1go
Copy link
Contributor Author

ind1go commented Jun 29, 2018

Thanks for considering it 👍

@ind1go ind1go deleted the filename-context branch June 29, 2018 13:14
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.

2 participants