File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Page Feedback
2+ description : Suggest changes or report issues with a page
3+ labels : [feedback]
4+ body :
5+ - type : input
6+ id : url
7+ attributes :
8+ label : Page URL
9+ description : The page this feedback is about.
10+ placeholder : https://ofthemachine.github.io/100hellos-docs/...
11+ validations :
12+ required : true
13+ - type : textarea
14+ id : suggestions
15+ attributes :
16+ label : Feedback
17+ description : What would you like to change or report?
18+ placeholder : Describe the issue or suggestion.
19+ validations :
20+ required : true
Original file line number Diff line number Diff line change 11import React from 'react'
22
3+ const SITE_URL = 'https://ofthemachine.github.io/100hellos-docs'
4+
5+ function feedbackUrl ( path ) {
6+ const pageUrl = `${ SITE_URL } ${ path } `
7+ const params = new URLSearchParams ( {
8+ template : 'page-feedback.yml' ,
9+ title : `[Feedback] ${ path } ` ,
10+ url : pageUrl ,
11+ } )
12+ return `https://github.com/ofthemachine/100hellos-docs/issues/new?${ params } `
13+ }
14+
315const styles = {
416 footer : {
517 borderTop : '1px solid var(--border)' ,
@@ -20,6 +32,7 @@ const styles = {
2032}
2133
2234export default function Footer ( ) {
35+ const path = typeof window !== 'undefined' ? window . location . pathname . replace ( '/100hellos-docs' , '' ) || '/' : '/'
2336 return (
2437 < footer style = { styles . footer } >
2538 < p style = { styles . text } >
@@ -30,6 +43,10 @@ export default function Footer() {
3043 < a href = "https://github.com/ofthemachine/fraglet" style = { styles . link } target = "_blank" rel = "noopener noreferrer" >
3144 fraglet
3245 </ a >
46+ { ' · ' }
47+ < a href = { feedbackUrl ( path ) } style = { styles . link } target = "_blank" rel = "noopener noreferrer" >
48+ Suggest Changes
49+ </ a >
3350 </ p >
3451 </ footer >
3552 )
You can’t perform that action at this time.
0 commit comments