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

Configurable file names and paths #6

Closed
voxpelli opened this issue Feb 11, 2017 · 8 comments
Closed

Configurable file names and paths #6

voxpelli opened this issue Feb 11, 2017 · 8 comments

Comments

@voxpelli
Copy link
Owner

Splitting this up from #5 to keep the discussions around this in one place as it's probably the major change needed to fully support Hugo, the rest of the changes in #5 are fairly minor.

As stated in #5 this is fairly similar to voxpelli/webpage-micropub-to-github#8 and could probably use the same mechanism for both.

@keithjgrant added some comments: #5 (comment)

@voxpelli
Copy link
Owner Author

@keithjgrant Some feedback:

Regarding the use of jekyllUtils.generateUrl() – that's a straight port of the code Jekyll is using to generate a URL, so I'm a bit hesitant to use that for Hugo, but if Hugo doesn't have any slug generation of it's own – then maybe it could be pretty okay to use.

Also: I would probably create a new method that could be used in both formatFilesFilename() and formatFilename(), that would be given something similar to permalinkStyle and then generate an appropriate path and filename. I would then move the default path and filename to just be default values of those new permalinkStyle options so that there's only one mechanism for generating them all.

voxpelli added a commit that referenced this issue Feb 11, 2017
Adds new filenameStyle property.

Change mentioned in #6
@voxpelli
Copy link
Owner Author

@keithjgrant I went ahead and added a simple mechanism for filenames, let me know any feedback you might have on it!

@keithjgrant
Copy link

That looks good. I'm trying to test integration with micropub-to-github... having some troubles though. Possible b/c I'm not too familiar with Heroku

@keithjgrant
Copy link

keithjgrant commented Feb 13, 2017

I've done some integration testing w/ my site. I added some changes to webpage-micropub-to-github to allow configuration of the filenameStyle (https://github.com/keithjgrant/webpage-micropub-to-github/commits/master), which is in turn passed into this lib as an option.

I now have notes, replies, and likes working, each writing to their own respective directory (with matching permalinks).

Not sure if there's more you have in mind for this ticket, but I think your changes support everything I need for my use case at this point.

@voxpelli
Copy link
Owner Author

I will consider #7 as well before I close this, then I'll tag a version and update the micropub-to-github project

@keithjgrant
Copy link

keithjgrant commented Mar 7, 2017

As soon as this is tagged, I can submit a PR to webpage-micropub-to-github that has the integration setup (passing the config value into this lib)

(see: commits on https://github.com/keithjgrant/webpage-micropub-to-github/commits/master from Feb 11)

@voxpelli
Copy link
Owner Author

voxpelli commented May 4, 2017

@keithjgrant Sorry for not having responded! The last two months has for a variety of reasons not seen a lot of time for open source work. I'll try to make a release asap.

@voxpelli
Copy link
Owner Author

Tagged and released as 0.10.0, I'll take a look at adding the changes to webpage-micropub-to-github now and will follow up on that in voxpelli/webpage-micropub-to-github#18

Closing this issue as fixed. Once again: Sorry for the delay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants