With the current docs directory setup, I'm making too many mistakes and have to manually address path changes and directory moves on deploy. This makes for a frustrating experience developing locally and shipping releases. With this PR, we're basically back to the same setup from v3—duplicating the dist/ directory into our site/docs/ directory. Not the most ideal, but very straightforward for me as the release manager.
I still need to double check the service worker stuff, asset paths, and confirm the watch tasks pickup the copy-pasta.
/cc @twbs/team
-
mkdir site -
git mv docs/ site/docs/ -
git mv _layouts/ site/_layouts/ -
git mv _data/ site/_data/ -
git mv _includes site/_includes/ -
git mv assets site/docs/4.1/assets/ -
Update _config.yml'ssourceto"site" -
git mv favicon.ico site/favicon.ico -
git mv index.html site/index.html -
git mv sw.js site/sw.js -
git mv robots.txt site/robots.txt -
Update sw.jspath -
Update CSS/JS paths -
Update social image paths -
Modify package.jsonscripts do duplicatedistintositedirectory-
css-mainneeds&& cp -r dist/css/ site/docs/4.1/dist/css/added -
js-mainneeds&& cp -r dist/js/ site/docs/4.1/dist/js/added
-
-
Test, test, test!
Fixes #26637 (closed) and fixes #26267 (closed) along the way.