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

Generating dynamic content? #8

Open
atheken opened this issue Jun 21, 2023 · 1 comment
Open

Generating dynamic content? #8

atheken opened this issue Jun 21, 2023 · 1 comment

Comments

@atheken
Copy link

atheken commented Jun 21, 2023

Hi, I am doing a little bit of research on static site generators, specifically in .net, and came across iron-beard. I like how simple it looks, but I have a specific use case and was wondering if you'd be open to a contribution.

Essentially, I want to use a script to pull an external data source during a build, and then have that generate and output some documents.

One way I was looking at doing this would be to implement a virtual filesystem based on IFileSystem that could be unioned with your PhysicalFileSystem - the IFileSystem could possibly pull the content from the external source when files are enumerated, and generate file streams/text streams based on custom logic.

There would probably be the need to introduce some other concept for making the virtual file system pluggable but I was curious if you'd given this sort of use case any thought, or have any interest in expanding this tool to support generation of dynamic content?

@wkallhof
Copy link
Owner

Hey @atheken, that approach sounds reasonable to me! I'm sure that's why I wrote that abstraction. I was probably thinking more about loading static files from S3 buckets or blob storage, etc, but it seems like it would be feasible to shoehorn in some dynamic content loading via the file system route.

I have always considered a more plugin friendly approach for IronBeard that would utilize some sort of plugin folder. At one point I was refactoring IronBeard to have a simple "Middleware" approach to the generation pipeline, and that would make it easy to write plugins and inject them in the correct spot in the pipeline. Alas, I got distracted and moved on.

I'm always open for PRs and contributions!

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

No branches or pull requests

2 participants