简体   繁体   中英

Adding github pages to all subfolders?

I have a repository in github which will house all of my web development assignments in separate sub-folders like:

VishnuVelukutty/ CourseraWebdevAssignment (master)/ module2-assignment (subfolder)

So the master branch has gh-pages and I want to add the gh-page to all sub-folders (Assignment1,2,3.....) independently so that they work independently when the specific module-link is opened

Is it possible to apply gh-pages to a subfolder? or do I have create independent repo for each module?

I have not initiated.gitignore, static site, readme nor theme and reffered to this post by cobyism and chrisjacob but i didn't get it working

Here is mygithub account to see if there any errors in setting up

For reference of the images here is the git link

First, make sure to create a gh-pages branch, add at least one commit in it and push it to your GitHub repository.

Then , yes, you can add that gh-pages branch content as a subfolder of your current repository, in the master branch, using git submodule .
(unless, as explained here, you chose the master branch itself as source for GitHub Pages )

git checkout master
git submodule add -b gh-pages -- /remote/url/of/your/own/repo gh-pages
git commit -m "Add gh-pages branch as submodule"
git push

You will have a gh-pages subfolder, that you can update at any time with:

git submodule update --remote

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM