Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Pilot Lvl 1
Message 1 of 4

Can I define a custom source or folder from which my site hosted on GitHub pages can load from?

Solved! Go to Solution.

Instead of the normal options as the source for my site deployed with pages, that is the `master` branch or the `docs` folder in the master branch, can I define another source, like a folder called `site` or `pages` or some custom name.

 

This will be really helpful, as I really like using specific names for my repo folders.

3 Replies
Solution
Pilot Lvl 1
Message 2 of 4

Re: Can I define a custom source or folder from which my site hosted on GitHub pages can load from?

From https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/, the only three options that GitHub Pages recognizes are:

  • master branch
  • docs/ folder on the master branch
  • gh-pages branch

 

So it doesn't look like you're able to define a custom folder or branch yet.

Pilot Lvl 1
Message 3 of 4

Re: Can I define a custom source or folder from which my site hosted on GitHub pages can load from?

Yea @50Wliu, true. Thank you for helping out, I am grateful.

Ground Controller Lvl 1
Message 4 of 4

Re: Can I define a custom source or folder from which my site hosted on GitHub pages can load from?

I agree with @osioke, being able to choose a custom folder name would be great — I was about to create a post on this topic, but since I've found this thread I just joined in, so I'll share here some thoughts on this.

 

I find that having only the "docs/" folder as an option for serving GH-Pages contents directly within the main repository is very limiting. The idea of hosting the GH-Pages contents inside the repo is a really cool feature, which I use a lot for online documentation, since it allows smart reuse of the repository contents to generate the documentation without having to work across orphan branches.

 

But in most cases, I find the "docs" folder name problematic, for I'd rather use that folder for the software/project documentation, whereas for the GH-Pages contents a folder named "www" would have been more intuitive and practical  — or at least the freedom to rename the folder as I please.