From 9a0b707f6a4c9927f2df87af8e041269204409f2 Mon Sep 17 00:00:00 2001 From: nntrn <17685332+nntrn@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:55:11 -0500 Subject: [PATCH] Update github pages --- .github/workflows/docs.yml | 22 +++++++++------------- _config.yml | 27 +++++++++++++++++---------- _includes/style.css | 6 +++--- assets/data.json | 8 -------- 4 files changed, 29 insertions(+), 34 deletions(-) delete mode 100644 assets/data.json diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a525590..dd7bf6c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,9 +1,9 @@ name: Build Docs on: + workflow_dispatch: push: branches: ["main"] - workflow_dispatch: permissions: contents: read @@ -17,26 +17,22 @@ concurrency: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + issues: write steps: - name: Checkout uses: actions/checkout@v4 + - run: ./scripts/build-data.sh --remote - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: "2.7.1" - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - run: ./scripts/build-data.sh --remote - - name: Set up Pages - id: pages - uses: actions/configure-pages@v2 + bundler-cache: true - name: Build with Jekyll - # Outputs to the './_site' directory by default - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" - env: - JEKYLL_ENV: production + run: bundle exec jekyll build - name: Upload artifact - # Automatically uploads an artifact from the './_site' directory by default - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 # Deployment job deploy: environment: @@ -47,4 +43,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 diff --git a/_config.yml b/_config.yml index 4b549b7..760bab4 100644 --- a/_config.yml +++ b/_config.yml @@ -1,23 +1,23 @@ title: what i'm reading -description: >- - Bookmarks from Apple Books - +description: Bookmarks from Apple Books +author: Annie Tran url: https://nntrn.github.io baseurl: /what-im-reading repository: nntrn/what-im-reading github_username: nntrn favicon_ico: /assets/favicon.ico -exclude: - - README.md - - Gemfile.lock - - .archive - - annotations.json - - scripts - kramdown: smart_quotes: ["apos", "apos", "quot", "quot"] +compress_html: + clippings: [div, p, ul, td, h1, h2] + endings: all + comments: [""] + startings: [] + blanklines: true + profile: false + page_gen: - data: "genre" template: "genre" @@ -28,3 +28,10 @@ page_gen: name: "slug" index_files: false dir: "tags" + +exclude: + - README.md + - Gemfile.lock + - .archive + - annotations.json + - scripts diff --git a/_includes/style.css b/_includes/style.css index 5008d6c..fab0b7c 100644 --- a/_includes/style.css +++ b/_includes/style.css @@ -24,8 +24,8 @@ label{display:block;line-height:1.2} ol,ul{padding:0 1.35rem} q:after,q:before{content:""} q{white-space:pre-wrap} -table{line-height:1.3;border-collapse:collapse} -td h3{/*! margin:1rem 0; */margin-top:1rem;margin-bottom:.5rem} +table{line-height:1.3;border-collapse:collapse;width:95%} +td h3{margin-top:1rem;margin-bottom:.5rem} td,th{vertical-align:top;padding-top:.25rem;padding-bottom:.25rem} td.flex{padding-left:.75rem} th date{white-space:pre} @@ -65,7 +65,7 @@ section .toc li a{color:#222;white-space:pre;text-align:center;padding:0 4px} #burger~aside .container{position:sticky;top:0;max-height:75vh;overflow-y:scroll;scrollbar-width:thin;scroll-behavior:smooth} #burger.show{opacity:.25} @media (max-width:750px){ -main{padding-right:unset/*! width:95%; */} +main{padding-right:unset} aside .container{min-height:20vh} main>.flex{display:flex;flex-direction:column} :root{--px-size:1rem} diff --git a/assets/data.json b/assets/data.json deleted file mode 100644 index 6016229..0000000 --- a/assets/data.json +++ /dev/null @@ -1,8 +0,0 @@ ---- -layout: null ---- -{% if site.url contains "localhost" -%} -{{site|jsonify}} -{%- else -%} -{{site.data|jsonify}} -{%- endif %} \ No newline at end of file