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

Possible to set per page document title/meta? #3

Open
andregoldstein opened this issue May 13, 2021 · 0 comments
Open

Possible to set per page document title/meta? #3

andregoldstein opened this issue May 13, 2021 · 0 comments

Comments

@andregoldstein
Copy link

andregoldstein commented May 13, 2021

Not sure if this should be easily possible or not in this SSR version but should it be possible to set document titles or meta tags that appear on page load (ie would be picked up in view-source or for SEO purposes)

Am pretty sure stuff like

def setup
  document.title = "My Page"

is just for the client side.

I suppose just have to make some sort of switch statement in the server file and set the document title there? Eg:

let title = "Imba SSR"
	
switch req.url
  when "/"
    title = "Home | Imba SSR"
  when "/about"
    title = "About | Imba SSR"
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