Skip to content

Commit

Permalink
Adding a 404 page with the option to create a broken link issue (#556)
Browse files Browse the repository at this point in the history
* Adding a 404 page with the option to create a broken link issue

Signed-off-by: Alexander Schwartz <[email protected]>

* Update .github/ISSUE_TEMPLATE/bug.yml

Co-authored-by: Stian Thorgersen <[email protected]>
Signed-off-by: Alexander Schwartz <[email protected]>

---------

Signed-off-by: Alexander Schwartz <[email protected]>
Signed-off-by: Alexander Schwartz <[email protected]>
Co-authored-by: Stian Thorgersen <[email protected]>
  • Loading branch information
ahus1 and stianst authored Jan 28, 2025
1 parent 8c941f7 commit 6d4cd04
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Website Problem Report
description: Report a problem on Keycloak's website
labels: ["kind/bug", "status/triage"]
body:
- type: textarea
id: description
attributes:
label: Describe the problem
description: Provide a clear and concise description of what the problem is.
validations:
required: true
- type: textarea
id: behaviorExpected
attributes:
label: Expected behavior
description: Describe what content you were expecting.
validations:
required: true
- type: textarea
id: reproducer
attributes:
label: How to Reproduce?
description: Describe how you reached this site, for example by adding a link where this page was referenced.
validations:
required: false
- type: textarea
id: other
attributes:
label: Anything else?
description: Links? References? Anything that will give us more context about the issue you are encountering!
validations:
required: false
30 changes: 30 additions & 0 deletions pages/404.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<#import "/templates/template.ftl" as tmpl>

<@tmpl.page current="keys" title="Page not found" noindex=true>

<div class="container mt-5">
<h1>Page not found</h1>

<p>
The page you’re looking for does not exist. It may have been moved. You can return to <a href="${links.home}">the start page</a>, or follow one of the links in the navigation on the top.
</p>
<p>
If you arrived at this page by clicking on a link, please notify the owner of the site that the link is broken. If you typed the URL of this page manually, please double-check that you entered the address correctly.
</p>

<p>
If you think this is a bug that the Keycloak team should fix, create <a id="buglink" href="https://github.com/keycloak/keycloak-web/issues/new?template=bug.yml&title=Broken%20link%20on%20the%20website%20{url}&description=%0A%0AURL:%20{url}">a bug issue on the GitHub issue tracker</a>.
</p>

<script>
document.addEventListener("DOMContentLoaded", function() {
var buglink = document.getElementById("buglink")
var href = buglink.getAttribute("href")
href = href.replaceAll("\{url\}", encodeURIComponent(window.location))
buglink.setAttribute("href", href)
});
</script>

</div>

</@tmpl.page>

0 comments on commit 6d4cd04

Please sign in to comment.