static

Static content for GitHub Pages


Content (e.g. images, PDFs, HTML) in GitHub Pages repositories consume 3x storage

  • original
  • copied into: ./_site/
  • also in: .git/objects/pack/

Moving static content to a separate GitHub repository can reduce:

Implementation:
settings

  • This technique is sometimes called a GitHub Pages project site.
  • For code repositories, put html in a separate folder, e.g. docs/ with .nojekyll,
    and change Branch folder from / (root):
    folder
    • $ rm _config.yml Gemfile
      $ touch .nojekyll
      $ ls -al
      total 98
      drwxr-xr-x 1 bleke None     0 Sep 13 14:53 .
      drwxr-xr-x 1 bleke None     0 Sep 12 07:37 ..
      drwxr-xr-x 1 bleke None     0 Sep 13 13:24 .git
      -rw-r--r-- 1 bleke None    66 Sep 12 07:39 .gitattributes
      -rw-r--r-- 1 bleke None    56 Sep 12 07:39 .gitignore
      -rw-r--r-- 1 bleke None     0 Sep 13 12:44 .nojekyll
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 AT-LP140XP
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 Canon
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 Carver
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 ColorRendering
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 ESP32
      drwxr-xr-x 1 bleke None     0 Sep 12 15:14 GitHubW11
      drwxr-xr-x 1 bleke None     0 Sep 10 13:52 HTML
      drwxr-xr-x 1 bleke None     0 Sep 12 10:32 ImageProcessing
      -rw-r--r-- 1 bleke None  1094 Sep 12 07:39 LICENSE
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 Mastodon
      -rw-r--r-- 1 bleke None  1903 Sep 12 15:51 README.md
      drwxr-xr-x 1 bleke None     0 Sep 12 07:53 SL-7
      drwxr-xr-x 1 bleke None     0 Sep 10 08:47 SimHub
      drwxr-xr-x 1 bleke None     0 Aug 22 07:23 TThistory
      drwxr-xr-x 1 bleke None     0 Sep 12 09:27 altec
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 covid
      drwxr-xr-x 1 bleke None     0 Aug 16 10:26 images
      -rw-r--r-- 1 bleke None  5328 Sep 13 14:47 index.html
      drwxr-xr-x 1 bleke None     0 Sep 12 07:49 microscope
      drwxr-xr-x 1 bleke None     0 Sep  9 07:33 network
      -rw-r--r-- 1 bleke None  1444 Sep 13 14:50 static.html
      drwxr-xr-x 1 bleke None     0 Sep 12 15:38 story
      
    • Alternative attempted and rejectedstatic.yml as a Custom Action
      This worked only for index.html in the root folder.
static is maintained by blekenbleu