tlienart / Xranklin.jl

Experimental repo for a refactoring of Franklin.jl
https://tlienart.github.io/Xranklin.jl
MIT License
41 stars 1 forks source link

Xranklin

CI Actions Status codecov

About

This repo contains the code for the next minor (and, once properly tested, major) version of Franklin.jl. The code has basically been re-written from scratch, and your help is needed to uncover bugs and problems.

Most of what's offered by Franklin is also offered by Xranklin (apart from what's listed in this issue which we should make as precise as possible).

Link to the new docs (under active construction, note that the search won't work, and I'm also aware that the nav does not work well on mobile phone).

How to help test this?

Assumptions:

Here's a suggested workflow:

  1. duplicate an existing Franklin-repo and give me collaborator access to that duplicated repo (to speed up debugging),
  2. clone the repo locally, and add Xranklin to your environment with Pkg.add(url="https://github.com/tlienart/Xranklin.jl", rev="main");
  3. cd to the repo and do using Xranklin; serve(debug=true), this will generate a lot of output,
  4. if you have errors, check the migration points below to see if the error can be quickly fixed, if not, open an issue
    • indicate your OS, Julia version, link to the repo and to the commit that failed if not the latest
    • indicate the patch version of Xranklin,
    • copy paste the error and previous few lines in the issue,
  5. assuming things work locally, test the deployment
    • make sure you adjust prepath in config.md
    • create or change the .github/workflows/deploy.yml to the script below
    • check if it deploys successfully (check in the repo settings that Pages consume gh-pages)
  6. thoughts, feedback, open an issue
  7. thanks a lot!!
Click here to expand the github deploy script ```yaml name: Build and Deploy on: push: branches: - main jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Git checkout uses: actions/checkout@v3 - name: Cache uses: actions/cache@v2 with: path: | __cache ~/.julia key: ${{ runner.os }}-franklin-cache-${{ github.sha }} restore-keys: ${{ runner.os }}-franklin-cache- # Julia - name: Install Julia uses: julia-actions/setup-julia@v1 with: version: 1.7 # Website build - run: julia -e ' using Pkg; Pkg.add(url="https://github.com/tlienart/Xranklin.jl", rev="main"); using Xranklin; build();' # Deployment and caching - run: touch __site/.nojekyll - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@releases/v4 with: BRANCH: gh-pages FOLDER: __site ```

Migration notes

Link to the new docs, the docs are being built so expect rough edges but if you find things that can be added or explained better, please open issues. Don't worry too much about layout issues for now.

Changes:

This has not yet been migrated and so you shouldn't expect it to work (see also this issue)

Iterative process

It helps to use ignore = ... in your config.md to avoid trying to build your full site at once which will be very helpful in gradually debugging things. For instance you may have something like

ignore = ["posts/", "about/", "foo/bar.md"]

to indicate that the directories posts/ and about/ as well as the file foo/bar.md should be ignored.

Quirks

Now that there's a __cache folder generated alongside the __site folder, add it to your .gitignore file so it doesn't get pushed. So it will look something like this:

__site/
__cache/
.DS_Store  # if you're on macos

Dev Notes

Breaking changes from Franklin

Notes

LaTeX

Search

brew install stork-search/stork-tap/stork
# brew info stork

JS lib:

<script src="https://files.stork-search.net/releases/v1.6.0/stork.js"></script>