kopia lustrzana https://github.com/badgen/badgen.net
Update docs links
rodzic
768d427c26
commit
17961a9f5a
|
@ -5,7 +5,7 @@ export default ({ data }) => {
|
||||||
{ id
|
{ id
|
||||||
? <a className='title' href={`#${id}`}>{title}</a>
|
? <a className='title' href={`#${id}`}>{title}</a>
|
||||||
: <span className='title'>{title}</span> }
|
: <span className='title'>{title}</span> }
|
||||||
{ id && <a className='doc' href={`/docs/${id}`}>?</a> }
|
{ id && <a className='doc' href={`/${id}`}>?</a> }
|
||||||
</dt>
|
</dt>
|
||||||
{
|
{
|
||||||
Object.entries(examples).map(([path, desc]) => (
|
Object.entries(examples).map(([path, desc]) => (
|
||||||
|
|
2
index.ts
2
index.ts
|
@ -50,7 +50,7 @@ const server = http.createServer(async (req, res) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle `/docs/:name`
|
// redirects `/docs/:name` to `/:name`
|
||||||
if (url.startsWith('/docs/')) {
|
if (url.startsWith('/docs/')) {
|
||||||
return sendRedirection(res, 301, url.replace('/docs', ''))
|
return sendRedirection(res, 301, url.replace('/docs', ''))
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue