Hello all!
I'm trying to migrate Medium content to Prismic so I can start hosting blog content directly on my website, rather than linking off-site to content. I have a handful of articles with URLs I need to preserve, mainly for analytics reasons. The domain where the blogs are currently hosted via Medium is a custom namespace which I will migrate over to the app.
The current format for the URLs is blog.{domain}.com/{random_article_slug}.
I have two questions:
-
For the blog section of my Prismic app, is there any functionality for maintaining the blog..com structure, rather than having to do .com/blog/{slug} ?
-
Additionally, does Prismic support any method of importing these existing URLs and attaching them to the blog items?
Most of the solutions I have found relate to hardcoding DNS settings and/or managing 301 redirects to have content point to .com/blog, rather than achieving this specific solution.
Role: Developer
Next.js
Package.json file
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"slicemachine": "start-slicemachine"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.3.0",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@next/font": "13.1.0",
"@piwikpro/next-piwik-pro": "^1.0.4",
"@piwikpro/react-piwik-pro": "^1.1.1",
"@prismicio/client": "^7.0.0",
"@prismicio/next": "^1.5.0",
"@prismicio/react": "^2.7.4",
"@prismicio/slice-simulator-react": "^0.2.3",
"eslint": "8.30.0",
"eslint-config-next": "13.1.0",
"lodash": "^4.17.21",
"next": "13.4.5",
"next-transpile-modules": "^10.0.0",
"prismic-javascript": "^3.0.2",
"pure-react-carousel": "^1.30.1",
"react": "18.2.0",
"react-countup": "^6.4.1",
"react-dom": "18.2.0",
"react-fast-marquee": "^1.3.5",
"react-icons": "^4.7.1",
"react-marquee-slider": "^1.1.5",
"react-responsive": "^9.0.2",
"react-transition-group": "^4.4.5",
"styled-components": "^5.3.9"
},
"devDependencies": {
"@prismicio/types": "^0.2.7",
"@slicemachine/adapter-next": "^0.3.54",
"slice-machine-ui": "^2.10.0"
}
}