Update docs links

pull/298/head
Amio 2019-07-04 20:50:06 +08:00
rodzic 768d427c26
commit 17961a9f5a
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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]) => (

Wyświetl plik

@ -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', ''))
} }