sbt-typelevel icon indicating copy to clipboard operation
sbt-typelevel copied to clipboard

Add a 404 page for sbt-typelevel-site

Open armanbilge opened this issue 3 years ago • 4 comments

If we add it to the theme, users get it for free while still being able to override it themselves.

https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site

armanbilge avatar Mar 18 '22 21:03 armanbilge

What had you in mind? Adding a 404.html under src/main/resources/org/typelevel/sbt/site/helium and importing it here or merely adding a 404.md under docs? If I'm not wrong the former won't add it for every plugin user, right?

TonioGela avatar Feb 10 '23 23:02 TonioGela

If I'm not wrong the former won't add it for every plugin user, right?

That's exactly the point: to add a decent 404 page for every typelevel site out in the wild, at once.

armanbilge avatar Feb 10 '23 23:02 armanbilge

If I'm not wrong the former won't add it for every plugin user, right?

That's exactly the point: to add a decent 404 page for every typelevel site out in the wild, at once.

But has that page to be built from scratch? Maybe I can try to make laika render a 404.md file into a 404.html and use this as a template, idk.

TonioGela avatar Feb 10 '23 23:02 TonioGela

But has that page to be built from scratch?

Oh, I see. I'm not sure actually. You should check Laika docs, maybe we can have markdown templates.

Also note we can add a page completely programmatically. This example adds an HTML page, but it should work for markdown.

https://github.com/typelevel/sbt-typelevel/blob/abc217d7173ec51f44ed510e7d8cc5819543e7f2/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala#L75-L79

armanbilge avatar Feb 10 '23 23:02 armanbilge