Create your own digital garden on Github
Thursday 13 June 2024

Create a Repository

Assuming your user name on github is user-name:

  1. Create a repository in your account called :
  2. Go to repository Settings (last tab on top of the repository)
  3. Go to Pages from the sidebar under Code and automation
  4. Under Build and deployment > Source choose Github Actions

Create A Home page

  1. Go to your repository Code page (first tab at the top of the repository)
  2. Click Add file > Create new file
  3. Name your file:
  4. Add any content to your file. for example: Hello world!
  5. Click Commit new file

Add Github workflow

  1. Go to your repository Code page
  2. Click Add file > Create new file
  3. Name your file .github/workflows/xlog.yml
  4. Add The following content to your file
name: Xlog

    branches: [ "master" ]

  # Allows you to run this workflow manually from the Actions tab

  contents: read
  pages: write
  id-token: write

  group: "pages"
  cancel-in-progress: true

    runs-on: ubuntu-latest

      - uses: actions/checkout@v3
          fetch-depth: 0

      - name: restore timestamps
        uses: chetan/git-restore-mtime-action@v1

      - name: Set up Go
        uses: actions/setup-go@v3
          go-version: 1.22
          check-latest: true

      - name: Install xlog
        run: |
          go install

      - name: Build
        run: |
          xlog \
          --build . \
          --sitename "user-name"
          rm *.md
          chmod -R 0777 .

      - name: Upload GitHub Pages artifact
        uses: actions/upload-pages-artifact@v1.0.4
          path: .

      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1
  1. if your main branch name is different than master please change it in the previous file.
  2. Make sure you replace any occurrence of user-name with your user name.
  3. Click Commit new file
  4. Go to Actions tab. you should find a run in progress. After it completes move to the next step.

Visiting your digital garden

  • Now your digital garden should be available under
  • Visit the previous URL to make sure everything works
  • If the page doesn’t appear with Hello world! content (or the content you wrote) then something is wrong with the previous steps.

Writing new pages

  1. When you want to add a new page to your garden add the file in your repository and make sure it’s in .md (Markdown) format.
  2. After Github finishes building the page should be served as HTML with the same name without .md extension
  3. For example will be served as /about
  4. keep your files names meaningful. as Xlog will autolink pages together by the file name.
  5. so in any page when you have the word about in the text, Xlog will convert it to a link to the about page.