-
Notifications
You must be signed in to change notification settings - Fork 67
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 Processing Before Metalsmith-In-Place #88
Allow Processing Before Metalsmith-In-Place #88
Comments
A PR allowing the ability to provide a pattern would resolve this issue. |
I am not quite sure what you mean. |
A file_pattern to match. E.g.: permalinks({
file_pattern: '*.html'
}) |
@woodyrew @jcrawford added .use(permalinks({ rename: false }))
.use(inPlace()) Until this is looked at I'm using my own plugin for my specific use case if anyone else needs it. |
@woodyrew is this still open for submissions? Happy to push out a quick PR that enables file pattern matching, as well as the option to preserve original extensions. |
What about instead of adding a
This would also enable e.g. creating static JSON API's from yml definition files. |
Hmm this is a tough issue. The current pattern option would better be renamed to |
It appears that metalsmith-permalinks must be run after metalsmith-in-place as it requires the use of an HTML file
I have a plugin that will process the markdown of my files and create indexes in Algolia for searching, this is working perfectly breaking each document up into chunks, however there is one gotcha that I have been hitting.
I have to provide a URL for my Algolia objects so that the search component knows where to link to. There could also be anchor links in my markdown which are processed so I end up with something like this.
As you can see there is a link attribute that is sent to Algolia with the json document(s).
Since permalinks cannot be run before metalsmith-in-place I cannot run it prior to my plugin which means I cannot get access to what the final path will be after permalinks is run.
I am trying to make this plugin modular so that anyone could use it and not simply for my project.
Is there any way that I can get at what the permalink would be or would it be tough to allow this to process before metalsmith-in-place? I was going to process the HTML but processing the markdown turned out far easier. I even explored converting the html to markdown and then processing it that way but that was even more tough to process.
The text was updated successfully, but these errors were encountered: