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

Describe how to show Banner / Intro on other pages #17

Open
suchja opened this issue May 13, 2024 · 2 comments
Open

Describe how to show Banner / Intro on other pages #17

suchja opened this issue May 13, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@suchja
Copy link
Owner

suchja commented May 13, 2024

Although this is not that complicated, the documentation of it requires time. therefore I currently skip this and maybe someone likes to figure out how it works and document it here. Currently I guess this will be pretty seldomly used.

@suchja suchja added enhancement New feature or request good first issue Good for newcomers labels May 13, 2024
@suchja
Copy link
Owner Author

suchja commented May 13, 2024

I started with this section, but realized that it gets a little more complicated. Therefore here is what I wrote so far. Maybe it is of any value later on:

By default the banner as well as the intro is only shown on the homepage. However, if you fancy, you can add it to any static page. You do need to create a separate _layout.cshtml (e.g. _layout-page-with-banner.cshtml) file in your input folder. You can use the _layout.cshtml content as starting point for the new file. Then you change the parts to your liking (e.g. remove the condition on rendering the banner and remove the intro as well).

For this to work you then need to specify the following front matter variable in each page that should use this layout: `layout:

@suchja
Copy link
Owner Author

suchja commented May 13, 2024

The Demo Project should include a branch show casing this scenario. This shows also, that more modification is required, because currently only the Image variable is used and thus it is only possible to configure one image for a page.

However, for this to work properly it would at least be required that the image is only show for the banner and not in the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant