# Only if you don't have yarn already # (you need https://brew.sh to run the next command)brewinstallyarn#gitclonehttps://github.com/<user_name>/<project_name><project_name>_landingpagecd<project_name>_landingpagegitcheckout--orphanlandingpage&&gitrm-rf.yarncreatereact-app.--scripts-version4.0.3--templatetypescriptmkdir-p.github/workflowswgetgitlanding.dev/deploy.yaml-O.github/workflows/deploy.yaml# Don't get frightened by the next command.# It will just update the "homepage" field with: # https://<your_github_username>.github.io/<your_repo_name> # in the package.json.# Feel free to do that manually.node-e'(()=>{require("fs").writeFileSync("package.json",JSON.stringify({...require("./package.json"),"homepage": (() => {const [r, u] = `${require("child_process").execSync("git remote get-url origin")}`.replace(/\n/g, "").replace(".git", "").replace(/:/g, "/").replace(/\r?\n$/, "").split("/").reverse();return `https://${u}.github.io/${r}`;})()}, null, 2));})()'gitadd-Agitcommit-m"Initial commit"gitpush--set-upstreamoriginlandingpage
gitclonehttps://github.com/<user_name>/<project_name><project_name>_landingpagecd<project_name>_landingpagegitcheckout--orphanlandingpagegitrm-rf.yarncreatereact-app.--scripts-version4.0.3--templatetypescriptmkdir.github\workflowscurlgitlanding.dev/deploy.yaml-O.github/workflows/deploy.yaml# Don't get frightened by the next command.# It will just update the "homepage" field with: # https://<your_github_username>.github.io/<your_repo_name> # in the package.json.# Feel free to do that manually.node-e"(()=>{require('fs').writeFileSync('package.json',JSON.stringify({...require('./package.json'),'homepage': (() => {const [r, u] = ('' + require('child_process').execSync('git remote get-url origin')).replace(/\n/g, '').replace('.git', '').replace(/:/g, '/').replace(/\r?\n$/, '').split('/').reverse();return 'https://' + u + '.github.io/' + r;})()}, null, 2));})()"gitadd-Agitcommit-m"Initial commit"gitpush--set-upstreamoriginlandingpage
# Using Ubuntusudosucurl-fsSLhttps://deb.nodesource.com/setup_16.x|sudo-Ebash-# Using Debiansurootcurl-fsSLhttps://deb.nodesource.com/setup_16.x|bash-####apt-getinstall-ynodejsnpminstall-gyarn
Open a new terminal
gitclonehttps://github.com/<user_name>/<project_name><project_name>_landingpagecd<project_name>_landingpagegitcheckout--orphanlandingpage&&gitrm-rf.# If you get: 'yarn: error: no such option: --template' running the following command. It means you have 'yarn' from cmdtest, we need yarn the package manager.yarncreatereact-app.--scripts-version4.0.3--templatetypescriptmkdir-p.github/workflowswgetgitlanding.dev/deploy.yaml-O.github/workflows/deploy.yaml# Don't get frightened by the next command.# It will just update the "homepage" field with: # https://<your_github_username>.github.io/<your_repo_name> # in the package.json.# Feel free to do that manually.node-e'(()=>{require("fs").writeFileSync("package.json",JSON.stringify({...require("./package.json"),"homepage": (() => {const [r, u] = `${require("child_process").execSync("git remote get-url origin")}`.replace(/\n/g, "").replace(".git", "").replace(/:/g, "/").replace(/\r?\n$/, "").split("/").reverse();return `https://${u}.github.io/${r}`;})()}, null, 2));})()'gitadd-Agitcommit-m"Initial commit"gitpush--set-upstreamoriginlandingpage
Next you'll have to enable GitHub page in your repo. Navigate to your repository on Github and go to Setting > Pages, then set the gh-pages branch as the branch from witch the site is to be built.
You may need to wait a few minutes for the initial gh-pages branche to be created by your GitHub Action workflow .github/workflows/deploy.yaml
If all went as expected you page should be up and running
You're now ready to start customizing this page with Gitlanding.