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

Allow individual files to opt out or override URLs set by this plugin #12

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

Conversation

bguiz
Copy link

@bguiz bguiz commented Jul 8, 2014

This patch would allow individual files to opt out from having their URLs set by this plugin, via a flag in file metadata, e.g.

----
dateurls-exclude: true
----

Alternatively, one may override the URLs manually, e.g.

----
dateurls-override: "/2018/07/08/this-post-appears-in-the-future"
----

bguiz added 2 commits July 8, 2014 22:26
…this plugin

via a flag in file metadata - dateurls-exclude: true
in metadata - dateurls-override: "/2018/07/08/this-post-appears-in-the-future"
(removed console logs)
@bguiz bguiz changed the title =BG= allow individual files to opt out from having their URLs set by thi... =BG= allow individual files to opt out from having their URLs set by this plugin Jul 8, 2014
@bguiz bguiz changed the title =BG= allow individual files to opt out from having their URLs set by this plugin Allow individual files to opt out or override URLs set by this plugin Jul 8, 2014
@bguiz
Copy link
Author

bguiz commented Jul 9, 2014

... any thoughts?

@markgrovs
Copy link
Contributor

Thanks, looks interesting. The exclude option seems pretty straight forward. The override looks like to could use a bit more error checking, in situations where the override path is invalid. Thoughts?

@bguiz
Copy link
Author

bguiz commented Jul 10, 2014

On 10 July 2014 14:14, Mark Groves [email protected] wrote:

Thanks, looks interesting. The exclude option seems pretty straight
forward. The override looks like to could use a bit more error checking, in
situations where the override path is invalid. Thoughts?

Ah, that did not cross my mind. Let's see, off the top of my head, I think
the following would be necessary:

  • path begins with /
    • 'foo/bar' --> /foo/bar
  • clean up trailing / according to options passed in
    • '/foo/bar/' --> /foo/bar (if that's what the options configured)
  • discard any hash fragments
    • /foo#bar --> /foo
  • special characters escaped
    • /foo bar --> /foo%20bar

Any others come to mind?


Reply to this email directly or view it on GitHub
#12 (comment)
.

@bguiz
Copy link
Author

bguiz commented Jul 14, 2014

@mgroves84 If you OK my list of checks above, I'll be happy to submit a PR, just waiting on your response.

@markgrovs
Copy link
Contributor

@bguiz thanks looks good. Please PR

@balupton
Copy link
Member

balupton commented Aug 1, 2019

I have become too preoccupied by other things to review, merge, and release this PR.

However, you should have received an invite a while ago to join the DocPad Extras Team, which will give you write access to this repository, so you can merge in the PR.

For an orientation, or if you need any assistance following the semi-automatic release process from CONTRIBUTING.md, reach out via https://bevry.me/discord/dev

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.

3 participants