A very simple idea to help migrate existing websites #7860
Replies: 1 comment
-
That's not supported but we could add an option to our sitemap plugin if you can describe formally how it should behave in such a case. Note you could also create your own sitemap plugin to implement any behavior you want: if Docusauurs defaults do not satisfy you, the good thing is it's modular enough :) You could for example combine the default sitemap with your own custom one for the static folder. Afaik you can create an "index sitemap", or submit multiple sitemaps
That's the default behavior but you can opt-out of it with the We have documented that here: https://docusaurus.io/docs/advanced/routing#escaping-from-spa-redirects
I don't understand what you mean here. What does "wrapped correctly" means? Do you want us to use iframes or something? 🤷♂️ Note you can already use iframes in MDX documents, so technically you could create empty doc files with just an iframe displaying your legacy content. You'd probably have to write some custom integration because clicking on an iframe link would navigate the iframe while maybe you want it to navigate the main browser page |
Beta Was this translation helpful? Give feedback.
-
I have a website with over 2000 html web pages.
Typically, when I wish to migrate my website to a new framework, I add the html web pages unmodified as static files. This allows me to publish my existing website under the new platform, as I incrementally migrate to the new platform. I can then rewrite the most important pages first, and continue as needed with less important pages.
However, with Docusaurus, this does not seem straightforward. The migration appears as all or nothing. This is the first framework I work with that does not allow me to gracefully migrate.
For instance, I copied my existing website's html pages to the static folder. As expected, they are copied to the build output. However, the static html pages 1) do not show up in the generated sitemap.xml file and 2) links from Docusaurus to static html break and report a 404 even if the pages exists.
What I suggest is the ability to add html files to a "migration" folder. These html files would then automatically be wrapped correctly so that they can be a part of the main Docusaurus app, the sitemap.xml and any other conveniences. Then I can continue to publish my site as-is, as I incrementally migrate.
Beta Was this translation helpful? Give feedback.
All reactions