diff --git a/docs/getting-started/_parts/install/steps/download-files.mdx b/docs/getting-started/_parts/install/steps/download-files.mdx index c564a15..e64c85c 100644 --- a/docs/getting-started/_parts/install/steps/download-files.mdx +++ b/docs/getting-started/_parts/install/steps/download-files.mdx @@ -18,6 +18,15 @@ mkdir -p /var/www/ctrlpanel && cd /var/www/ctrlpanel + :::info + In this case, you'll need to use `git checkout main` or `git checkout NEW_VERSION` to upgrade. + + **Why?** + When you clone a repository at a specific tag, Git places you in a "detached HEAD" state - meaning you're not on any branch. + In this state, `git pull` won’t update anything because there's no branch to pull from. + To upgrade, you first need to switch to the branch or tag you want to use (for example, `git checkout main` or `git checkout NEW_VERSION`). + ::: + If you want to install a specific version of CtrlPanel instead of the latest one, you'll need to specify the tag you want to clone from GitHub. Use the `-b ` argument for that. Replace `VERSION` with the version you want to install. ```bash diff --git a/docs/updating/from-0.9.x.mdx b/docs/updating/from-0.9.x.mdx index 4f421f2..397c7b8 100644 --- a/docs/updating/from-0.9.x.mdx +++ b/docs/updating/from-0.9.x.mdx @@ -355,7 +355,7 @@ After installing the required PHP version, let's make sure that it is installed php -v ``` -If you see version 8.3, then everything is fine, and you can skip next step, if the PHP version is still 8.1 or lower, then update the default version for the `php` commamd using the following command: +If you see version 8.3, then everything is fine, and you can skip next step, if the PHP version is still 8.1 or lower, then update the default version for the `php` command using the following command: ```bash update-alternatives --set php /usr/bin/php8.3 @@ -403,9 +403,9 @@ Congratulations! Everything is ready, you can continue updating **:3** ```bash git fetch origin +git stash --include-untracked git checkout 1.0.1 -git stash -git reset --hard origin/main +git reset --hard chmod -R 755 /var/www/ctrlpanel ``` @@ -433,7 +433,7 @@ apt install php8.3-redis ## Updating the Database -Make sure you have a _working_ backup of your database. A Guide can be found [here](/docs/1.0.0/Guides/backups) +Make sure you have a _working_ backup of your database. A Guide can be found [here](/docs/guides/backup) ```bash php artisan migrate --seed --force diff --git a/docusaurus.config.js b/docusaurus.config.js index 8282d46..b4baa46 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -125,4 +125,33 @@ module.exports = { }, ], ], + plugins: [ + [ + '@docusaurus/plugin-client-redirects', + { + redirects: [ + { + from: '/docs/intro', + to: '/docs', + }, + { + from: '/docs/Installation/updating', + to: '/docs/category/updating', + }, + { + from: '/docs/Contributing/donating', + to: '/docs/contributing/donating', + }, + { + from: '/docs/Installation/getting-started', + to: '/docs/getting-started/install', + }, + // { + // to: '/docs/newDoc2', + // from: ['/docs/oldDocFrom2019', '/docs/legacyDocFrom2016'], + // }, + ], + }, + ], + ], }; diff --git a/package.json b/package.json index 9733313..dd73710 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "@docusaurus/core": "^3.8.1", + "@docusaurus/plugin-client-redirects": "^3.8.1", "@docusaurus/preset-classic": "^3.8.1", "@mdx-js/react": "^3.0.0", "@svgr/webpack": "^5.5.0", diff --git a/yarn.lock b/yarn.lock index 7947b67..2a3026f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1577,6 +1577,21 @@ react-helmet-async "npm:@slorber/react-helmet-async@1.3.0" react-loadable "npm:@docusaurus/react-loadable@6.0.0" +"@docusaurus/plugin-client-redirects@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.8.1.tgz#1d02b3565ae4e53a3b8005835501f07fb0bc0267" + integrity sha512-F+86R7PBn6VNgy/Ux8w3ZRypJGJEzksbejQKlbTC8u6uhBUhfdXWkDp6qdOisIoW0buY5nLqucvZt1zNJzhJhA== + dependencies: + "@docusaurus/core" "3.8.1" + "@docusaurus/logger" "3.8.1" + "@docusaurus/utils" "3.8.1" + "@docusaurus/utils-common" "3.8.1" + "@docusaurus/utils-validation" "3.8.1" + eta "^2.2.0" + fs-extra "^11.1.1" + lodash "^4.17.21" + tslib "^2.6.0" + "@docusaurus/plugin-content-blog@3.8.1": version "3.8.1" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.8.1.tgz#88d842b562b04cf59df900d9f6984b086f821525"