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

Add current.base and tests for all of current #31

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kennethormandy
Copy link
Collaborator

I accidentally did this on top of the branch with all the preprocessor updates, sorry about that.

current.source and current.path tests

Unfortunately my git skills aren’t good enough to sort all that out. I believe you would want everything from kennethormandy@2826c38 though, as it has the current.path and current.source tests.

current.base

Essentially, current.base is a string of ../s for current.path.length. I haven’t tested it on Windows yet, I’m not sure where your path fixes happen, so that could be an issue.

Alternatively, some kind of url function

For current.base, as we discussed, it’d probably be better to have a function, something like:

a(href=path("about")) About

…so you could compile with with relative or absolute links, or have an .html extension tacked on as appropriate. It would also have to check to see if there was an extension already, because if you had an image, you might still want the relative pathing:

<img src="<%- url("img/example.jpg") %> />

It’s possible that current.base could still be useful, and the path() function or whatever we call it could use it.

@agibsen
Copy link

agibsen commented Aug 5, 2015

What is the status on this?

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