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

relative links #9

Open
jonschlinkert opened this issue Jan 16, 2014 · 1 comment
Open

relative links #9

jonschlinkert opened this issue Jan 16, 2014 · 1 comment

Comments

@jonschlinkert
Copy link
Member

@doowb can you think of a clever way to get relative paths to the dest files in the following scenario? https://github.com/helpers/handlebars-helper-compose/tree/master/test/actual/dynamic

Basically, the book.html filesare the index files (I should have named them index.html).

A scenario I had in mind when I created this helper is the ability to include just an excerpt from each of the targeted files (here, chapters), along with a relative link to the actual separately-rendered chapter.html files. make sense?

@doowb
Copy link
Member

doowb commented Jan 16, 2014

The only think I can think of right away is to loop over the pages collection looking for the file with the src that you're looking for and calculate the relative path from the dest.

Either that or if you know (based on your configuration) that the files you use in the compose helper will be rendered to the same relative place as their dest (but you can't know that in all situations).

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

2 participants