To make sure GitHub does not rebuild your website using Jekyll and just publish whatever files you push to the repository, you need to create a (hidden) file named. The comprehensive documentation of GitHub Pages is at, and please ignore anything related to Jekyll there unless you actually use Jekyll instead of Hugo. The first requirement for using GitHub Pages is that you have to create a GitHub repository named under your account (replace username with your actual GitHub username), and what’s left is to push your website files to this repository. The actual limitation is that you cannot use subpaths in the URL but you can use any (sub)domain names.Īlthough GitHub does not officially support Hugo (only Jekyll is supported), you can actually publish any static HTML files on GitHub Pages, even if they are not built with Jekyll. However, since you can connect any GitHub repositories with Netlify, and each repository can be associated with a domain or subdomain name, you may replace GitHub Project Pages with different subdomains like and. This feature allows you to have project websites in separate repositories, e.g., you may have two independent websites and, corresponding to GitHub repositories username/proj-a and username/proj-b, respectively. This is extremely useful when someone else (or even yourself) proposes changes to your website, since you have a chance to see what the website would look like before you merge the pull request.īasically, Netlify can do everything that GitHub Pages can, but there is still one little missing feature, which is closely tied to GitHub itself, which is GitHub Project Pages. One of the best features of Netlify that is not available with GitHub Pages is that Netlify can generate a unique website for preview when a GitHub pull request is submitted to your GitHub repository. 31 This is important especially when you have an old website that you want to migrate to Hugo some links may be broken, in which case you can easily redirect them with Netlify. Redirecting URLs is awkward with GitHub Pages but much more straightforward with Netlify. We recommend that you consider Netlify + Hugo due to these reasons: GitHub Pages ( ) is a very popular way to host static websites (especially those built with Jekyll), but its advantages are not obvious or appealing compared to Netlify. D.5 Paths of figures and other dependencies.D.3 Building a website for local preview.
0 Comments
Leave a Reply. |