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

Add multi-part pages #101

Closed
Kaliumhexacyanoferrat opened this issue Oct 3, 2020 · 0 comments · Fixed by #224
Closed

Add multi-part pages #101

Kaliumhexacyanoferrat opened this issue Oct 3, 2020 · 0 comments · Fixed by #224
Labels
enhancement New feature or request
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

As a developer of a web application, I would like to mix rendering technologies within one page, so that I can combine complex technology (e.g. plain HTML + CSS) with simple descriptions (such as Markdown).

Example

var scribanPart = ModScriban.Template<MyModel>(Data.FromFile(...));

var modelProvider = (r, h) => new MyModel();

var markdownPart = new MarkdownRenderer(Data.FromFile(...));

var page = MultiPartPage.Create()
                        .Title("My Page")
                        .Description("My Description")
                        .Add("Plain String") // raw string
                        .Add(scribanPart, modelProvider) // via renderer + model
                        .Add((r, h) => markdownPart.Render()); // via lambda

Acceptance criteria

  • The functionality is implemented in a new pages module
  • The existing PageProvider is moved there as well
  • The new builder implements the IContentInfoBuilder interface
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added the enhancement New feature or request label Oct 3, 2020
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added this to the Version 6.0 milestone Jul 13, 2021
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat linked a pull request Jul 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant