Filetype when passing contents to index, why is it required? #164
-
Hi @jameslittle230 , Why does Stork require for filetype even when it's being passed with contents rather than path for index creation? With path, filetype seems fairly intuitive to require for since it needs to determine various parsing strategies etc before tokenizing. But with contents in the input, isn't the first part already done by the client? Then why require for filetype still in input? This is regarding the issue - reese/gatsby-plugin-stork#12 (comment) - we are trying to make it work with gatsby. But it seems to be failing at the index creation step due to failures from stork (and it seems like it's because it needs filetype specifically when passing contents rather than path in index creation). I also tried with the toml file (you can check for this in the same issue thread linked above) by manually passing to stork --build (rather than using the plugin), and it seems to throw a similar error to the one i mentioned above, i.e, stork wasn't able to determine the file type to use based on contents (rather than path) that were passed. If possible can you have a look at the linked entire issue thread and possibly help out here? If it's not related to the filetype resolver issue, and if you can point us in the correct direction that'd be extremely helpful! :) Thanks! :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @ashutoshsaboo! Thanks for writing in. I think @reese has answered your question really well in the linked thread:
For example, I put raw HTML into the There might be an enhancement here where Stork assumes (Also: converting to a Github Discussion because this feels more like a “why does Stork do it this way” question than a bug report or feature request) |
Beta Was this translation helpful? Give feedback.
Hey @ashutoshsaboo! Thanks for writing in.
I think @reese has answered your question really well in the linked thread:
For example, I put raw HTML into the
contents
field for one Stork index I build, and I need to tell Stork that it should parse thecontents
as HTML instead of plaintext.There might be an enhancement here where Stork assumes
PlainText
unless you sp…