Coder Social home page Coder Social logo

quartz_flake's Introduction

Quartz flake

Usage

With nix installed, and flakes enabled. From inside inside your directory with ./content:

nix flake init -t github:zdcthomas/quartz_flake
nix build

What is this?

The purpose of this flake system is to make it easier to build a static site with the Quartz Static Site generator. This way, builds can be reproducible against either the master version of Quartz, or against a public fork you maintain yourself. This means that your content can be completely seperate from your quartz implementation, which means your content repo can be private, while your fork of Quartz is public.


      ┌────────────────┐ EITHER ┌────────────────┐
      │jackyzha0/quartz│───OR───│your_fork/quartz│
      └────────────────┘   │    └────────────────┘
                           │
                   ┌───────┘
                   │
                   │
                   │ ┌─────────────────┐
                   │ │ Content Repo    │
                   │ │                 │
                   └─┼──►Flake.nix─────┼──►./public─►Deployment
                     │    ▲            │
                     │    └───./content│
                     └─────────────────┘

Important

Right now, it's not super easy to use this to serve your site locally. But I have plans to add that.

Github Actions

Here's an example github action to get it deployed super easily

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: cachix/install-nix-action@v22
        with:
          github_access_token: ${{ secrets.GITHUB_TOKEN }}
      - name: Build release
        run: nix build
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: ./result/public

  # Deployment job
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1

quartz_flake's People

Contributors

zdcthomas avatar

Stargazers

Kartik Chopra avatar Brooklyn Zelenka avatar Luca Salvarani avatar Jacky Zhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.