-
Notifications
You must be signed in to change notification settings - Fork 116
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
Generate redirect_to content for collections #46
Generate redirect_to content for collections #46
Conversation
Yeah, no matter what, it seems like |
That |
Is |
It looks like |
def setup_doc | ||
@site.collections["articles"].docs.first | ||
def setup_doc(doc_filename) | ||
@site.collections["articles"].docs.find { |d| d.path.match(doc_filename) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use relative_path
here
I've just pushed up a change to sort of demonstrate what I mean. With But with a collection, somehow, the item's original contents remain. Right now, "a" fix for this is to overwrite |
Guh, maybe this is impossible. The "HTML" that gets generated looks like this:
The smart curly quotes are also bothering Ruby 1.9.3. |
For the redirect_to file, make it an HTML page instead of a MD page. |
80e281e
to
56ac244
Compare
Of course! Thanks for the hint. Rebased some of my commits above for a cleaner history, and added a note as such to the README about this. |
56ac244
to
235e3b9
Compare
BTW, everything I hate about programming is encapsulated in this PR. "Oh I'll just do one quick thing this afternoon...." |
235e3b9
to
ec4a352
Compare
I'm 😦 but also 😆 so hard. ❤️ for sticking through it. This is looking really good to me. What do you think? |
If it looks good to you that's great for me. I don't think this needs another security review, so you can probably just update the PR on |
LET'S DO THIS THANG |
This should close #45, when the tests pass. Looks like
redirect_to
pages are not being generated for collections./cc @parkr Will probably necessitate another (minor) bump.