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 custom-head (like custom-foot) and add options #56

Open
evanwill opened this issue Apr 23, 2023 · 1 comment
Open

add custom-head (like custom-foot) and add options #56

evanwill opened this issue Apr 23, 2023 · 1 comment

Comments

@evanwill
Copy link
Contributor

avoid all the annoying if logic in head by adding custom-head approach like custom-foot use.
in my other templates, there is two options for both head and foot: custom include and/or direct string.
Currently CB only has custom foot include.
For adding the required css in the head, it would be more handy to have a custom head that just adds the string directly (rather than having to go and write up a separate include for each.

Maybe foot/head would just be add a string, and custom-foot/custom-head could be custom include.

e.g. on data layout,

---
# "Data" page with table and data download options
layout: page
head: <link rel="stylesheet" type="text/css" href="{{ '/assets/lib/datatables/datatables.min.css' | relative_url }}">
custom-foot: js/table-js.html 
---

this makes customized pages much easier to keep self contained (but still optimized) without spidering into needing to edit logic in other places.

@evanwill
Copy link
Contributor Author

unfortunately the idea for head described above doesn't quite work because you can't get the liquid in the link to evaluate anywhere because the front matter values are always treated as plain text with the liquid ignored...

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

1 participant