mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-03-28 17:32:37 +01:00
fix: use vuepress to setup 404 page
This commit is contained in:
@@ -138,6 +138,7 @@ module.exports = {
|
||||
{
|
||||
normalSuffix: '/',
|
||||
indexSuffix: '/',
|
||||
notFoundPath: '/ipfs-404.html',
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -175,7 +176,7 @@ module.exports = {
|
||||
sitemap: {
|
||||
hostname: CANONICAL_BASE,
|
||||
changefreq: 'weekly',
|
||||
exclude: ['/image-crop/', '/404.html'],
|
||||
exclude: ['/image-crop/', '/ipfs-404.html'],
|
||||
},
|
||||
directories: [
|
||||
{
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>IPFS Blog & News</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.location.pathname = '/404.html'
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,12 +16,24 @@
|
||||
|
||||
<script>
|
||||
import Layout from '@theme/layouts/Layout.vue'
|
||||
import countly from '../util/countly'
|
||||
|
||||
export default {
|
||||
name: 'NotFound',
|
||||
components: {
|
||||
Layout,
|
||||
},
|
||||
created() {
|
||||
if (typeof this.$ssrContext !== 'undefined') {
|
||||
this.$ssrContext.userHeadTags += `<base href="/" />`
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
countly.trackEvent(countly.events.NOT_FOUND, {
|
||||
path: this.$route.path,
|
||||
referrer: typeof window !== 'undefined' ? document.referrer : null,
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ export const events = {
|
||||
LOAD_MORE_BUTTON: 'loadMoreButton',
|
||||
NEWSLETTER_SUBSCRIBE: 'newsletterSubscribe',
|
||||
FILTER: 'filter',
|
||||
NOT_FOUND: '404NotFound',
|
||||
}
|
||||
/*
|
||||
Load Countly script.
|
||||
|
||||
Reference in New Issue
Block a user