diff --git a/.all-contributorsrc b/.all-contributorsrc index cfa9c21..99b43da 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,7 +1,5 @@ { - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": false, "contributorsPerLine": 7, @@ -18,37 +16,28 @@ "name": "Maruan", "avatar_url": "https://avatars.githubusercontent.com/u/2126561?v=4", "profile": "http://maruan.alshedivat.com", - "contributions": [ - "design", - "code" - ] + "contributions": ["design", "code"] }, { "login": "rohandebsarkar", "name": "Rohan Deb Sarkar", "avatar_url": "https://avatars.githubusercontent.com/u/50144004?v=4", "profile": "http://rohandebsarkar.github.io", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "pourmand1376", "name": "Amir Pourmand", "avatar_url": "https://avatars.githubusercontent.com/u/32064808?v=4", "profile": "https://amirpourmand.ir", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "george-gca", "name": "George", "avatar_url": "https://avatars.githubusercontent.com/u/31376482?v=4", "profile": "https://george-gca.github.io/", - "contributions": [ - "code" - ] + "contributions": ["code"] } ], "commitConvention": "angular" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..fcb4b72 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll +{ + "name": "Jekyll", + "image": "mcr.microsoft.com/devcontainers/jekyll", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "build-essential,imagemagick,inotify-tools,jupyter-nbconvert,procps,ruby-full,zlib1g-dev" + }, + "ghcr.io/devcontainers-contrib/features/prettier:1": {} + }, + + // Optionally: run jekyll serve automatically on container entering using the Docker entrypoint + "postAttachCommand": "./bin/entry_point.sh", + + "customizations": { + "vscode": { + "extensions": ["esbenp.prettier-vscode", "sissel.shopify-liquid", "yzhang.markdown-all-in-one"], + "settings": { + // use prettier code formatter as default formatter + "editor.defaultFormatter": "esbenp.prettier-vscode", + "prettier.configPath": ".prettierrc", + "editor.formatOnSave": true + } + } + }, + + "remoteUser": "vscode" +} diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7e82674 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +_site/ +.git/ +assets/ diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..691dff4 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,24 @@ +# Template taken from https://github.com/v8/v8/blob/master/.git-blame-ignore-revs. +# +# This file contains a list of git hashes of revisions to be ignored by git blame. These +# revisions are considered "unimportant" in that they are unlikely to be what you are +# interested in when blaming. Most of these will probably be commits related to linting +# and code formatting. +# +# Instructions: +# - Only large (generally automated) reformatting or renaming CLs should be +# added to this list. Do not put things here just because you feel they are +# trivial or unimportant. If in doubt, do not put it on this list. +# - Precede each revision with a comment containing the PR title and number. +# For bulk work over many commits, place all commits in a block with a single +# comment at the top describing the work done in those commits. +# - Only put full 40-character hashes on this list (not short hashes or any +# other revision reference). +# - Append to the bottom of the file (revisions should be in chronological order +# from oldest to newest). +# - Because you must use a hash, you need to append to this list in a follow-up +# PR to the actual reformatting PR that you are trying to ignore. + +# Format all the code using prettier.io. (#2048, #2062) +beb6f27d596e753014cb9bff1939e5f78d66431c +2d34024961c3a3d27d6fd18ce06a551657983234 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index c78502f..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: alshedivat -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # ['https://www.buymeacoffee.com/TkFxuKo'] diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yml b/.github/ISSUE_TEMPLATE/1_bug_report.yml new file mode 100644 index 0000000..96ec317 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yml @@ -0,0 +1,101 @@ +name: 🐛 Report a bug +description: Any errors. +labels: ["needs triage", "bug"] +body: + - type: markdown + attributes: + value: > + Before you go any further. Is this really a **🐛 bug**? + + If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/master/README.md), + [frequently asked questions](https://github.com/alshedivat/al-folio/blob/master/FAQ.md), + [past questions](https://github.com/alshedivat/al-folio/discussions/categories/q-a), + or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a). + + - type: checkboxes + id: requirements + attributes: + label: Have you checked that your issue isn't already filed? + description: > + Please check if somebody else has already filed the same issue. + If you find a similar issue, please add a 👍 reaction or comment on the original post. + options: + - label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/master/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my issue. + required: true + - label: Yes, I have checked that this issue isn't already filed. + required: true + + - type: input + attributes: + label: Bug description + description: A description of the 🐛 bug. + placeholder: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + attributes: + label: How to reproduce the bug + description: Provide steps to reproduce the 🐛 bug. + placeholder: | + Include steps to reproduce, the expected behaviour, and the actual behaviour. + + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + attributes: + label: Error messages and logs + description: > + Provide any error messages and/or logs + placeholder: "Copy the complete error messages and logs" + value: | + ``` + The error message you got, with the full traceback if available. Please paste it between these triple backticks. + ``` + validations: + required: false + + - type: dropdown + id: os + attributes: + label: What operating system are you using? + description: select all OSs where you have experienced this issue + multiple: true + options: + - Linux + - Mac + - Windows + - Not applicable (e.g. you're using GitHub Pages or other hosting) + validations: + required: true + + - type: dropdown + id: environment + attributes: + label: Where are you seeing the problem on? + description: select all environments where you have experienced this issue + multiple: true + options: + - "Running locally with Docker" + - "Running locally without Docker" + - "Deployed site" + validations: + required: true + + - type: textarea + attributes: + label: More info + description: Add any other info about the issue here. + placeholder: | + Add any other context about the problem here, such as versions of the libraries if running without docker, screenshots, links to the deployed site, etc. + validations: + required: false + + - type: markdown + attributes: + value: "**Happy coding!**" diff --git a/.github/ISSUE_TEMPLATE/2_feature_request.yml b/.github/ISSUE_TEMPLATE/2_feature_request.yml new file mode 100644 index 0000000..36c2180 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_feature_request.yml @@ -0,0 +1,56 @@ +name: 🚀 Feature request +description: Propose a feature for this project +labels: ["needs triage", "enhancement"] +body: + - type: markdown + attributes: + value: > + Before you go any further, are you sure that this feature is not already implemented? + + If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/master/README.md), + [frequently asked questions](https://github.com/alshedivat/al-folio/blob/master/FAQ.md), + [past questions](https://github.com/alshedivat/al-folio/discussions/categories/q-a), + or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a). + + - type: checkboxes + id: requirements + attributes: + label: Have you checked that your feature request isn't already filed? + description: > + Please check if somebody else has already filed the same 🚀 feature request. + If you find a similar feature request, please add a 👍 reaction or comment on the original post. + options: + - label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/master/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my feature request. + required: true + - label: Yes, I have checked that this feature request isn't already filed. + required: true + + - type: textarea + attributes: + label: Description & Motivation + description: A clear and concise description of the 🚀 feature proposal + placeholder: | + Please outline the motivation for the proposal. + Is your feature request related to a problem? e.g., I'm always frustrated when [...]. + If this is related to another GitHub issue, please link it here + + - type: textarea + attributes: + label: Pitch + description: A clear and concise description of what you want to happen. + validations: + required: false + + - type: textarea + attributes: + label: Alternatives + description: A clear and concise description of any alternative solutions or features you've considered, if any. + validations: + required: false + + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 511f585..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' - ---- - -**Acknowledge the following** -- [ ] I carefully read and followed the [Getting Started](https://github.com/alshedivat/al-folio#getting-started) guide. -- [ ] I read through [FAQ](https://github.com/alshedivat/al-folio#faq) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my issue. -- [ ] The issue I am raising is a potential bug in al-folio and not just a usage question.
[For usage questions, please post in the [Discussions](https://github.com/alshedivat/al-folio/discussions) instead of raising an issue.] - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**System (please complete the following information):** - - OS: [e.g. iOS] - - Browser (and its version) [e.g. chrome, safari] - - Jekyll version [e.g. 3.8.7] -- Ruby version [e.g. 2.6.5] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..5da20df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: ❓ Ask a Question + url: https://github.com/alshedivat/al-folio/discussions/categories/q-a + about: Ask and answer al-folio related questions. + - name: 📖 Read the documentation + url: https://github.com/alshedivat/al-folio/blob/master/README.md + about: Please consult the documentation before opening any issues! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 11fc491..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..4fdc27e --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,14 @@ +changelog: + exclude: + labels: + - ignore-for-release + categories: + - title: new features 🚀 + labels: + - enhancement + - title: bug fixes and improvements ✨ + labels: + - bug-fix + - title: other changes 🛠️ + labels: + - "*" diff --git a/.github/workflows/axe.yml b/.github/workflows/axe.yml new file mode 100644 index 0000000..a745c7d --- /dev/null +++ b/.github/workflows/axe.yml @@ -0,0 +1,73 @@ +name: Axe accessibility testing + +on: + # if you want to run this on every push uncomment the following lines + # push: + # branches: + # - master + # - main + # pull_request: + # branches: + # - master + # - main + workflow_dispatch: + inputs: + url: + description: "URL to be checked (e.g.: blog/)" + required: false + +env: + URL: "" + +jobs: + check: + # available images: https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2.2" + bundler-cache: true + - name: Update _config.yml ⚙️ + uses: fjogeleit/yaml-update-action@main + with: + commitChange: false + valueFile: "_config.yml" + changes: | + { + "giscus.repo": "${{ github.repository }}", + "baseurl": "" + } + - name: Install and Build 🔧 + run: | + pip3 install --upgrade jupyter + export JEKYLL_ENV=production + bundle exec jekyll build --lsi + - name: Purge unused CSS 🧹 + run: | + npm install -g purgecss + purgecss -c purgecss.config.js + - name: Get Chromium version 🌐 + # https://github.com/GoogleChromeLabs/chrome-for-testing?tab=readme-ov-file#other-api-endpoints + run: | + CHROMIUM_VERSION=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE | cut -d. -f1) + echo "Chromium version: $CHROMIUM_VERSION" + echo "CHROMIUM_VERSION=$CHROMIUM_VERSION" >> $GITHUB_ENV + - name: Setup Chrome 🌐 + id: setup-chrome + uses: browser-actions/setup-chrome@v1 + with: + chrome-version: ${{ env.CHROMIUM_VERSION }} + - name: Install chromedriver 🚗 + run: | + npm install -g chromedriver@$CHROMIUM_VERSION + - name: Run axe 🪓 + # https://github.com/dequelabs/axe-core-npm/tree/develop/packages/cli + run: | + npm install -g @axe-core/cli + npm install -g http-server + http-server _site/ & + axe --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver http://localhost:8080/${{ github.event.inputs.url || env.URL }} --load-delay=1500 --exit diff --git a/.github/workflows/broken-links-site.yml b/.github/workflows/broken-links-site.yml new file mode 100644 index 0000000..fae797c --- /dev/null +++ b/.github/workflows/broken-links-site.yml @@ -0,0 +1,46 @@ +name: Check for broken links on site + +on: + workflow_run: + workflows: [Deploy site] + types: [completed] + +jobs: + check-links-on-site: + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow + if: ${{ github.event.workflow_run.conclusion == 'success' }} + # available images: https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2.2" + bundler-cache: true + - name: Update _config.yml ⚙️ + uses: fjogeleit/yaml-update-action@main + with: + commitChange: false + valueFile: "_config.yml" + changes: | + { + "giscus.repo": "${{ github.repository }}", + "baseurl": "" + } + - name: Install and Build 🔧 + run: | + pip3 install --upgrade jupyter + export JEKYLL_ENV=production + bundle exec jekyll build --lsi + - name: Purge unused CSS 🧹 + run: | + npm install -g purgecss + purgecss -c purgecss.config.js + - name: Link Checker 🔗 + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + # only check local links + args: --offline --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html' diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml new file mode 100644 index 0000000..d277281 --- /dev/null +++ b/.github/workflows/broken-links.yml @@ -0,0 +1,52 @@ +name: Check for broken links + +on: + push: + branches: + - master + - main + paths: + - "assets/**" + - "**.html" + - "**.js" + - "**.liquid" + - "**/*.md" + - "**.yml" + - "!.github/workflows/axe.yml" + - "!.github/workflows/deploy-docker-tag.yml" + - "!.github/workflows/deploy-image.yml" + - "!.github/workflows/docker-slim.yml" + - "!.github/workflows/lighthouse-badger.yml" + - "!.github/workflows/prettier.yml" + - "!lighthouse_results/**" + pull_request: + branches: + - master + - main + paths: + - "assets/**" + - "**.html" + - "**.js" + - "**.liquid" + - "**/*.md" + - "**.yml" + - "!.github/workflows/axe.yml" + - "!.github/workflows/deploy-docker-tag.yml" + - "!.github/workflows/deploy-image.yml" + - "!.github/workflows/docker-slim.yml" + - "!.github/workflows/lighthouse-badger.yml" + - "!.github/workflows/prettier.yml" + - "!lighthouse_results/**" + +jobs: + link-checker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Link Checker 🔗 + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + # removed md files that include liquid tags + args: --user-agent 'curl/7.54' --exclude-path README.md --exclude-path _pages/404.md --exclude-path _pages/blog.md --exclude-path _drafts/2018-12-22-distill.md --exclude-path _posts/2023-05-17-custom-tld.md --verbose --no-progress './**/*.md' './**/*.html' diff --git a/.github/workflows/deploy-docker-tag.yml b/.github/workflows/deploy-docker-tag.yml new file mode 100644 index 0000000..fadfff6 --- /dev/null +++ b/.github/workflows/deploy-docker-tag.yml @@ -0,0 +1,48 @@ +name: Docker Image CI (Upload Tag) + +on: + push: + tags: + - "v*" + paths: + - "bin/entry_point.sh" + - "Dockerfile" + - "Gemfile" + - "Gemfile.lock" + - "package.json" + - "package-lock.json" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: amirpourmand/al-folio + + - name: Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64/v8 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml new file mode 100644 index 0000000..133f22d --- /dev/null +++ b/.github/workflows/deploy-image.yml @@ -0,0 +1,43 @@ +name: Docker Image CI + +on: + push: + branches: + - master + - main + paths: + - "bin/entry_point.sh" + - "Dockerfile" + - "Gemfile" + - "Gemfile.lock" + - "package.json" + - "package-lock.json" + +jobs: + build: + runs-on: ubuntu-latest + if: github.repository_owner == 'alshedivat' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64/v8 + tags: amirpourmand/al-folio diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9ba3048..4979e3e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,14 +1,54 @@ -name: deploy +name: Deploy site on: push: branches: - master - main + paths: + - "assets/**" + - "**.html" + - "**.js" + - "**.liquid" + - "**/*.md" + - "**.yml" + - "!.github/workflows/axe.yml" + - "!.github/workflows/broken-links.yml" + - "!.github/workflows/deploy-docker-tag.yml" + - "!.github/workflows/deploy-image.yml" + - "!.github/workflows/docker-slim.yml" + - "!.github/workflows/lighthouse-badger.yml" + - "!.github/workflows/prettier.yml" + - "!lighthouse_results/**" + - "!CONTRIBUTING.md" + - "!CUSTOMIZE.md" + - "!FAQ.md" + - "!INSTALL.md" + - "!README.md" pull_request: branches: - master - main + paths: + - "assets/**" + - "**.html" + - "**.js" + - "**.liquid" + - "**/*.md" + - "**.yml" + - "!.github/workflows/axe.yml" + - "!.github/workflows/broken-links.yml" + - "!.github/workflows/deploy-docker-tag.yml" + - "!.github/workflows/deploy-image.yml" + - "!.github/workflows/docker-slim.yml" + - "!.github/workflows/lighthouse-badger.yml" + - "!.github/workflows/prettier.yml" + - "!lighthouse_results/**" + - "!CONTRIBUTING.md" + - "!CUSTOMIZE.md" + - "!FAQ.md" + - "!INSTALL.md" + - "!README.md" workflow_dispatch: permissions: @@ -16,46 +56,34 @@ permissions: jobs: deploy: + # available images: https://github.com/actions/runner-images#available-images runs-on: ubuntu-latest steps: - - name: Checkout 🛎️ - uses: actions/checkout@v3 - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.2.1' - bundler-cache: true - - name: Install and Build 🔧 - run: | - npm install -g mermaid.cli - bundle exec jekyll build - - name: Deploy 🚀 - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: _site - -# run: | -# gem install bundler -# bundle config path vendor/bundle -# bundle install --jobs 4 --retry 3 -# - name: Setup deploy options -# id: setup -# run: | -# git config --global user.name "GitHub Action" -# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" -# if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then # pull request -# echo "::set-output name=SRC_BRANCH::${GITHUB_HEAD_REF}" -# echo "::set-output name=NO_PUSH::--no-push" -# elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc -# echo "::set-output name=SRC_BRANCH::${GITHUB_REF#refs/heads/}" -# fi -# if [[ ${{ github.repository }} = *.github.io ]]; then # user/org repo -# echo "::set-output name=DEPLOY_BRANCH::master" -# else -# echo "::set-output name=DEPLOY_BRANCH::gh-pages" -# fi -# - name: Deploy website -# run: yes | bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }} -# --src ${{ steps.setup.outputs.SRC_BRANCH }} -# --deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }} + - name: Checkout 🛎️ + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2.2" + bundler-cache: true + - name: Update _config.yml ⚙️ + uses: fjogeleit/yaml-update-action@main + with: + commitChange: false + valueFile: "_config.yml" + propertyPath: "giscus.repo" + value: ${{ github.repository }} + - name: Install and Build 🔧 + run: | + pip3 install --upgrade jupyter + export JEKYLL_ENV=production + bundle exec jekyll build --lsi + - name: Purge unused CSS 🧹 + run: | + npm install -g purgecss + purgecss -c purgecss.config.js + - name: Deploy 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: _site diff --git a/.github/workflows/docker-slim.yml b/.github/workflows/docker-slim.yml new file mode 100644 index 0000000..8c8cf71 --- /dev/null +++ b/.github/workflows/docker-slim.yml @@ -0,0 +1,51 @@ +name: Docker Slim + +#Only trigger, when the build workflow succeeded +on: + workflow_run: + workflows: ["Docker Image CI"] + types: + - completed + +# on: +# push: +# branches: +# - 'master' + +jobs: + build: + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow + if: ${{ github.event.workflow_run.conclusion == 'success' }} and github.repository_owner == 'alshedivat' + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ github.workspace }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: update docker-compose + shell: bash + run: | + sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml + cat ${{ github.workspace }}/docker-compose.yml + + - uses: kitabisa/docker-slim-action@v1.0.3 + env: + DSLIM_PULL: true + DSLIM_COMPOSE_FILE: ${{ github.workspace }}/docker-compose.yml + DSLIM_TARGET_COMPOSE_SVC: jekyll + DSLIM_CONTINUE_AFTER: signal + with: + target: amirpourmand/al-folio + tag: "slim" + + # Push to the registry + - run: docker image push amirpourmand/al-folio:slim diff --git a/.github/workflows/lighthouse-badger.yml b/.github/workflows/lighthouse-badger.yml new file mode 100644 index 0000000..182517c --- /dev/null +++ b/.github/workflows/lighthouse-badger.yml @@ -0,0 +1,63 @@ +# Lighthouse-Badger-Easy | GitHub Action Workflow +# +# Description: Generates, adds & updates manually/automatically Lighthouse badges & reports from one/multiple input URL(s) to the current repository & main branch with minimal settings +# Author: Sitdisch +# Source: https://github.com/myactionway/lighthouse-badger-workflows +# License: MIT +# Copyright (c) 2021 Sitdisch + +name: "Lighthouse Badger" + +######################################################################## +# DEFINE YOUR INPUTS AND TRIGGERS IN THE FOLLOWING +######################################################################## + +# INPUTS as environmental variables (env) for not manually triggered workflows +env: + URLS: https://alshedivat.github.io/al-folio/ + TOKEN_NAME: LIGHTHOUSE_BADGER_TOKEN + # If any of the following env is blank, a default value is used instead + REPO_BRANCH: "${{ github.repository }} master" # target repository & branch e.g. 'dummy/mytargetrepo main' + MOBILE_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --throttling.cpuSlowdownMultiplier=2" + DESKTOP_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --preset=desktop --throttling.cpuSlowdownMultiplier=1" + +# TRIGGERS +on: + page_build: + # schedule: # Check your schedule here => https://crontab.guru/ + # - cron: '55 23 * * 0' # e.g. every Sunday at 23:55 + # + # THAT'S IT; YOU'RE DONE; + workflow_dispatch: + +######################################################################## +# THAT'S IT; YOU DON'T HAVE TO DEFINE ANYTHING IN THE FOLLOWING +######################################################################## + +jobs: + lighthouse-badger-easy: + runs-on: ubuntu-latest + timeout-minutes: 8 + steps: + - name: Preparatory Tasks + run: | + REPOSITORY=`expr "${{ env.REPO_BRANCH }}" : "\([^ ]*\)"` + BRANCH=`expr "${{ env.REPO_BRANCH }}" : ".* \([^ ]*\)"` + echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV + echo "BRANCH=$BRANCH" >> $GITHUB_ENV + env: + REPO_BRANCH: ${{ env.REPO_BRANCH }} + - uses: actions/checkout@v4 + with: + repository: ${{ env.REPOSITORY }} + token: ${{ secrets[github.event.inputs.token_name] || secrets[env.TOKEN_NAME] }} + ref: ${{ env.BRANCH }} + - uses: actions/checkout@v4 + with: + repository: "myactionway/lighthouse-badges" + path: temp_lighthouse_badges_nested + - uses: myactionway/lighthouse-badger-action@v2.2 + with: + urls: ${{ env.URLS }} + mobile_lighthouse_params: ${{ env.MOBILE_LIGHTHOUSE_PARAMS }} + desktop_lighthouse_params: ${{ env.DESKTOP_LIGHTHOUSE_PARAMS }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 834c5c7..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Sync from template -on: - # cronjob trigger - schedule: - - cron: "0 0 1 * *" - # manual trigger - workflow_dispatch: -jobs: - repo-sync: - runs-on: ubuntu-latest - steps: - # To use this repository's private action, you must check out the repository - - name: Checkout - uses: actions/checkout@v3 - - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v0.7.3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_repo_path: alshedivat/al-folio - upstream_branch: master - diff --git a/.github/workflows/prettier-comment-on-pr.yml b/.github/workflows/prettier-comment-on-pr.yml new file mode 100644 index 0000000..e95075c --- /dev/null +++ b/.github/workflows/prettier-comment-on-pr.yml @@ -0,0 +1,18 @@ +name: Comment on pull request + +on: + repository_dispatch: + types: [prettier-failed-on-pr] + +jobs: + comment: + # available images: https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest + steps: + - name: PR comment with html diff 💬 + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: prettier-failed + pr_number: ${{ github.event.client_payload.pr_number }} + message: | + Failed [prettier code check](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.client_payload.run_id }}). Check [this file](${{ github.event.client_payload.artifact_url }}) for more information. diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..60446c8 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,48 @@ +name: Prettier code formatter + +on: + pull_request: + branches: + - master + - main + push: + branches: + - master + - main + +jobs: + check: + # available images: https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + - name: Setup Node.js ⚙️ + uses: actions/setup-node@v4 + - name: Install Prettier 💾 + run: npm install --save-dev --save-exact prettier @shopify/prettier-plugin-liquid + - name: Prettier Check 🔎 + id: prettier + run: npx prettier . --check + - name: Create diff 📝 + # https://docs.github.com/en/actions/learn-github-actions/expressions#failure + if: ${{ failure() }} + run: | + npx prettier . --write + git diff -- . ':(exclude)package-lock.json' ':(exclude)package.json' > diff.txt + npm install -g diff2html-cli + diff2html -i file -s side -F diff.html -- diff.txt + - name: Upload html diff ⬆️ + id: artifact-upload + if: ${{ failure() && steps.prettier.conclusion == 'failure' }} + uses: actions/upload-artifact@v4 + with: + name: HTML Diff + path: diff.html + retention-days: 7 + - name: Dispatch information to repository 🗣️ + if: ${{ failure() && steps.prettier.conclusion == 'failure' && github.event_name == 'pull_request' }} + uses: peter-evans/repository-dispatch@v2 + with: + event-type: prettier-failed-on-pr + client-payload: '{"pr_number": "${{ github.event.number }}", "artifact_url": "${{ steps.artifact-upload.outputs.artifact-url }}", "run_id": "${{ github.run_id }}"}' diff --git a/.gitignore b/.gitignore index 12830eb..c0c0c31 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,8 @@ _site .ruby-version .tweet-cache Gemfile.lock +assets/libs/ +node_modules/ vendor node_modules/ *.priv - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca7e465..d61cba8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..8057079 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +**/*.map +**/*.min.css +**/*.min.js +assets/css/main.scss +assets/js/distillpub/template.v2.js +assets/plotly/demo.html +lighthouse_results/** +_posts/2015-10-20-math.md diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0163f19 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +plugins: ["@shopify/prettier-plugin-liquid"] +printWidth: 150 +trailingComma: "es5" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 328023a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: ruby -rvm: - - 2.4.1 - -# Assume bundler is being used, therefore -# the `install` step will run `bundle install` by default. -script: ./bin/cibuild - -env: - global: - - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer - -sudo: false # route your build to the container-based infrastructure for a faster build - -cache: bundler # caching bundler gem packages will speed up build - -# Optional: disable email notifications about the outcome of your builds -notifications: - email: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 349456b..c84e9d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,25 +1,28 @@ # Contributing to al-folio -Thank you for considering to contribute to al-folio! +Thank you for considering contributing to al-folio! ## Pull Requests + We welcome your pull requests (PRs). For minor fixes (e.g., documentation improvements), feel free to submit a PR directly. If you would like to implement a new feature or a bug, please make sure you (or someone else) has opened an appropriate issue first; in your PR, please mention the issue it addresses. +Note that since [#2048](https://github.com/alshedivat/al-folio/pull/2048) al-folio uses the [prettier formatter](https://prettier.io/) for its code, meaning all new submitted code must conform to its standard. If you don't have `prettier` installed for your setup and the `prettier` code check fails when submitting a PR, you can check the referred failed action in our repo. In that action there will be an artifact with an HTML diff showing the needed changes. ## Issues + We use GitHub issues to track bugs and feature requests. Before submitting an issue, please make sure: -1. You have read [the FAQ section](https://github.com/alshedivat/al-folio#faq) of the README and your question is NOT addressed there. +1. You have read [the FAQ section](FAQ.md) of the README and your question is NOT addressed there. 2. You have done your best to ensure that your issue is NOT a duplicate of one of [the previous issues](https://github.com/alshedivat/al-folio/issues). 3. Your issue is either a bug (unexpected/undesirable behavior) or a feature request. -If it is just a question, please ask it in the [Discussions](https://github.com/alshedivat/al-folio/discussions) forum. + If it is just a question, please ask it in the [Discussions](https://github.com/alshedivat/al-folio/discussions) forum. When submitting an issue, please make sure to use the appropriate template. - ## License + By contributing to al-folio, you agree that your contributions will be licensed under the LICENSE file in the root directory of the source tree. diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md new file mode 100644 index 0000000..19c260a --- /dev/null +++ b/CUSTOMIZE.md @@ -0,0 +1,147 @@ +# Customize + +Here we will give you some tips on how to customize the website. One important thing to note is that **ALL** the changes you make should be done on the **main** branch of your repository. The `gh-pages` branch is automatically overwritten every time you make a change to the main branch. + +## Project structure + +The project is structured as follows, focusing on the main components that you will need to modify: + +```txt +. +├── 📂 assets/: contains the assets that are displayed in the website +│   └── 📂 json/ + │   └── 📄 resume.json: CV in JSON format (https://jsonresume.org/) +├── 📂 _bibliography/ +│   └── 📄 papers.bib: bibliography in BibTeX format +├── 📄 _config.yml: the configuration file of the template +├── 📂 _data/: contains some of the data used in the template +│   ├── 📄 cv.yml: CV in YAML format, used when assets/json/resume.json is not found +│   └── 📄 repositories.yml: users and repositories info in YAML format +├── 📂 _includes/: contains code parts that are included in the main HTML file +│   └── 📄 news.liquid: defines the news section layout in the about page +├── 📂 _layouts/: contains the layouts to choose from in the frontmatter of the Markdown files +├── 📂 _news/: the news that will appear in the news section in the about page +├── 📂 _pages/: contains the pages of the website +| └── 📄 404.md: 404 page (page not found) +├── 📂 _posts/: contains the blog posts +├── 📂 _projects/: contains the projects +└── 📂 _sass/: contains the SASS files that define the style of the website + ├── 📄 _base.scss: base style of the website + ├── 📄 _cv.scss: style of the CV page + ├── 📄 _distill.scss: style of the Distill articles + ├── 📄 _layout.scss: style of the overall layout + ├── 📄 _themes.scss: themes colors and a few icons + └── 📄 _variables.scss: variables used in the SASS files +``` + +## Configuration + +The configuration file [\_config.yml](_config.yml) contains the main configuration of the website. Most of the settings is self-explanatory and we also tried to add as much comments as possible. If you have any questions, please check if it was not already answered in the [FAQ](FAQ.md). + +> Note that the `url` and `baseurl` settings are used to generate the links of the website, as explained in the [install instructions](INSTALL.md). + +All changes made to this file are only visible after you rebuild the website. That means that you need to run `bundle exec jekyll serve --lsi` again if you are running the website locally or push your changes to GitHub if you are using GitHub Pages. All other changes are visible immediately, you only need to refresh the page. + +## Modifying the CV information + +There are currently 2 different ways of generating the CV page content. The first one is by using a json file located in [assets/json/resume.json](assets/json/resume.json). It is a [known standard](https://jsonresume.org/) for creating a CV programmatically. The second one, currently used as a fallback when the json file is not found, is by using a yml file located in [\_data/cv.yml](_data/cv.yml). This was the original way of creating the CV page content and since it is more human readable than a json file we decided to keep it as an option. + +What this means is, if there is no resume data defined in [\_config.yml](_config.yml) and loaded via a json file, it will load the contents of [\_data/cv.yml](_data/cv.yml). If you want to use the [\_data/cv.yml](_data/cv.yml) file as the source of your CV, you must delete the [assets/json/resume.json](assets/json/resume.json) file. + +## Modifying the user and repository information + +The user and repository information is defined in [\_data/repositories.yml](_data/repositories.yml). You can add as many users and repositories as you want. Both informations are used in the `repositories` section. + +## Creating new pages + +You can create new pages by adding new Markdown files in the [\_pages](_pages/) directory. The easiest way to do this is to copy an existing page and modify it. You can choose the layout of the page by changing the [layout](https://jekyllrb.com/docs/layouts/) attribute in the [frontmatter](https://jekyllrb.com/docs/front-matter/) of the Markdown file, and also the path to access it by changing the [permalink](https://jekyllrb.com/docs/permalinks/) attribute. You can also add new layouts in the [\_layouts](_layouts/) directory if you feel the need for it. + +## Creating new blog posts + +To create a new blog post, you can add a new Markdown file in the [\_posts](_posts/) directory. The [name of the file must follow](https://jekyllrb.com/docs/posts/#creating-posts) the format `YYYY-MM-DD-title.md`. The easiest way to do this is to copy an existing blog post and modify it. Note that some blog posts have optional fields in the [frontmatter](https://jekyllrb.com/docs/front-matter/) that are used to enable specific behaviors or functions. + +If you want to create blog posts that are not ready to be published, but you want to track it with git, you can create a [\_drafts](https://jekyllrb.com/docs/posts/#drafts) directory and store them there. + +## Creating new projects + +You can create new projects by adding new Markdown files in the [\_projects](_projects/) directory. The easiest way to do this is to copy an existing project and modify it. + +## Adding some news + +You can add news in the about page by adding new Markdown files in the [\_news](_news/) directory. There are currently two types of news: inline news and news with a link. News with a link take you to a new page while inline news are displayed directly in the about page. The easiest way to create yours is to copy an existing news and modify it. + +## Adding Collections + +This Jekyll theme implements `collections` to let you break up your work into categories. The theme comes with two default collections: `news` and `projects`. Items from the `news` collection are automatically displayed on the home page. Items from the `projects` collection are displayed on a responsive grid on projects page. + +You can easily create your own collections, apps, short stories, courses, or whatever your creative work is. To do this, edit the collections in the [\_config.yml](_config.yml) file, create a corresponding folder, and create a landing page for your collection, similar to [\_pages/projects.md](_pages/projects.md). + +## Adding a new publication + +To add publications create a new entry in the [\_bibliography/papers.bib](_bibliography/papers.bib) file. You can find the BibTeX entry of a publication in Google Scholar by clicking on the quotation marks below the publication title, then clicking on "BibTeX", or also in the conference page itself. By default, the publications will be sorted by year and the most recent will be displayed first. You can change this behavior and more in the `Jekyll Scholar` section in [\_config.yml](_config.yml) file. + +You can add extra information to a publication, like a PDF file in the `assets/pdfs/` directory and add the path to the PDF file in the BibTeX entry with the `pdf` field. Some of the supported fields are: `abstract`, `altmetric`, `arxiv`, `bibtex_show`, `blog`, `code`, `dimensions`, `doi`, `eprint`, `html`, `isbn`, `pdf`, `pmid`, `poster`, `slides`, `supp`, `video`, and `website`. + +### Author annotation + +In publications, the author entry for yourself is identified by string array `scholar:last_name` and string array `scholar:first_name` in [\_config.yml](_config.yml). For example, if you have the following entry in your [\_config.yml](_config.yml): + +```yaml +scholar: + last_name: [Einstein] + first_name: [Albert, A.] +``` + +If the entry matches one form of the last names and the first names, it will be underlined. Keep meta-information about your co-authors in [\_data/coauthors.yml](_data/coauthors.yml) and Jekyll will insert links to their webpages automatically. The co-author data format is as follows, + +```yaml +"adams": + - firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"] + url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams + +"podolsky": + - firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"] + url: https://en.wikipedia.org/wiki/Boris_Podolsky + +"rosen": + - firstname: ["Nathan", "N."] + url: https://en.wikipedia.org/wiki/Nathan_Rosen + +"bach": + - firstname: ["Johann Sebastian", "J. S."] + url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach + + - firstname: ["Carl Philipp Emanuel", "C. P. E."] + url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach +``` + +If the entry matches one of the combinations of the last names and the first names, it will be highlighted and linked to the url provided. + +### Buttons (through custom bibtex keywords) + +There are several custom bibtex keywords that you can use to affect how the entries are displayed on the webpage: + +- `abbr`: Adds an abbreviation to the left of the entry. You can add links to these by creating a venue.yaml-file in the \_data folder and adding entries that match. +- `abstract`: Adds an "Abs" button that expands a hidden text field when clicked to show the abstract text +- `altmetric`: Adds an [Altmetric](https://www.altmetric.com/) badge (Note: if DOI is provided just use `true`, otherwise only add the altmetric identifier here - the link is generated automatically) +- `arxiv`: Adds a link to the Arxiv website (Note: only add the arxiv identifier here - the link is generated automatically) +- `bibtex_show`: Adds a "Bib" button that expands a hidden text field with the full bibliography entry +- `blog`: Adds a "Blog" button redirecting to the specified link +- `code`: Adds a "Code" button redirecting to the specified link +- `dimensions`: Adds a [Dimensions](https://www.dimensions.ai/) badge (Note: if DOI or PMID is provided just use `true`, otherwise only add the Dimensions' identifier here - the link is generated automatically) +- `html`: Inserts an "HTML" button redirecting to the user-specified link +- `pdf`: Adds a "PDF" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) +- `poster`: Adds a "Poster" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) +- `slides`: Adds a "Slides" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) +- `supp`: Adds a "Supp" button to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) +- `website`: Adds a "Website" button redirecting to the specified link + +You can implement your own buttons by editing the [\_layouts/bib.liquid](_layouts/bib.liquid) file. + +## Changing theme color + +A variety of beautiful theme colors have been selected for you to choose from. The default is purple, but you can quickly change it by editing the `--global-theme-color` variable in the [\_sass/\_themes.scss](_sass/_themes.scss) file. Other color variables are listed there as well. The stock theme color options available can be found at [\_sass/\_variables.scss](_sass/_variables.scss). You can also add your own colors to this file assigning each a name for ease of use across the template. + +## Adding social media information + +You can add your social media links by adding the specified information at the `Social integration` section in the [\_config.yml](_config.yml) file. This information will appear at the bottom of the `About` page. diff --git a/Dockerfile b/Dockerfile index a1eb21a..e55a99f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,41 @@ -FROM bitnami/minideb:latest +FROM ubuntu:latest +ENV DEBIAN_FRONTEND noninteractive + Label MAINTAINER Amir Pourmand -RUN apt-get update -y -# add locale -RUN apt-get -y install locales -# Set the locale + +RUN apt-get update -y && apt-get install -y --no-install-recommends \ + locales \ + imagemagick \ + ruby-full \ + build-essential \ + zlib1g-dev \ + jupyter-nbconvert \ + inotify-tools procps && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* + + RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -# add ruby and jekyll -RUN apt-get install --no-install-recommends ruby-full build-essential zlib1g-dev -y -RUN apt-get install imagemagick -y -RUN apt-get clean \ - && rm -rf /var/lib/apt/lists/ -# ENV GEM_HOME='root/gems' \ -# PATH="root/gems/bin:${PATH}" + + +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US:en \ + LC_ALL=en_US.UTF-8 \ + JEKYLL_ENV=production + +# install jekyll and dependencies RUN gem install jekyll bundler + RUN mkdir /srv/jekyll + ADD Gemfile /srv/jekyll + WORKDIR /srv/jekyll -RUN bundle install \ No newline at end of file + +RUN bundle install --no-cache +# && rm -rf /var/lib/gems/3.1.0/cache +EXPOSE 8080 + +COPY bin/entry_point.sh /tmp/entry_point.sh + +CMD ["/tmp/entry_point.sh"] diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..7f32efb --- /dev/null +++ b/FAQ.md @@ -0,0 +1,83 @@ +# Frequently Asked Questions + +Here are some frequently asked questions. If you have a different question, please check if it was not already answered in the Q&A section of the [GitHub Discussions](https://github.com/alshedivat/al-folio/discussions/categories/q-a). If not, feel free to ask a new question there. + +- [After I create a new repository from this template and setup the repo, I get a deployment error. Isn't the website supposed to correctly deploy automatically?](#after-i-create-a-new-repository-from-this-template-and-setup-the-repo-i-get-a-deployment-error-isnt-the-website-supposed-to-correctly-deploy-automatically) +- [I am using a custom domain (e.g., `foo.com`). My custom domain becomes blank in the repository settings after each deployment. How do I fix that?](#i-am-using-a-custom-domain-eg-foocom-my-custom-domain-becomes-blank-in-the-repository-settings-after-each-deployment-how-do-i-fix-that) +- [My webpage works locally. But after deploying, it fails to build and throws `Unknown tag 'toc'`. How do I fix that?](#my-webpage-works-locally-but-after-deploying-it-fails-to-build-and-throws-unknown-tag-toc-how-do-i-fix-that) +- [My webpage works locally. But after deploying, it is not displayed correctly (CSS and JS are not loaded properly). How do I fix that?](#my-webpage-works-locally-but-after-deploying-it-is-not-displayed-correctly-css-and-js-are-not-loaded-properly-how-do-i-fix-that) +- [Atom feed doesn't work. Why?](#atom-feed-doesnt-work-why) +- [My site doesn't work when I enable `related_blog_posts`. Why?](#my-site-doesnt-work-when-i-enable-related_blog_posts-why) +- [When trying to deploy, it's asking for github login credentials, which github disabled password authentication and it exits with an error. How to fix?](#when-trying-to-deploy-its-asking-for-github-login-credentials-which-github-disabled-password-authentication-and-it-exits-with-an-error-how-to-fix) +- [When I manually run the Lighthouse Badger workflow, it fails with `Error: Input required and not supplied: token`. How do I fix that?](#when-i-manually-run-the-lighthouse-badger-workflow-it-fails-with-error-input-required-and-not-supplied-token-how-do-i-fix-that) +- [My code runs fine locally, but when I create a commit and submit it, it fails with `prettier code formatter workflow run failed for master branch`. How do I fix that?](#my-code-runs-fine-locally-but-when-i-create-a-commit-and-submit-it-it-fails-with-prettier-code-formatter-workflow-run-failed-for-master-branch-how-do-i-fix-that) +- [After I update my site with some new content, even a small change, the GitHub action throws an error or displays a warning. What happened?](#after-i-update-my-site-with-some-new-content-even-a-small-change-the-github-action-throws-an-error-or-displays-a-warning-what-happened) +- [I am trying to deploy my site, but it fails with `Could not find gem 'jekyll-diagrams' in locally installed gems`. How do I fix that?](#i-am-trying-to-deploy-my-site-but-it-fails-with-could-not-find-gem-jekyll-diagrams-in-locally-installed-gems-how-do-i-fix-that) +- [How can I update Font Awesome version on the template](#how-can-i-update-font-awesome-version-on-the-template) + +--- + +#### After I create a new repository from this template and setup the repo, I get a deployment error. Isn't the website supposed to correctly deploy automatically? + +Yes, if you are using release `v0.3.5` or later, the website will automatically and correctly re-deploy right after your first commit. Please make some changes (e.g., change your website info in `_config.yml`), commit, and push. Make sure to follow [deployment instructions](https://github.com/alshedivat/al-folio#deployment). (Relevant issue: [209](https://github.com/alshedivat/al-folio/issues/209#issuecomment-798849211).) + +#### I am using a custom domain (e.g., `foo.com`). My custom domain becomes blank in the repository settings after each deployment. How do I fix that? + +You need to add `CNAME` file to the `master` or `source` branch of your repository. The file should contain your custom domain name. (Relevant issue: [130](https://github.com/alshedivat/al-folio/issues/130).) + +#### My webpage works locally. But after deploying, it fails to build and throws `Unknown tag 'toc'`. How do I fix that? + +Make sure you followed through the [deployment instructions](#deployment) in the previous section. You should have set the deployment branch to `gh-pages`. (Related issue: [1438](https://github.com/alshedivat/al-folio/issues/1438).) + +#### My webpage works locally. But after deploying, it is not displayed correctly (CSS and JS are not loaded properly). How do I fix that? + +If the website does not load the theme, the layout looks weird, and all links are broken, make sure to correctly specify the `url` and `baseurl` paths in `_config.yml`. Set `url` to `https://.github.io` or to `https://` if you are using a custom domain. If you are deploying a personal or organization website, leave `baseurl` blank. If you are deploying a project page, set `baseurl: //`. If all previous steps were done correctly, all is missing is [for your browser to fetch again the site stylesheet](https://github.com/alshedivat/al-folio/issues/1398#issuecomment-1609518404). + +#### Atom feed doesn't work. Why? + +Make sure to correctly specify the `url` and `baseurl` paths in `_config.yml`. RSS Feed plugin works with these correctly set up fields: `title`, `url`, `description` and `author`. Make sure to fill them in an appropriate way and try again. + +#### My site doesn't work when I enable `related_blog_posts`. Why? + +This is probably due to the [classifier reborn](https://github.com/jekyll/classifier-reborn) plugin, which is used to calculate related posts. If the error states `Liquid Exception: Zero vectors can not be normalized...` or `sqrt': Numerical argument is out of domain - "sqrt"`, it means that it could not calculate related posts for a specific post. This is usually caused by [empty or minimal blog posts](https://github.com/jekyll/classifier-reborn/issues/64) without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even [specific characters](https://github.com/jekyll/classifier-reborn/issues/194) you used in your posts. Also, the calculus for similar posts are made for every `post`, which means every page that uses `layout: post`, including the announcements. To change this behavior, simply add `related_posts: false` to the front matter of the page you don't want to display related posts on. Another solution is to disable the lsi (latent semantic indexing) entirely by removing the `--lsi` flag in the code. Related issue: [#1828](https://github.com/alshedivat/al-folio/issues/1828). + +#### When trying to deploy, it's asking for github login credentials, which github disabled password authentication and it exits with an error. How to fix? + +Open .git/config file using your preferred editor. Change the `https` portion of the `url` variable to `ssh`. Try deploying again. + +#### When I manually run the [Lighthouse Badger](https://github.com/alshedivat/al-folio/actions/workflows/lighthouse-badger.yml) workflow, it fails with `Error: Input required and not supplied: token`. How do I fix that? + +You need to [create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) and [add it as a secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-encrypted-secrets-for-a-repository) named `LIGHTHOUSE_BADGER_TOKEN` to your repository. For more information, check [lighthouse-badger documentation](https://github.com/MyActionWay/lighthouse-badger-workflows#lighthouse-badger-easyyml) on how to do this. + +#### My code runs fine locally, but when I create a commit and submit it, it fails with `prettier code formatter workflow run failed for master branch`. How do I fix that? + +We implemented support for [Prettier code formatting](https://prettier.io/) in [#2048](https://github.com/alshedivat/al-folio/pull/2048). It basically ensures that your code is well formatted. If you want to ensure your code is compliant with `Prettier` you can install it in your computer [integrated with an editor](https://prettier.io/docs/en/editors), [install it and run manually](https://prettier.io/docs/en/install), or you can disable it for your repo. For this, just delete the file [.github/workflows/prettier.yml](https://github.com/alshedivat/al-folio/blob/master/.github/workflows/prettier.yml). + +#### After I update my site with some new content, even a small change, the GitHub action throws an error or displays a warning. What happened? + +Probably your GitHub workflow is throwing an error like this: + +```bash +/opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.5/lib/bundler/runtime.rb:304:in `check_for_activated_spec!': You have already activated uri 0.10.1, but your Gemfile requires uri 0.13.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError) +``` + +or maybe displaying a warning like one of these: + +``` +Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. +Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/cache@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. +The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/ +The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ +``` + +If that's the case, you are using deprecated libraries/commands. This happens because you are using a very old version of al-folio. To fix this it is recommended [upgrading your code to the latest version](INSTALL.md#upgrading-from-a-previous-version) of the template. You will probably need to do some manual merging. If you find it easier, you could create a copy of your repository, do a fresh installation from the template and reapply all your changes. For this I would recommend a tool like [meld](https://meldmerge.org/) or [winmerge](https://winmerge.org/) to check the differences between directories/files. + +Note that libraries tend to be deprecated and support for them dropped as they are no longer maintained, and keep using them involves security breaches. Also, some of these deprecations are enforced, for example, by GitHub itself, so there's so much we can do. We have also added tons of new functionality, as well as tidying things up and improving the overall speed and structure, so you could also benefit from these improvements. + +#### I am trying to deploy my site, but it fails with `Could not find gem 'jekyll-diagrams' in locally installed gems`. How do I fix that? + +`jekyll-diagrams` support was dropped in [#1992](https://github.com/alshedivat/al-folio/pull/1992) in favor of using `mermaid.js` directly. Simply [update your code](INSTALL.md#upgrading-from-a-previous-version) to get the latest changes. + +#### How can I update Font Awesome version on the template + +To update the Font Awesome version, you need to download the latest release "for the web" from the [Font Awesome website](https://fontawesome.com/download). After downloading, extract the zip file and copy the `scss/` directory content to `_sass/font-awesome/` and the `webfonts/` content to `assets/webfonts/`. diff --git a/Gemfile b/Gemfile index 138ffab..46ff643 100644 --- a/Gemfile +++ b/Gemfile @@ -3,10 +3,11 @@ group :jekyll_plugins do gem 'classifier-reborn' gem 'jekyll' gem 'jekyll-archives' - gem 'jekyll-diagrams' gem 'jekyll-email-protect' gem 'jekyll-feed' + gem 'jekyll-get-json' gem 'jekyll-imagemagick' + gem 'jekyll-jupyter-notebook' gem 'jekyll-link-attributes' gem 'jekyll-minifier' gem 'jekyll-paginate-v2' @@ -18,9 +19,9 @@ group :jekyll_plugins do gem 'mini_racer' gem 'unicode_utils' gem 'webrick' - gem 'jekyll-admin' end group :other_plugins do + gem 'css_parser' gem 'feedjira' gem 'httparty' end diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..62ec84a --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,232 @@ +# Table of Contents + +- [Table of Contents](#table-of-contents) +- [Installing and Deploying](#installing-and-deploying) + - [Recommended Approach](#recommended-approach) + - [Local Setup on Windows](#local-setup-on-windows) + - [Local Setup using Docker (Recommended)](#local-setup-using-docker-recommended) + - [Build your own docker image](#build-your-own-docker-image) + - [Local Setup with Development Containers](#local-setup-with-development-containers) + - [Local Setup (Legacy, no longer supported)](#local-setup-legacy-no-longer-supported) + - [Deployment](#deployment) + - [For personal and organization webpages](#for-personal-and-organization-webpages) + - [For project pages](#for-project-pages) + - [Enabling automatic deployment](#enabling-automatic-deployment) + - [Manual deployment to GitHub Pages](#manual-deployment-to-github-pages) + - [Deployment to another hosting server (non GitHub Pages)](#deployment-to-another-hosting-server-non-github-pages) + - [Deployment to a separate repository (advanced users only)](#deployment-to-a-separate-repository-advanced-users-only) + - [Upgrading from a previous version](#upgrading-from-a-previous-version) + +# Installing and Deploying + +## Recommended Approach + +The recommended approach for using **al-folio** is to first create your own site using the template with as few changes as possible, and only when it is up and running customize it however you like. This way it is easier to pinpoint what causes a potential issue in case of a bug. The minimum steps required to create your own site are: + +1. Create a new repository using this template. For this, click on [Use this template -> Create a new repository](https://github.com/new?template_name=al-folio&template_owner=alshedivat) above the file list. If you plan to upload your site to `.github.io`, note that the name of your repository :warning: **MUST BE** :warning: `.github.io` or `.github.io`, as stated in the [GitHub pages docs](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites). +2. In this new repository, go to `Settings -> Actions -> General -> Workflow permissions` and give `Read and write permissions` to GitHub Actions. +3. Open file `_config.yml`, set `url` to `https://.github.io` and leave `baseurl` **empty** (do NOT delete it). +4. Wait until the GitHub actions finish (check your repository **Actions** tab). Now, in addition to the master branch, your repository has a newly built gh-pages branch. +5. Finally, in the repository page go to `Settings -> Pages -> Build and deployment`, make sure that `Source` is set to `Deploy from a branch` and set the branch to `gh-pages` (NOT to master). +6. Wait until the GitHub actions finish (check your repository **Actions** tab), then simply navigate to `https://.github.io` in your browser. At this point you should see a copy of the theme's [demo website](https://alshedivat.github.io/al-folio/). + +After everything is set up, you can download the repository to your machine and start customizing it. To do so, run the following commands: + +```bash +$ git clone git@github.com:/.git +``` + +Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0.3.5), **al-folio** will automatically re-deploy your webpage each time you push new changes to your repository! :sparkles: + +## Local setup on Windows + +If you are using Windows, it is **highly recommended** to use [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install), which is a compatibility layer for running Linux on top of Windows. You can follow [these instructions](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support) to install WSL and Ubuntu on your machine. You only need to go up to the step 4 of the tutorial (you don't have to enable the optional `systemd` nor the graphical applications), and then you can follow the instructions below to install docker. You can install docker natively on Windows as well, but it has been having some issues as can be seen in [#1540](https://github.com/alshedivat/al-folio/issues/1540), [#2007](https://github.com/alshedivat/al-folio/issues/2007). + +## Local setup using Docker (Recommended) + +Using Docker to install Jekyll and Ruby dependencies is the easiest way. + +You need to take the following steps to get `al-folio` up and running on your local machine: + +- First, install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/). +- Finally, run the following command that will pull the latest pre-built image from DockerHub and will run your website. + +```bash +$ docker compose pull +$ docker compose up +``` + +Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to `http://localhost:8080`. You should see a copy of the theme's demo website. + +Now, feel free to customize the theme however you like (don't forget to change the name!). Also, your changes should be automatically rendered in real-time (or maybe after a few seconds). + +> Beta: You can also use the slimmed docker image with a size below 100MBs and exact same functionality. Just use `docker compose -f docker-compose-slim.yml up` + +### Build your own docker image + +> Note: this approach is only necessary if you would like to build an older or very custom version of al-folio. + +Build and run a new docker image using: + +```bash +$ docker compose up --build +``` + +> If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again using `--force-recreate` argument at the end of the previous command! It will download Ruby and Jekyll and install all Ruby packages again from scratch. + +If you want to use a specific docker version, you can do so by changing `latest` tag to `your_version` in `docker-compose.yaml`. For example, you might have created your website on `v0.10.0` and you want to stick with that. + +## Local Setup with Development Containers + +`al-folio` supports [Development Containers](https://containers.dev/supporting). +For example, when you open the repository with Visual Studio Code (VSCode), it prompts you to install the necessary extension and automatically install everything necessary. + +## Local Setup (Legacy, no longer supported) + +For a hands-on walkthrough of running al-folio locally without using Docker, check out [this cool blog post](https://george-gca.github.io/blog/2022/running-local-al-folio/) by one of the community members! + +Assuming you have [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/) installed on your system (_hint: for ease of managing ruby gems, consider using [rbenv](https://github.com/rbenv/rbenv)_), and also [Python](https://www.python.org/) and [pip](https://pypi.org/project/pip/) (_hint: for ease of managing python packages, consider using a virtual environment, like [venv](https://docs.python.org/pt-br/3/library/venv.html) or [conda](https://docs.conda.io/en/latest/)_). + +```bash +$ bundle install +# assuming pip is your Python package manager +$ pip install jupyter +$ bundle exec jekyll serve --lsi +``` + +To see the template running, open your browser and go to `http://localhost:4000`. You should see a copy of the theme's [demo website](https://alshedivat.github.io/al-folio/). Now, feel free to customize the theme however you like. After you are done, remember to **commit** your final changes. + +## Deployment + +Deploying your website to [GitHub Pages](https://pages.github.com/) is the most popular option. +Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0.3.5), **al-folio** will automatically re-deploy your webpage each time you push new changes to your repository **main branch**! :sparkles: + +### For personal and organization webpages + +1. The name of your repository **MUST BE** `.github.io` or `.github.io`. +2. In `_config.yml`, set `url` to `https://.github.io` and leave `baseurl` empty. +3. Set up automatic deployment of your webpage (see instructions below). +4. Make changes to your main branch, commit, and push! +5. After deployment, the webpage will become available at `.github.io`. + +### For project pages + +1. In `_config.yml`, set `url` to `https://.github.io` and `baseurl` to `//`. +2. Set up automatic deployment of your webpage (see instructions below). +3. Make changes to your main branch, commit, and push! +4. After deployment, the webpage will become available at `.github.io//`. + +### Enabling automatic deployment + +1. Click on **Actions** tab and **Enable GitHub Actions**; do not worry about creating any workflows as everything has already been set for you. +2. Go to `Settings -> Actions -> General -> Workflow permissions`, and give `Read and write permissions` to GitHub Actions +3. Make any other changes to your webpage, commit, and push to your main branch. This will automatically trigger the **Deploy** action. +4. Wait for a few minutes and let the action complete. You can see the progress in the **Actions** tab. If completed successfully, in addition to the `master` branch, your repository should now have a newly built `gh-pages` branch. **Do NOT touch this branch!** +5. Finally, in the **Settings** of your repository, in the Pages section, set the branch to `gh-pages` (**NOT** to `master`). For more details, see [Configuring a publishing source for your GitHub Pages site](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source). + +If you keep your site on another branch, open `.github/workflows/deploy.yml` **on the branch you keep your website on** and change `on->push->branches` and `on->pull\_request->branches` to the branch you keep your website on. This will trigger the action on pulls/pushes on that branch. The action will then deploy the website on the branch it was triggered from. + +### Manual deployment to GitHub Pages + +If you need to manually re-deploy your website to GitHub pages, go to Actions, click "Deploy" in the left sidebar, then "Run workflow." + +### Deployment to another hosting server (non GitHub Pages) + +If you decide to not use GitHub Pages and host your page elsewhere, simply run: + +```bash +$ bundle exec jekyll build --lsi +``` + +which will (re-)generate the static webpage in the `_site/` folder. +Then simply copy the contents of the `_site/` directory to your hosting server. + +If you also want to remove unused css classes from your file, run: + +```bash +$ purgecss -c purgecss.config.js +``` + +which will replace the css files in the `_site/assets/css/` folder with the purged css files. + +**Note:** Make sure to correctly set the `url` and `baseurl` fields in `_config.yml` before building the webpage. If you are deploying your webpage to `your-domain.com/your-project/`, you must set `url: your-domain.com` and `baseurl: /your-project/`. If you are deploying directly to `your-domain.com`, leave `baseurl` blank, **do not delete it**. + +### Deployment to a separate repository (advanced users only) + +**Note:** Do not try using this method unless you know what you are doing (make sure you are familiar with [publishing sources](https://help.github.com/en/github/working-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites)). This approach allows to have the website's source code in one repository and the deployment version in a different repository. + +Let's assume that your website's publishing source is a `publishing-source` subdirectory of a git-versioned repository cloned under `$HOME/repo/`. +For a user site this could well be something like `$HOME/.github.io`. + +Firstly, from the deployment repo dir, checkout the git branch hosting your publishing source. + +Then from the website sources dir (commonly your al-folio fork's clone): + +```bash +$ bundle exec jekyll build --lsi --destination $HOME/repo/publishing-source +``` + +This will instruct jekyll to deploy the website under `$HOME/repo/publishing-source`. + +**Note:** Jekyll will clean `$HOME/repo/publishing-source` before building! + +The quote below is taken directly from the [jekyll configuration docs](https://jekyllrb.com/docs/configuration/options/): + +> Destination folders are cleaned on site builds +> +> The contents of `` are automatically cleaned, by default, when the site is built. Files or folders that are not created by your site will be removed. Some files could be retained by specifying them within the `` configuration directive. +> +> Do not use an important location for ``; instead, use it as a staging area and copy files from there to your web server. + +If `$HOME/repo/publishing-source` contains files that you want jekyll to leave untouched, specify them under `keep_files` in `_config.yml`. +In its default configuration, al-folio will copy the top-level `README.md` to the publishing source. If you want to change this behavior, add `README.md` under `exclude` in `_config.yml`. + +**Note:** Do _not_ run `jekyll clean` on your publishing source repo as this will result in the entire directory getting deleted, irrespective of the content of `keep_files` in `_config.yml`. + +## Upgrading from a previous version + +If you installed **al-folio** as described above, you can configure a [GitHub action](https://github.com/AndreasAugustin/actions-template-sync) to automatically sync your repository with the latest version of the theme. + +Go to Settings -> Actions -> General -> Workflow permissions, give Read and write permissions to GitHub Actions, check "Allow GitHub Actions to create and approve pull requests", and save your changes. + +Then go to Actions -> New workflow -> set up a workflow yourself, setup the following workflow and commit your changes: + +```yaml +name: Sync from template +on: + # cronjob trigger + schedule: + - cron: "0 0 1 * *" + # manual trigger + workflow_dispatch: +jobs: + repo-sync: + runs-on: ubuntu-latest + steps: + # To use this repository's private action, you must check out the repository + - name: Checkout + uses: actions/checkout@v4 + - name: actions-template-sync + uses: AndreasAugustin/actions-template-sync@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + source_repo_path: alshedivat/al-folio + upstream_branch: master +``` + +You will receive a pull request within your repository if there are some changes available in the template. + +Another option is to manually update your code by following the steps below: + +```bash +# Assuming the current directory is +$ git remote add upstream https://github.com/alshedivat/al-folio.git +$ git fetch upstream +$ git rebase v0.11.0 +``` + +If you have extensively customized a previous version, it might be trickier to upgrade. +You can still follow the steps above, but `git rebase` may result in merge conflicts that must be resolved. +See [git rebase manual](https://help.github.com/en/github/using-git/about-git-rebase) and how to [resolve conflicts](https://help.github.com/en/github/using-git/resolving-merge-conflicts-after-a-git-rebase) for more information. +If rebasing is too complicated, we recommend re-installing the new version of the theme from scratch and port over your content and changes from the previous version manually. You can use tools like [meld](https://meldmerge.org/) +or [winmerge](https://winmerge.org/) to help in this process. diff --git a/README.md b/README.md index 2d6254c..4af3d39 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,26 @@ # al-folio - -[maintainers]: https://img.shields.io/badge/maintainers-4-success.svg 'Number of maintainers' - + +
+ +[![Preview](readme_preview/al-folio-preview.png)](https://alshedivat.github.io/al-folio/) + +**A simple, clean, and responsive [Jekyll](https://jekyllrb.com/) theme for academics.** + +--- [![deploy](https://github.com/alshedivat/al-folio/actions/workflows/deploy.yml/badge.svg)](https://github.com/alshedivat/al-folio/actions/workflows/deploy.yml) -[![demo](https://img.shields.io/badge/theme-demo-brightgreen.svg)](https://alshedivat.github.io/al-folio/) +[![Maintainers](https://img.shields.io/badge/maintainers-4-success.svg)](#maintainers) [![GitHub contributors](https://img.shields.io/github/contributors/alshedivat/al-folio.svg)](https://github.com/alshedivat/al-folio/graphs/contributors/) -[![Maintainers][maintainers]](#maintainers) -[![GitHub release](https://img.shields.io/github/v/release/alshedivat/al-folio)](https://github.com/alshedivat/al-folio/releases/latest) -[![GitHub license](https://img.shields.io/github/license/alshedivat/al-folio?color=blue)](https://github.com/alshedivat/al-folio/blob/master/LICENSE) -[![GitHub stars](https://img.shields.io/github/stars/alshedivat/al-folio)](https://github.com/alshedivat/al-folio) -[![GitHub forks](https://img.shields.io/github/forks/alshedivat/al-folio)](https://github.com/alshedivat/al-folio/fork) - [![Docker Image Version](https://img.shields.io/docker/v/amirpourmand/al-folio?sort=semver&label=docker%20image&color=blueviolet)](https://hub.docker.com/r/amirpourmand/al-folio) [![Docker Image Size](https://img.shields.io/docker/image-size/amirpourmand/al-folio?sort=date&label=docker%20image%20size&color=blueviolet)](https://hub.docker.com/r/amirpourmand/al-folio) [![Docker Pulls](https://img.shields.io/docker/pulls/amirpourmand/al-folio?color=blueviolet)](https://hub.docker.com/r/amirpourmand/al-folio) -A simple, clean, and responsive [Jekyll](https://jekyllrb.com/) theme for academics. -If you like the theme, give it a star! +[![GitHub release](https://img.shields.io/github/v/release/alshedivat/al-folio)](https://github.com/alshedivat/al-folio/releases/latest) +[![GitHub license](https://img.shields.io/github/license/alshedivat/al-folio?color=blue)](https://github.com/alshedivat/al-folio/blob/master/LICENSE) +[![GitHub stars](https://img.shields.io/github/stars/alshedivat/al-folio)](https://github.com/alshedivat/al-folio) +[![GitHub forks](https://img.shields.io/github/forks/alshedivat/al-folio)](https://github.com/alshedivat/al-folio/fork) -[![Preview](https://raw.githubusercontent.com/alshedivat/al-folio/master/assets/img/al-folio-preview.png)](https://alshedivat.github.io/al-folio/) +
## User community @@ -32,6 +33,7 @@ Feel free to add your own page(s) by sending a PR. Academics + @@ -100,6 +102,41 @@ Feel free to add your own page(s) by sending a PR. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -118,390 +155,139 @@ Feel free to add your own page(s) by sending a PR. Courses CMU PGM (S-19)
-CMU DeepRL (F-19, S-20, F-20, S-21, F-21, S-22)
+CMU DeepRL (S-21, F-21, S-22, F-22, S-23, F-23)
CMU MMML (F-20, F-22)
CMU AMMML (S-22, S-23)
CMU ASI (S-23)
-CMU Distributed Systems (S-21) +CMU Distributed Systems (S-24) Conferences & workshops -ICLR Blog Post Track (2023)
+ICLR Blog Post Track (2023, 2024)
ML Retrospectives (NeurIPS: 2019, 2020; ICML: 2020)
HAMLETS (NeurIPS: 2020)
ICBINB (NeurIPS: 2020, 2021)
Neural Compression (ICLR: 2021)
Score Based Methods (NeurIPS: 2022)
-Images2Symbols (CogSci: 2022) +Images2Symbols (CogSci: 2022)
+Medical Robotics Junior Faculty Forum (ISMR: 2023)
+Beyond Vision: Physics meets AI (ICIAP: 2023)
+Workshop on Diffusion Models (NeurIPS: 2023) ## Lighthouse PageSpeed Insights -[![Google PageSpeed](https://raw.githubusercontent.com/alshedivat/al-folio/master/assets/img/pagespeed.svg)](https://pagespeed.web.dev/report?url=https%3A%2F%2Falshedivat.github.io%2Fal-folio%2F&form_factor=desktop) +### Desktop + +[![Google Lighthouse PageSpeed Insights](lighthouse_results/desktop/pagespeed.svg)](https://htmlpreview.github.io/?https://github.com/alshedivat/al-folio/blob/master/lighthouse_results/desktop/alshedivat_github_io_al_folio_.html) + +Run the test yourself: [Google Lighthouse PageSpeed Insights](https://pagespeed.web.dev/report?url=https%3A%2F%2Falshedivat.github.io%2Fal-folio%2F&form_factor=desktop) + +### Mobile + +[![Google Lighthouse PageSpeed Insights](lighthouse_results/mobile/pagespeed.svg)](https://htmlpreview.github.io/?https://github.com/alshedivat/al-folio/blob/master/lighthouse_results/mobile/alshedivat_github_io_al_folio_.html) + +Run the test yourself: [Google Lighthouse PageSpeed Insights](https://pagespeed.web.dev/report?url=https%3A%2F%2Falshedivat.github.io%2Fal-folio%2F&form_factor=mobile) ## Table Of Contents - * [User community](#user-community) - * [Lighthouse PageSpeed Insights](#lighthouse-pagespeed-insights) - * [Getting started](#getting-started) - + [Installation](#installation) - - [Local setup using Docker (Recommended on Windows)](#local-setup-using-docker-recommended-on-windows) - - [Local Setup (Standard)](#local-setup-standard) - - [Deployment](#deployment) - - [Upgrading from a previous version](#upgrading-from-a-previous-version) - + [FAQ](#faq) - * [Features](#features) - + [Publications](#publications) - + [Collections](#collections) - + [Layouts](#layouts) +- [al-folio](#al-folio) + - [User community](#user-community) + - [Lighthouse PageSpeed Insights](#lighthouse-pagespeed-insights) + - [Desktop](#desktop) + - [Mobile](#mobile) + - [Table Of Contents](#table-of-contents) + - [Getting started](#getting-started) + - [Installing and Deploying](#installing-and-deploying) + - [Customizing](#customizing) + - [Features](#features) + - [Light/Dark Mode](#lightdark-mode) + - [CV](#cv) + - [People](#people) + - [Publications](#publications) + - [Collections](#collections) + - [Layouts](#layouts) - [The iconic style of Distill](#the-iconic-style-of-distill) - - [Full support for math & code](#full-support-for-math--code) - - [Photos](#photos) - + [Other features](#other-features) - - [GitHub repositories and user stats](#github-repositories-and-user-stats) + - [Full support for math \& code](#full-support-for-math--code) + - [Photos, Audio, Video and more](#photos-audio-video-and-more) + - [Other features](#other-features) + - [GitHub's repositories and user stats](#githubs-repositories-and-user-stats) - [Theming](#theming) - [Social media previews](#social-media-previews) - [Atom (RSS-like) Feed](#atom-rss-like-feed) - [Related posts](#related-posts) - * [Contributing](#contributing) - + [Core Contributors](#core-contributors) - * [License](#license) + - [Code quality checks](#code-quality-checks) + - [FAQ](#faq) + - [Contributing](#contributing) + - [Maintainers](#maintainers) + - [All Contributors](#all-contributors) + - [Star History](#star-history) + - [License](#license) ## Getting started -Want to learn more about Jekyll? Check out [this tutorial](https://www.taniarascia.com/make-a-static-website-with-jekyll/). -Why Jekyll? Read [Andrej Karpathy's blog post](https://karpathy.github.io/2014/07/01/switching-to-jekyll/)! - -### Installation - -For a hands-on walkthrough of al-folio installation, check out [this cool video tutorial](https://www.youtube.com/watch?v=g6AJ9qPPoyc) by one of the community members! 🎬 🍿 - -The preferred way of using this template is by clicking in [Use this template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) above the file list. -Then, create a new repository at `github.com:/`. If you plan to upload your site to `.github.io`, -note that the name of your repository must be `.github.io` or `.github.io`, as stated in the [GitHub pages docs](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites). -For more information on how to deploy your site, check the [Deployment](#deployment) section below. After you created your new repository, just download it to your machine: - -```bash -$ git clone git@github.com:/.git -$ cd -``` - ---- - -#### Local setup using Docker (Recommended on Windows) - -You need to take the following steps to get `al-folio` up and running in your local machine: - -- First, install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/). -- Finally, run the following command that will pull a pre-built image from DockerHub and will run your website. +Want to learn more about Jekyll? Check out [this tutorial](https://www.taniarascia.com/make-a-static-website-with-jekyll/). Why Jekyll? Read [Andrej Karpathy's blog post](https://karpathy.github.io/2014/07/01/switching-to-jekyll/)! Why write a blog? Read [Rachel Thomas blog post](https://medium.com/@racheltho/why-you-yes-you-should-blog-7d2544ac1045). -```bash -$ docker-compose up -``` - -Note that when you run it for the first time, it will download a docker image of size 300MB or so. - -Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (`docker-compose up`) to render the webpage with all you changes. Also, make sure to commit your final changes. - -> To change port number, you can edit `docker-compose.yml` file. +## Installing and Deploying -
(click to expand) Build your own docker image: - -> Note: this approach is only necessary if you would like to build an older or very custom version of al-folio. - -Build and run a new docker image using: - -```bash -$ docker-compose -f docker-local.yml up -``` +For installation and deployment details please refer to [INSTALL.md](INSTALL.md). -> If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again using `--force-recreate` argument at the end of previous command! It will download ruby and jekyll and install all ruby packages again from scratch. +## Customizing -
+For customization details please refer to [CUSTOMIZE.md](CUSTOMIZE.md). ---- - -#### Local Setup (Standard) +## Features -Assuming you have [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/) installed on your system (*hint: for ease of managing ruby gems, consider using [rbenv](https://github.com/rbenv/rbenv)*). +### Light/Dark Mode -```bash -$ bundle install -$ bundle exec jekyll serve --lsi -``` +This template has a built-in light/dark mode. It detects the user preferred color scheme and automatically switches to it. You can also manually switch between light and dark mode by clicking on the sun/moon icon in the top right corner of the page. -Now, feel free to customize the theme however you like (don't forget to change the name!). -After you are done, **commit** your final changes. +

+ + +

--- -#### Deployment - -Deploying your website to [GitHub Pages](https://pages.github.com/) is the most popular option. -Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0.3.5), **al-folio** will automatically re-deploy your webpage each time you push new changes to your repository! :sparkles: - -**For personal and organization webpages:** - -1. The name of your repository **MUST BE** `.github.io` or `.github.io`. -2. In `_config.yml`, set `url` to `https://.github.io` and leave `baseurl` empty. -3. Set up automatic deployment of your webpage (see instructions below). -4. Make changes, commit, and push! -5. After deployment, the webpage will become available at `.github.io`. - -**For project pages:** - -1. In `_config.yml`, set `url` to `https://.github.io` and `baseurl` to `//`. -2. Set up automatic deployment of your webpage (see instructions below). -3. Make changes, commit, and push! -4. After deployment, the webpage will become available at `.github.io//`. - -**To enable automatic deployment:** - -1. Click on **Actions** tab and **Enable GitHub Actions**; do not worry about creating any workflows as everything has already been set for you. -2. Go to Settings -> Actions -> General -> Workflow permissions, and give **Read and write permissions** to GitHub Actions -3. Make any other changes to your webpage, commit, and push. This will automatically trigger the **Deploy** action. -4. Wait for a few minutes and let the action complete. You can see the progress in the **Actions** tab. If completed successfully, in addition to the `master` branch, your repository should now have a newly built `gh-pages` branch. -5. Finally, in the **Settings** of your repository, in the Pages section, set the branch to `gh-pages` (**NOT** to `master`). For more details, see [Configuring a publishing source for your GitHub Pages site](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source). - -If you keep your site on another branch, open `.github/workflows/deploy.yml` **on the branch you keep your website on** and change on->push->branches and on->pull\_request->branches to the branch you keep your website on. This will trigger the action on pulls/pushes on that branch. The action will then deploy the website on the branch it was triggered from. - -
(click to expand) Manual deployment to GitHub Pages: - -If you need to manually re-deploy your website to GitHub pages, go to Actions, click "Deploy" in the left sidebar, then "Run workflow." - -
- -
(click to expand) Deployment to another hosting server (non GitHub Pages): - -If you decide to not use GitHub Pages and host your page elsewhere, simply run: - -```bash -$ bundle exec jekyll build --lsi -``` - -which will (re-)generate the static webpage in the `_site/` folder. -Then simply copy the contents of the `_site/` directory to your hosting server. +### CV -**Note:** Make sure to correctly set the `url` and `baseurl` fields in `_config.yml` before building the webpage. If you are deploying your webpage to `your-domain.com/your-project/`, you must set `url: your-domain.com` and `baseurl: /your-project/`. If you are deploying directly to `your-domain.com`, leave `baseurl` blank. +There are currently 2 different ways of generating the CV page content. The first one is by using a json file located in [assets/json/resume.json](assets/json/resume.json). It is a [known standard](https://jsonresume.org/) for creating a CV programmatically. The second one, currently used as a fallback when the json file is not found, is by using a yml file located in [\_data/cv.yml](_data/cv.yml). This was the original way of creating the CV page content and since it is more human readable than a json file we decided to keep it as an option. -
+What this means is, if there is no resume data defined in [\_config.yml](_config.yml) and loaded via a json file, it will load the contents of [\_data/cv.yml](_data/cv.yml) as fallback. -
(click to expand) Deployment to a separate repository (advanced users only): - -**Note:** Do not try using this method unless you know what you are doing (make sure you are familiar with [publishing sources](https://help.github.com/en/github/working-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites)). This approach allows to have the website's source code in one repository and the deployment version in a different repository. - -Let's assume that your website's publishing source is a `publishing-source` subdirectory of a git-versioned repository cloned under `$HOME/repo/`. -For a user site this could well be something like `$HOME/.github.io`. - -Firstly, from the deployment repo dir, checkout the git branch hosting your publishing source. - -Then from the website sources dir (commonly your al-folio fork's clone): - -```bash -$ bundle exec jekyll build --lsi --destination $HOME/repo/publishing-source -``` - -This will instruct jekyll to deploy the website under `$HOME/repo/publishing-source`. - -**Note:** Jekyll will clean `$HOME/repo/publishing-source` before building! - -The quote below is taken directly from the [jekyll configuration docs](https://jekyllrb.com/docs/configuration/options/): - -> Destination folders are cleaned on site builds -> -> The contents of `` are automatically cleaned, by default, when the site is built. Files or folders that are not created by your site will be removed. Some files could be retained by specifying them within the `` configuration directive. -> -> Do not use an important location for ``; instead, use it as a staging area and copy files from there to your web server. - -If `$HOME/repo/publishing-source` contains files that you want jekyll to leave untouched, specify them under `keep_files` in `_config.yml`. -In its default configuration, al-folio will copy the top-level `README.md` to the publishing source. If you want to change this behavior, add `README.md` under `exclude` in `_config.yml`. - -**Note:** Do _not_ run `jekyll clean` on your publishing source repo as this will result in the entire directory getting deleted, irrespective of the content of `keep_files` in `_config.yml`. - -
+[![CV Preview](readme_preview/cv.png)](https://alshedivat.github.io/al-folio/cv/) --- -#### Upgrading from a previous version - -If you installed **al-folio** as described above, you can configure a [GitHub action](https://github.com/AndreasAugustin/actions-template-sync) to automatically sync your repository with the latest version of the theme. - -Go to Settings -> Actions -> General -> Workflow permissions, give Read and write permissions to GitHub Actions, check "Allow GitHub Actions to create and approve pull requests", and save your changes. - -Then go to Actions -> New workflow -> set up a workflow yourself, setup the following workflow and commit your changes: - -```yaml -name: Sync from template -on: - # cronjob trigger - schedule: - - cron: "0 0 1 * *" - # manual trigger - workflow_dispatch: -jobs: - repo-sync: - runs-on: ubuntu-latest - steps: - # To use this repository's private action, you must check out the repository - - name: Checkout - uses: actions/checkout@v3 - - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v0.7.3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_repo_path: alshedivat/al-folio - upstream_branch: master -``` - -You will receive a pull request within your repository if there are some changes available in the template. +### People -Another option is to manually update your code by following the steps below: +You can create a people page if you want to feature more than one person. Each person can have its own short bio, profile picture, and you can also set if every person will appear at the same or opposite sides. -```bash -# Assuming the current directory is -$ git remote add upstream https://github.com/alshedivat/al-folio.git -$ git fetch upstream -$ git rebase v0.9.0 -``` - -If you have extensively customized a previous version, it might be trickier to upgrade. -You can still follow the steps above, but `git rebase` may result in merge conflicts that must be resolved. -See [git rebase manual](https://help.github.com/en/github/using-git/about-git-rebase) and how to [resolve conflicts](https://help.github.com/en/github/using-git/resolving-merge-conflicts-after-a-git-rebase) for more information. -If rebasing is too complicated, we recommend re-installing the new version of the theme from scratch and port over your content and changes from the previous version manually. +[![People Preview](readme_preview/people.png)](https://alshedivat.github.io/al-folio/people/) --- -### FAQ - -Here are some frequently asked questions. -If you have a different question, please ask using [Discussions](https://github.com/alshedivat/al-folio/discussions/categories/q-a). - -1. **Q:** After I create a new repository from this template and setup the repo, I get a deployment error. - Isn't the website supposed to correctly deploy automatically?
- **A:** Yes, if you are using release `v0.3.5` or later, the website will automatically and correctly re-deploy right after your first commit. - Please make some changes (e.g., change your website info in `_config.yml`), commit, and push. - Make sure to follow [deployment instructions](https://github.com/alshedivat/al-folio#deployment) in the previous section. - (Relevant issue: [209](https://github.com/alshedivat/al-folio/issues/209#issuecomment-798849211).) - -2. **Q:** I am using a custom domain (e.g., `foo.com`). - My custom domain becomes blank in the repository settings after each deployment. - How do I fix that?
- **A:** You need to add `CNAME` file to the `master` or `source` branch of your repository. - The file should contain your custom domain name. - (Relevant issue: [130](https://github.com/alshedivat/al-folio/issues/130).) - -3. **Q:** My webpage works locally. - But after deploying, it is not displayed correctly (CSS and JS is not loaded properly). - How do I fix that?
- **A:** Make sure to correctly specify the `url` and `baseurl` paths in `_config.yml`. - Set `url` to `https://.github.io` or to `https://` if you are using a custom domain. - If you are deploying a personal or organization website, leave `baseurl` blank. - If you are deploying a project page, set `baseurl: //`. - -4. **Q:** Atom feed doesn't work. Why? -
- **A:** Make sure to correctly specify the `url` and `baseurl` paths in `_config.yml`. - RSS Feed plugin works with these correctly set up fields: `title`, `url`, `description` and `author`. - Make sure to fill them in an appropriate way and try again. - -5. **Q:** My site doesn't work when I enable `related_blog_posts`. Why?
- **A:** This is probably due to the [classifier reborn](https://github.com/jekyll/classifier-reborn) plugin, which is used to calculate - related posts. If the error states `Liquid Exception: Zero vectors can not be normalized...`, it means that it could not calculate related - posts for a specific post. This is usually caused by [empty or minimal blog posts](https://github.com/jekyll/classifier-reborn/issues/64) - without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even - [specific characters](https://github.com/jekyll/classifier-reborn/issues/194) you used in your posts. Also, the calculus for similar posts are - made for every `post`, which means every page that uses `layout: post`, including the announcements. To change this behavior, simply add - `related_posts: false` to the front matter of the page you don't want to display related posts on. - -## Features - ### Publications -Your publications' page is generated automatically from your BibTex bibliography. -Simply edit `_bibliography/papers.bib`. -You can also add new `*.bib` files and customize the look of your publications however you like by editing `_pages/publications.md`. - -

- -
(click to expand) Author annotation: - -In publications, the author entry for yourself is identified by string array `scholar:last_name` and string array `scholar:first_name` in `_config.yml`: - -```yaml -scholar: - last_name: [Einstein] - first_name: [Albert, A.] -``` - -If the entry matches one form of the last names and the first names, it will be underlined. -Keep meta-information about your co-authors in `_data/coauthors.yml` and Jekyll will insert links to their webpages automatically. -The co-author data format in `_data/coauthors.yml` is as follows, - -```yaml -"Adams": - - firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"] - url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams - -"Podolsky": - - firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"] - url: https://en.wikipedia.org/wiki/Boris_Podolsky - -"Rosen": - - firstname: ["Nathan", "N."] - url: https://en.wikipedia.org/wiki/Nathan_Rosen - -"Bach": - - firstname: ["Johann Sebastian", "J. S."] - url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach +Your publications' page is generated automatically from your BibTex bibliography. Simply edit [\_bibliography/papers.bib](_bibliography/papers.bib). You can also add new `*.bib` files and customize the look of your publications however you like by editing [\_pages/publications.md](_pages/publications.md). By default, the publications will be sorted by year and the most recent will be displayed first. You can change this behavior and more in the `Jekyll Scholar` section in [\_config.yml](_config.yml) file. - - firstname: ["Carl Philipp Emanuel", "C. P. E."] - url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach -``` - -If the entry matches one of the combinations of the last names and the first names, it will be highlighted and linked to the url provided. - -
- -
(click to expand) Buttons (through custom bibtex keywords): +You can add extra information to a publication, like a PDF file in the [assets/pdf/](assets/pdf/) directory and add the path to the PDF file in the BibTeX entry with the `pdf` field. Some of the supported fields are: `abstract`, `altmetric`, `arxiv`, `bibtex_show`, `blog`, `code`, `dimensions`, `doi`, `eprint`, `html`, `isbn`, `pdf`, `pmid`, `poster`, `slides`, `supp`, `video`, and `website`. -There are several custom bibtex keywords that you can use to affect how the entries are displayed on the webpage: - -- `abbr`: Adds an abbreviation to the left of the entry. You can add links to these by creating a venue.yaml-file in the _data folder and adding entries that match. -- `abstract`: Adds an "Abs" button that expands a hidden text field when clicked to show the abstract text -- `arxiv`: Adds a link to the Arxiv website (Note: only add the arxiv identifier here - the link is generated automatically) -- `bibtex_show`: Adds a "Bib" button that expands a hidden text field with the full bibliography entry -- `html`: Inserts an "HTML" button redirecting to the user-specified link -- `pdf`: Adds a "PDF" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) -- `supp`: Adds a "Supp" button to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) -- `blog`: Adds a "Blog" button redirecting to the specified link -- `code`: Adds a "Code" button redirecting to the specified link -- `poster`: Adds a "Poster" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) -- `slides`: Adds a "Slides" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory) -- `website`: Adds a "Website" button redirecting to the specified link -- `altmetric`: Adds an [Altmetric](https://www.altmetric.com/) badge (Note: if DOI is provided just use `true`, otherwise only add the altmetric identifier here - the link is generated automatically) -- `dimensions`: Adds a [Dimensions](https://www.dimensions.ai/) badge (Note: if DOI or PMID is provided just use `true`, otherwise only add the Dimensions' identifier here - the link is generated automatically) - -You can implement your own buttons by editing the bib.html file. - -
+[![Publications Preview](readme_preview/publications.png)](https://alshedivat.github.io/al-folio/publications/) --- ### Collections -This Jekyll theme implements `collections` to let you break up your work into categories. -The theme comes with two default collections: `news` and `projects`. -Items from the `news` collection are automatically displayed on the home page. -Items from the `projects` collection are displayed on a responsive grid on projects page. +This Jekyll theme implements `collections` to let you break up your work into categories. The theme comes with two default collections: `news` and `projects`. Items from the `news` collection are automatically displayed on the home page. Items from the `projects` collection are displayed on a responsive grid on projects page. -

+[![Projects Preview](readme_preview/projects.png)](https://alshedivat.github.io/al-folio/projects/) -You can easily create your own collections, apps, short stories, courses, or whatever your creative work is. -To do this, edit the collections in the `_config.yml` file, create a corresponding folder, and create a landing page for your collection, similar to `_pages/projects.md`. +You can easily create your own collections, apps, short stories, courses, or whatever your creative work is. To do this, edit the collections in the [\_config.yml](_config.yml) file, create a corresponding folder, and create a landing page for your collection, similar to `_pages/projects.md`. --- @@ -513,27 +299,26 @@ To do this, edit the collections in the `_config.yml` file, create a correspondi The theme allows you to create blog posts in the [distill.pub](https://distill.pub/) style: -

+[![Distill Preview](readme_preview/distill.png)](https://alshedivat.github.io/al-folio/blog/2021/distill/) For more details on how to create distill-styled posts using `` tags, please refer to [the example](https://alshedivat.github.io/al-folio/blog/2021/distill/). #### Full support for math & code -**al-folio** supports fast math typesetting through [MathJax](https://www.mathjax.org/) and code syntax highlighting using [GitHub style](https://github.com/jwarby/jekyll-pygments-themes): +**al-folio** supports fast math typesetting through [MathJax](https://www.mathjax.org/) and code syntax highlighting using [GitHub style](https://github.com/jwarby/jekyll-pygments-themes). Also supports [chartjs charts](https://www.chartjs.org/), [mermaid diagrams](https://mermaid-js.github.io/mermaid/#/), and [TikZ figures](https://tikzjax.com/).

- - + +

-#### Photos +#### Photos, Audio, Video and more -Photo formatting is made simple using [Bootstrap's grid system](https://getbootstrap.com/docs/4.4/layout/grid/). -Easily create beautiful grids within your blog posts and project pages: +Photo formatting is made simple using [Bootstrap's grid system](https://getbootstrap.com/docs/4.4/layout/grid/). Easily create beautiful grids within your blog posts and project pages, also with support for [video](https://alshedivat.github.io/al-folio/blog/2023/videos/) and [audio](https://alshedivat.github.io/al-folio/blog/2023/audios/) embeds:

- +

@@ -543,8 +328,9 @@ Easily create beautiful grids within your blog posts and project pages: #### GitHub's repositories and user stats -**al-folio** uses [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) and [github-profile-trophy](https://github.com/ryo-ma/github-profile-trophy) -to display GitHub repositories and user stats on the `/repositories/` page. +**al-folio** uses [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) and [github-profile-trophy](https://github.com/ryo-ma/github-profile-trophy) to display GitHub repositories and user stats on the `/repositories/` page. + +[![Repositories Preview](readme_preview/repositories.png)](https://alshedivat.github.io/al-folio/repositories/) Edit the `_data/repositories.yml` and change the `github_users` and `github_repos` lists to include your own GitHub profile and repositories to the `/repositories/` page. @@ -554,80 +340,78 @@ You may also use the following codes for displaying this in any other pages. {% if site.data.repositories.github_users %}
- {% for user in site.data.repositories.github_users %} - {% include repository/repo_user.html username=user %} - {% endfor %} + {% for user in site.data.repositories.github_users %} {% include repository/repo_user.liquid username=user %} {% endfor %}
{% endif %} -{% if site.repo_trophies.enabled %} -{% for user in site.data.repositories.github_users %} - {% if site.data.repositories.github_users.size > 1 %} -

{{ user }}

- {% endif %} -
- {% include repository/repo_trophies.html username=user %} -
-{% endfor %} +{% if site.repo_trophies.enabled %} {% for user in site.data.repositories.github_users %} {% if site.data.repositories.github_users.size > 1 %} +

{{ user }}

{% endif %} +
+ {% include repository/repo_trophies.liquid username=user %} +
+{% endfor %} {% endif %} {% if site.data.repositories.github_repos %}
- {% for repo in site.data.repositories.github_repos %} - {% include repository/repo.html repository=repo %} - {% endfor %} + {% for repo in site.data.repositories.github_repos %} {% include repository/repo.liquid repository=repo %} {% endfor %}
{% endif %} ``` +--- + #### Theming -A variety of beautiful theme colors have been selected for you to choose from. -The default is purple, but you can quickly change it by editing the -`--global-theme-color` variable in the `_sass/_themes.scss` file. -Other color variables are listed there as well. -The stock theme color options available can be found at `_sass/variables.scss`. -You can also add your own colors to this file assigning each a name for ease of -use across the template. +A variety of beautiful theme colors have been selected for you to choose from. The default is purple, but you can quickly change it by editing the `--global-theme-color` variable in the `_sass/_themes.scss` file. Other color variables are listed there as well. The stock theme color options available can be found at [\_sass/\_variables.scss](_sass/_variables.scss). You can also add your own colors to this file assigning each a name for ease of use across the template. + +--- #### Social media previews -**al-folio** supports preview images on social media. -To enable this functionality you will need to set `serve_og_meta` to `true` in your `_config.yml`. -Once you have done so, all your site's pages will include Open Graph data in the HTML head element. +**al-folio** supports preview images on social media. To enable this functionality you will need to set `serve_og_meta` to `true` in your [\_config.yml](_config.yml). Once you have done so, all your site's pages will include Open Graph data in the HTML head element. + +You will then need to configure what image to display in your site's social media previews. This can be configured on a per-page basis, by setting the `og_image` page variable. If for an individual page this variable is not set, then the theme will fall back to a site-wide `og_image` variable, configurable in your [\_config.yml](_config.yml). In both the page-specific and site-wide cases, the `og_image` variable needs to hold the URL for the image you wish to display in social media previews. -You will then need to configure what image to display in your site's social media previews. -This can be configured on a per-page basis, by setting the `og_image` page variable. -If for an individual page this variable is not set, then the theme will fall back to a site-wide `og_image` variable, configurable in your `_config.yml`. -In both the page-specific and site-wide cases, the `og_image` variable needs to hold the URL for the image you wish to display in social media previews. +--- #### Atom (RSS-like) Feed -It generates an Atom (RSS-like) feed of your posts, useful for Atom and RSS readers. -The feed is reachable simply by typing after your homepage `/feed.xml`. -E.g. assuming your website mountpoint is the main folder, you can type `yourusername.github.io/feed.xml` +It generates an Atom (RSS-like) feed of your posts, useful for Atom and RSS readers. The feed is reachable simply by typing after your homepage `/feed.xml`. E.g. assuming your website mountpoint is the main folder, you can type `yourusername.github.io/feed.xml` + +--- #### Related posts -By default, there will be a related posts section on the bottom of the blog posts. -These are generated by selecting the `max_related` most recent posts that share at least `min_common_tags` tags with the current post. -If you do not want to display related posts on a specific post, simply add `related_posts: false` to the front matter of the post. -If you want to disable it for all posts, simply set `enabled` to false in the `related_blog_posts` section in `_config.yml`. +By default, there will be a related posts section on the bottom of the blog posts. These are generated by selecting the `max_related` most recent posts that share at least `min_common_tags` tags with the current post. If you do not want to display related posts on a specific post, simply add `related_posts: false` to the front matter of the post. If you want to disable it for all posts, simply set `enabled` to false in the `related_blog_posts` section in [\_config.yml](_config.yml). + +--- + +#### Code quality checks + +Currently, we run some checks to ensure that the code quality and generated site are good. The checks are done using GitHub Actions and the following tools: + +- [Prettier](https://prettier.io/) - check if the formatting of the code follows the style guide +- [lychee](https://lychee.cli.rs/) - check for broken links +- [Axe](https://github.com/dequelabs/axe-core) (need to run manually) - do some accessibility testing + +We decided to keep `Axe` runs manual because fixing the issues are not straightforward and might be hard for people without web development knowledge. + +## FAQ + +For frequently asked questions, please refer to [FAQ.md](FAQ.md). ## Contributing -Contributions to al-folio are very welcome! -Before you get started, please take a look at [the guidelines](CONTRIBUTING.md). +Contributions to al-folio are very welcome! Before you get started, please take a look at [the guidelines](CONTRIBUTING.md). -If you would like to improve documentation, add your webpage to the list below, or fix a minor inconsistency or bug, please feel free to send a PR directly to `master`. -For more complex issues/bugs or feature requests, please open an issue using the appropriate template. +If you would like to improve documentation or fix a minor inconsistency or bug, please feel free to send a PR directly to `master`. For more complex issues/bugs or feature requests, please open an issue using the appropriate template. ### Maintainers -Our most active contributors are welcome to join the maintainers team. -If you are interested, please reach out! +Our most active contributors are welcome to join the maintainers team. If you are interested, please reach out! @@ -648,9 +432,24 @@ If you are interested, please reach out! +### All Contributors + + + + + +## Star History + + + + + + Star History Chart + + + ## License The theme is available as open source under the terms of the [MIT License](https://github.com/alshedivat/al-folio/blob/master/LICENSE). -Originally, **al-folio** was based on the [\*folio theme](https://github.com/bogoli/-folio) (published by [Lia Bogoev](https://liabogoev.com) and under the MIT license). -Since then, it got a full re-write of the styles and many additional cool features. +Originally, **al-folio** was based on the [\*folio theme](https://github.com/bogoli/-folio) (published by [Lia Bogoev](https://liabogoev.com) and under the MIT license). Since then, it got a full re-write of the styles and many additional cool features. diff --git a/_config.yml b/_config.yml index eff5e57..88b31ec 100644 --- a/_config.yml +++ b/_config.yml @@ -5,7 +5,7 @@ show_drafts: false title: blank # the website title (if blank, full name will be used instead) -first_name: Andrew +first_name: Andrew middle_name: M. last_name: Zhang email: andrewmzhang@berkeley.edu @@ -15,31 +15,26 @@ footer_text: > Powered by Jekyll with al-folio theme. Hosted by GitHub Pages. Photos from Unsplash. -keywords: jekyll, jekyll-theme, academic-website, portfolio-website # add your own keywords or leave empty - +keywords: jekyll, jekyll-theme, academic-website, portfolio-website # add your own keywords or leave empty lang: en # the language of your site (for example: en, fr, cn, ru, etc.) -icon: ⚛️ # the emoji used as the favicon (alternatively, provide image name in /assets/img/) +icon: ⚛️ # the emoji used as the favicon (alternatively, provide image name in /assets/img/) url: https://andrewmzhang.com # the base hostname & protocol for your site -baseurl: # the subpath of your site, e.g. /blog/ +baseurl: # the subpath of your site, e.g. /blog/ last_updated: true # set to true if you want to display last updated in the footer -impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR +impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR # ----------------------------------------------------------------------------- # Theme # ----------------------------------------------------------------------------- -# code highlighter theme -highlight_theme_light: github # https://github.com/jwarby/jekyll-pygments-themes -highlight_theme_dark: native # https://github.com/jwarby/jekyll-pygments-themes - # repo color theme -repo_theme_light: default # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md -repo_theme_dark: dark # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md -repo_trophies: - enabled: true - theme_light: flat # https://github.com/ryo-ma/github-profile-trophy - theme_dark: gitdimmed # https://github.com/ryo-ma/github-profile-trophy +#repo_theme_light: default # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md +#repo_theme_dark: dark # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md +#repo_trophies: +# enabled: true +# theme_light: flat # https://github.com/ryo-ma/github-profile-trophy +# theme_dark: gitdimmed # https://github.com/ryo-ma/github-profile-trophy # ----------------------------------------------------------------------------- # RSS Feed @@ -65,6 +60,7 @@ max_width: 1200px # Open Graph & Schema.org # ----------------------------------------------------------------------------- # Display links to the page with a preview object on social media. +# see https://schema.org/docs/faq.html for more information serve_og_meta: false # Include Open Graph meta tags in the HTML head serve_schema_org: false # Include Schema.org in the HTML head og_image: # The site-wide (default for all links) Open Graph preview image @@ -73,39 +69,45 @@ og_image: # The site-wide (default for all links) Open Graph preview image # Social integration # ----------------------------------------------------------------------------- +acm_id: # your dl.acm.org/profile/id +blogger_url: # your blogger URL +bluesky_url: # your bluesky URL +dblp_url: # your DBLP profile url +discord_id: # your discord id (18-digit unique numerical identifier) +facebook_id: # your facebook id +flickr_id: # your flickr id github_username: andrewmzhang # your GitHub user name gitlab_username: # your GitLab user name -twitter_username: # your Twitter handle +ieee_id: # your ieeexplore.ieee.org/author/id +instagram_id: # your instagram id +kaggle_id: # your kaggle id +keybase_username: # your keybase user name +lastfm_id: # your lastfm id +lattes_id: # your ID on Lattes (Brazilian Lattes CV) +linkedin_username: andrewzhang # your LinkedIn user name mastodon_username: # your mastodon instance+username in the format instance.tld/@username -linkedin_username: andrewmzhang # your LinkedIn user name -telegram_username: # your Telegram user name -scholar_userid: # your Google Scholar ID -semanticscholar_id: # your Semantic Scholar ID -whatsapp_number: # your WhatsApp number (full phone number in international format. Omit any zeroes, brackets, or dashes when adding the phone number in international format.) -orcid_id: # your ORCID ID medium_username: # your Medium username -quora_username: # your Quora username -publons_id: # your ID on Publons -lattes_id: # your ID on Lattes (Brazilian Lattes CV) +orcid_id: # your ORCID ID osf_id: # your OSF ID +pinterest_id: # your pinterest id +publons_id: # your ID on Publons +quora_username: # your Quora username research_gate_profile: # your profile on ResearchGate +scholar_userid: # your Google Scholar ID scopus_id: # your profile on Scopus -blogger_url: # your blogger URL -work_url: # work page URL -keybase_username: # your keybase user name -wikidata_id: # your wikidata id -wikipedia_id: # your wikipedia id (Case sensitive) -dblp_url: # your DBLP profile url -stackoverflow_id: # your stackoverflow id -kaggle_id: # your kaggle id -lastfm_id: # your lastfm id +semanticscholar_id: # your Semantic Scholar ID spotify_id: # your spotify id -pinterest_id: # your pinterest id +stackoverflow_id: # your stackoverflow id +telegram_username: # your Telegram user name unsplash_id: # your unsplash id -instagram_id: # your instagram id -facebook_id: # your facebook id +wechat_qr: # filename of your wechat qr-code saved as an image (e.g., wechat-qr.png if saved to assets/img/wechat-qr.png) +whatsapp_number: # your WhatsApp number (full phone number in international format. Omit any zeroes, brackets, or dashes when adding the phone number in international format.) +wikidata_id: # your wikidata id +wikipedia_id: # your wikipedia id (Case sensitive) +work_url: # work page URL +x_username: # your X handle youtube_id: # your youtube channel id (youtube.com/@) -discord_id: # your discord id (18-digit unique numerical identifier) +zotero_username: # your zotero username contact_note: > @@ -113,11 +115,14 @@ contact_note: > # Analytics and search engine verification # ----------------------------------------------------------------------------- -google_analytics: # your Google Analytics measurement ID (format: G-XXXXXXXXXX) -panelbear_analytics: # panelbear analytics site ID (format: XXXXXXXXX) +# For Google Analytics, see https://support.google.com/analytics/answer/10447272?hl=en&ref_topic=14088998&sjid=5129943941510317771-SA#zippy=%2Cgoogle-sites +# and follow the instructions for Google Sites. You will need to create a Google Analytics property and copy the Google tag ID. +google_analytics: # your Google Analytics measurement ID (format: G-XXXXXXXXXX) +cronitor_analytics: # cronitor RUM analytics site ID (format: XXXXXXXXX) -google_site_verification: # your google-site-verification ID (Google Search Console) -bing_site_verification: # out your bing-site-verification ID (Bing Webmaster) +# For Google Search Console, see https://support.google.com/webmasters/answer/9008080?hl=en#meta_tag_verification&zippy=%2Chtml-tag +google_site_verification: # your google-site-verification ID (Google Search Console) +bing_site_verification: # out your bing-site-verification ID (Bing Webmaster) # ----------------------------------------------------------------------------- # Blog @@ -132,24 +137,22 @@ permalink: /blog/:year/:title/ pagination: enabled: true -# Comments related_blog_posts: enabled: true max_related: 5 # Giscus comments (RECOMMENDED) -# Follow instructions on https://giscus.app/ to setup for your repo to fill out -# the information below. +# Follow instructions on https://giscus.app/ to setup for your repo to fill out the information below. giscus: - repo: andrewmzhang/andrewmzhang-2021 # / - repo_id: MDEwOlJlcG9zaXRvcnkzMzExNjA1NTM= - category: Comments # name of the category under which discussions will be created - category_id: DIC_kwDOE70b6c4CWnht - mapping: title # identify discussions by post title - strict: 1 # use strict identification mode - reactions_enabled: 1 # enable (1) or disable (0) emoji reactions - input_position: bottom # whether to display input form below (bottom) or above (top) the comments - theme: preferred_color_scheme # name of the color scheme (preferred works well with al-folio light/dark mode) + repo: andrewmzhang/andrewmzhang-2021 # / + repo_id: MDEwOlJlcG9zaXRvcnkzMzExNjA1NTM= # leave empty or specify your repo_id (see https://giscus.app/) + category: Comments # name of the category under which discussions will be created + category_id: DIC_kwDOE70b6c4CWnht # leave empty or specify your category_id (see https://giscus.app/) + mapping: title # identify discussions by post title + strict: 1 # use strict identification mode + reactions_enabled: 1 # enable (1) or disable (0) emoji reactions + input_position: bottom # whether to display input form below (bottom) or above (top) the comments + theme: preferred_color_scheme # name of the color scheme (preferred works well with al-folio light/dark mode) emit_metadata: 0 lang: en @@ -178,7 +181,6 @@ collections: output: false permalink: /projects/:path/ -news_limit: 0 announcements: enabled: true scrollable: true # adds a vertical scroll bar if there are more than 3 news items @@ -199,7 +201,7 @@ highlighter: rouge kramdown: input: GFM syntax_highlighter_opts: - css_class: 'highlight' + css_class: "highlight" span: line_numbers: false block: @@ -207,11 +209,26 @@ kramdown: start_line: 1 # Includes & excludes -include: ['_pages'] +include: ["_pages"] exclude: - - bin + - bin/ + - CONTRIBUTING.md + - CUSTOMIZE.md + - Dockerfile + - docker-compose.yml + - docker-compose-slim.yml + - FAQ.md - Gemfile - Gemfile.lock + - INSTALL.md + - LICENSE + - lighthouse_results/ + - package.json + - package-lock.json + - _pages/about_einstein.md + - purgecss.config.js + - README.md + - readme_preview/ - vendor - _pages/projects.md - _pages/teaching.md @@ -219,15 +236,15 @@ exclude: keep_files: - CNAME - .nojekyll - - .git # Plug-ins plugins: - jekyll-archives - - jekyll-diagrams - jekyll-email-protect - jekyll-feed + - jekyll-get-json - jekyll-imagemagick + - jekyll-jupyter-notebook - jekyll-link-attributes - jekyll-minifier - jekyll-paginate-v2 @@ -244,12 +261,15 @@ defaults: values: sitemap: false +sass: + style: compressed + # ----------------------------------------------------------------------------- # Jekyll Minifier # ----------------------------------------------------------------------------- jekyll-minifier: - exclude: ['robots.txt'] + exclude: ["robots.txt"] uglifier_args: harmony: true @@ -264,18 +284,18 @@ jekyll-archives: tag: archive-tag category: archive-category permalinks: - year: '/blog/:year/' - tag: '/blog/tag/:name/' - category: '/blog/category/:name/' + year: "/blog/:year/" + tag: "/blog/tag/:name/" + category: "/blog/category/:name/" -display_tags: ['formatting', 'images', 'links', 'math', 'code'] # these tags will be displayed on the front page of your blog +display_tags: ["formatting", "images", "links", "math", "code"] # these tags will be displayed on the front page of your blog +display_categories: ["blockquotes"] # these categories will be displayed on the front page of your blog # ----------------------------------------------------------------------------- # Jekyll Scholar # ----------------------------------------------------------------------------- scholar: - last_name: Zhang first_name: [Andrew, M.] @@ -294,22 +314,48 @@ scholar: join_strings: true details_dir: bibliography - details_layout: bibtex.html details_link: Details query: "@*" + group_by: year + group_order: descending -badges: # Display different badges for your publications - altmetric_badge: true # Altmetric badge (https://www.altmetric.com/products/altmetric-badges/) - dimensions_badge: true # Dimensions badge (https://badge.dimensions.ai/) +# Display different badges withs stats for your publications +enable_publication_badges: + altmetric: true # Altmetric badge (https://www.altmetric.com/products/altmetric-badges/) + dimensions: true # Dimensions badge (https://badge.dimensions.ai/) + google_scholar: true # Google Scholar badge (https://scholar.google.com/intl/en/scholar/citations.html) # Filter out certain bibtex entry keywords used internally from the bib output -filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, slides, website, preview, altmetric] +filtered_bibtex_keywords: + [ + abbr, + abstract, + additional_info, + altmetric, + arxiv, + award, + award_name, + bibtex_show, + blog, + code, + html, + pdf, + poster, + preview, + selected, + slides, + supp, + video, + website, + ] # Maximum number of authors to be shown for each publication (more authors are visible on click) -max_author_limit: 5 # leave blank to always show all authors -more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation +max_author_limit: 5 # leave blank to always show all authors +more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation +# Enables publication thumbnails. If disabled, none of the publications will display thumbnails, even if specified in the bib entry. +enable_publication_thumbnails: true # ----------------------------------------------------------------------------- # Jekyll Link Attributes @@ -322,11 +368,12 @@ external_links: target: _blank exclude: - # ----------------------------------------------------------------------------- # Responsive WebP Images # ----------------------------------------------------------------------------- +# MAKE SURE imagemagick is installed and on your PATH before enabling imagemagick. In a terminal, run: +# convert -version imagemagick: enabled: true # enables responsive images for your site (recommended, see https://github.com/alshedivat/al-folio/issues/537) widths: @@ -340,68 +387,221 @@ imagemagick: - ".jpeg" - ".png" - ".tiff" + - ".gif" output_formats: - webp: "-resize 800x" - -# ----------------------------------------------------------------------------- -# Jekyll Diagrams -# ----------------------------------------------------------------------------- - -jekyll-diagrams: - # configuration, see https://github.com/zhustec/jekyll-diagrams. - # feel free to comment out this section if not using jekyll diagrams. + webp: "-quality 85" +# Lazy loading images +# If you enable lazy loading, all images will add the loading="lazy" attribute. +# This will make your site load faster, but it may not be supported in all browsers. +# You can also set loading="" to other values for specific images to override the default behavior. +# Options: "auto", "eager", "lazy" +# See https://web.dev/browser-level-image-lazy-loading/ for more information. +lazy_loading_images: true # enables lazy loading of images (recommended) # ----------------------------------------------------------------------------- # Optional Features # ----------------------------------------------------------------------------- -enable_google_analytics: false # enables google analytics -enable_panelbear_analytics: false # enables panelbear analytics -enable_google_verification: false # enables google site verification -enable_bing_verification: false # enables bing site verification -enable_masonry: true # enables automatic project cards arrangement -enable_math: true # enables math typesetting (uses MathJax) -enable_tooltips: false # enables automatic tooltip links generated - # for each section titles on pages and posts -enable_darkmode: true # enables switching between light/dark modes -enable_navbar_social: false # enables displaying social links in the - # navbar on the about page -enable_project_categories: true # enables categorization of projects into - # multiple categories -enable_medium_zoom: true # enables image zoom feature (as on medium.com) -enable_progressbar: true # enables a horizontal progress bar linked to the vertical scroll position +enable_google_analytics: false # enables google analytics +enable_cronitor_analytics: false # enables cronitor RUM analytics +enable_google_verification: false # enables google site verification +enable_bing_verification: false # enables bing site verification +enable_masonry: true # enables automatic project cards arrangement +enable_math: true # enables math typesetting (uses MathJax) +enable_tooltips: false # enables automatic tooltip links generated for each section titles on pages and posts +enable_darkmode: true # enables switching between light/dark modes +enable_navbar_social: false # enables displaying social links in the navbar on the about page +enable_project_categories: true # enables categorization of projects into multiple categories +enable_medium_zoom: true # enables image zoom feature (as on medium.com) +enable_progressbar: true # enables a horizontal progress bar linked to the vertical scroll position +enable_video_embedding: false # enables video embedding for bibtex entries. If false, the button opens the video link in a new window. # ----------------------------------------------------------------------------- # Library versions # ----------------------------------------------------------------------------- -academicons: - version: "1.9.1" - integrity: "sha256-i1+4qU2G2860dGGIOJscdC30s9beBXjFfzjWLjBRsBg=" -bootstrap: - version: "4.6.1" - integrity: - css: "sha256-DF7Zhf293AJxJNTmh5zhoYYIMs2oXitRfBjY+9L//AY=" - js: "sha256-fgLAgv7fyCGopR/gBNq2iW3ZKIdqIcyshnUULC4vex8=" -bootstrap-table: - version: "1.21.4" -fontawesome: - version: "5.15.4" - integrity: "sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" -jquery: - version: "3.6.0" - integrity: "sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" -mathjax: - version: "3.2.0" -masonry: - version: "4.2.2" - integrity: "sha256-Nn1q/fx0H7SNLZMQ5Hw5JLaTRZp0yILA/FRexe19VdI=" -mdb: - version: "4.20.0" - integrity: - css: "sha256-jpjYvU3G3N6nrrBwXJoVEYI/0zw8htfFnhT9ljN3JJw=" - js: "sha256-NdbiivsvWt7VYCt6hYNT3h/th9vSTL4EDWeGs5SN3DA=" -medium_zoom: - version: "1.0.8" - integrity: "sha256-7PhEpEWEW0XXQ0k6kQrPKwuoIomz8R8IYyuU1Qew4P8=" +# Add the url, version and integrity hash of the libraries you use in your site. +third_party_libraries: + download: false # if true, download the versions of the libraries specified below and use the downloaded files + bootstrap-table: + integrity: + css: "sha256-uRX+PiRTR4ysKFRCykT8HLuRCub26LgXJZym3Yeom1c=" + js: "sha256-4rppopQE9POKfukn2kEvhJ9Um25Cf6+IDVkARD0xh78=" + url: + css: "https://cdn.jsdelivr.net/npm/bootstrap-table@{{version}}/dist/bootstrap-table.min.css" + js: "https://cdn.jsdelivr.net/npm/bootstrap-table@{{version}}/dist/bootstrap-table.min.js" + version: "1.22.4" + chartjs: + url: + js: "https://cdn.jsdelivr.net/npm/chart.js@{{version}}/dist/chart.umd.min.js" + version: "4.4.1" + d3: + integrity: + js: "sha256-1rA678n2xEx7x4cTZ5x4wpUCj6kUMZEZ5cxLSVSFWxw=" + url: + js: "https://cdn.jsdelivr.net/npm/d3@{{version}}/dist/d3.min.js" + version: "7.8.5" + diff2html: + integrity: + css: "sha256-IMBK4VNZp0ivwefSn51bswdsrhk0HoMTLc2GqFHFBXg=" + js: "sha256-eU2TVHX633T1o/bTQp6iIJByYJEtZThhF9bKz/DcbbY=" + url: + css: "https://cdn.jsdelivr.net/npm/diff2html@{{version}}/bundles/css/diff2html.min.css" + js: "https://cdn.jsdelivr.net/npm/diff2html@{{version}}/bundles/js/diff2html-ui.min.js" + version: "3.4.47" + echarts: + integrity: + js: + library: "sha256-QvgynZibb2U53SsVu98NggJXYqwRL7tg3FeyfXvPOUY=" + dark_theme: "sha256-sm6Ui9w41++ZCWmIWDLC18a6ki72FQpWDiYTDxEPXwU=" + url: + js: + library: "https://cdn.jsdelivr.net/npm/echarts@{{version}}/dist/echarts.min.js" + dark_theme: "https://cdn.jsdelivr.net/npm/echarts@{{version}}/theme/dark-fresh-cut.js" + version: "5.5.0" + google_fonts: + url: + fonts: "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons&display=swap" + highlightjs: + integrity: + css: + light: "sha256-Oppd74ucMR5a5Dq96FxjEzGF7tTw2fZ/6ksAqDCM8GY=" + dark: "sha256-nyCNAiECsdDHrr/s2OQsp5l9XeY2ZJ0rMepjCT2AkBk=" + url: + css: + light: "https://cdn.jsdelivr.net/npm/highlight.js@{{version}}/styles/github.min.css" + dark: "https://cdn.jsdelivr.net/npm/highlight.js@{{version}}/styles/github-dark.min.css" + version: "11.9.0" + imagesloaded: + integrity: + js: "sha256-htrLFfZJ6v5udOG+3kNLINIKh2gvoKqwEhHYfTTMICc=" + url: + js: https://cdn.jsdelivr.net/npm/imagesloaded@{{version}}/imagesloaded.pkgd.min.js + version: "5.0.0" + img-comparison-slider: + url: + css: "https://cdn.jsdelivr.net/npm/img-comparison-slider@{{version}}/dist/styles.min.css" + js: "https://cdn.jsdelivr.net/npm/img-comparison-slider@{{version}}/dist/index.min.js" + version: "8.0.6" + jquery: + integrity: + js: "sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" + url: + js: "https://cdn.jsdelivr.net/npm/jquery@{{version}}/dist/jquery.min.js" + version: "3.6.0" + leaflet: + integrity: + css: "sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" + js: "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" + js_map: "sha256-YAoQ3FzREN4GmVENMir8vgHHypC0xfSK3CAxTHCqx1M=" + url: + css: "https://cdn.jsdelivr.net/npm/leaflet@{{version}}/dist/leaflet.css" + js: "https://cdn.jsdelivr.net/npm/leaflet@{{version}}/dist/leaflet.js" + js_map: "https://cdn.jsdelivr.net/npm/leaflet@{{version}}/dist/leaflet.js.map" + version: "1.9.4" + mathjax: + local: + fonts: "output/chtml/fonts/woff-v2/" + url: + fonts: "https://cdn.jsdelivr.net/npm/mathjax@{{version}}/es5/output/chtml/fonts/woff-v2/" + js: "https://cdn.jsdelivr.net/npm/mathjax@{{version}}/es5/tex-mml-chtml.min.js" + version: "3.2.0" + masonry: + integrity: + js: "sha256-Nn1q/fx0H7SNLZMQ5Hw5JLaTRZp0yILA/FRexe19VdI=" + url: + js: "https://cdn.jsdelivr.net/npm/masonry-layout@{{version}}/dist/masonry.pkgd.min.js" + version: "4.2.2" + mdb: + integrity: + css: "sha256-jpjYvU3G3N6nrrBwXJoVEYI/0zw8htfFnhT9ljN3JJw=" + css_map: "sha256-iYYMNfsJdVZjvsebJulg09miBXM4/GMTJgv1u5EZFFM=" + js: "sha256-NdbiivsvWt7VYCt6hYNT3h/th9vSTL4EDWeGs5SN3DA=" + js_map: "sha256-UPgyn4YNsT0khkBK5553QwhnlbTlU0aa+igyc6qP1bE=" + url: + css: "https://cdn.jsdelivr.net/npm/mdbootstrap@{{version}}/css/mdb.min.css" + css_map: "https://cdn.jsdelivr.net/npm/mdbootstrap@{{version}}/css/mdb.min.css.map" + js: "https://cdn.jsdelivr.net/npm/mdbootstrap@{{version}}/js/mdb.min.js" + js_map: "https://cdn.jsdelivr.net/npm/mdbootstrap@{{version}}/js/mdb.min.js.map" + version: "4.20.0" + medium_zoom: + integrity: + js: "sha256-ZgMyDAIYDYGxbcpJcfUnYwNevG/xi9OHKaR/8GK+jWc=" + url: + js: "https://cdn.jsdelivr.net/npm/medium-zoom@{{version}}/dist/medium-zoom.min.js" + version: "1.1.0" + mermaid: + integrity: + js: "sha256-TtLOdUA8mstPoO6sGvHIGx2ceXrrX4KgIItO06XOn8A=" + url: + js: "https://cdn.jsdelivr.net/npm/mermaid@{{version}}/dist/mermaid.min.js" + version: "10.7.0" + polyfill: + url: + js: "https://cdnjs.cloudflare.com/polyfill/v{{version}}/polyfill.min.js?features=es6" + version: "3" + pseudocode: + url: + css: "https://cdn.jsdelivr.net/npm/pseudocode@{{version}}/build/pseudocode.min.css" + js: "https://cdn.jsdelivr.net/npm/pseudocode@{{version}}/build/pseudocode.min.js" + version: "2.4.1" + swiper: + integrity: + css: "sha256-yUoNxsvX+Vo8Trj3lZ/Y5ZBf8HlBFsB6Xwm7rH75/9E=" + js: "sha256-BPrwikijIybg9OQC5SYFFqhBjERYOn97tCureFgYH1E=" + url: + css: "https://cdn.jsdelivr.net/npm/swiper@{{version}}/swiper-bundle.min.css" + js: "https://cdn.jsdelivr.net/npm/swiper@{{version}}/swiper-element-bundle.min.js" + version: "11.0.5" + swiper-map: + integrity: + js: "sha256-hlZaH8ySXX97bZaetnrtYlKuhx3oEXFz/s2IXchu6vk=" + url: + js: "https://cdn.jsdelivr.net/npm/swiper@11.1.0/swiper-element-bundle.min.js.map" + version: "11.0.5" + vega: + integrity: + js: "sha256-Yot/cfgMMMpFwkp/5azR20Tfkt24PFqQ6IQS+80HIZs=" + js_map: "sha256-z0x9ICA65dPkZ0JVa9wTImfF6n7AJsKc6WlFE96/wNA=" + url: + js: "https://cdn.jsdelivr.net/npm/vega@{{version}}/build/vega.min.js" + js_map: "https://cdn.jsdelivr.net/npm/vega@{{version}}/build/vega.min.js.map" + version: "5.27.0" + vega-embed: + integrity: + js: "sha256-FPCJ9JYCC9AZSpvC/t/wHBX7ybueZhIqOMjpWqfl3DU=" + js_map: "sha256-VBbfSEFYSMdX/rTdGrONEHNP6BprCB7H/LpMMNt/cPA=" + url: + js: "https://cdn.jsdelivr.net/npm/vega-embed@{{version}}/build/vega-embed.min.js" + js_map: "https://cdn.jsdelivr.net/npm/vega-embed@{{version}}/build/vega-embed.min.js.map" + version: "6.24.0" + vega-lite: + integrity: + js: "sha256-TvBvIS5jUN4BSy009usRjNzjI1qRrHPYv7xVLJyjUyw=" + js_map: "sha256-l2I4D5JC23Ulsu6e3sKVe5AJ+r+DFkzkKnZS8nUGz28=" + url: + js: "https://cdn.jsdelivr.net/npm/vega-lite@{{version}}/build/vega-lite.min.js" + js_map: "https://cdn.jsdelivr.net/npm/vega-lite@{{version}}/build/vega-lite.min.js.map" + version: "5.16.3" + +# ----------------------------------------------------------------------------- +# Get external JSON data +# ----------------------------------------------------------------------------- + +jekyll_get_json: + - data: resume + json: assets/json/resume.json # it can also be an url +jsonresume: + - basics + - work + - education + - publications + - projects + - volunteer + - awards + - certificates + - skills + - languages + - interests + - references diff --git a/_data/coauthors.yml b/_data/coauthors.yml index 8ed5212..5a989cf 100644 --- a/_data/coauthors.yml +++ b/_data/coauthors.yml @@ -1,34 +1,34 @@ -"Adams": +"adams": - firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"] url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams -"Podolsky": +"podolsky": - firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"] url: https://en.wikipedia.org/wiki/Boris_Podolsky -"Rosen": +"rosen": - firstname: ["Nathan", "N."] url: https://en.wikipedia.org/wiki/Nathan_Rosen -"Bach": +"bach": - firstname: ["Johann Sebastian", "J. S."] url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach - firstname: ["Carl Philipp Emanuel", "C. P. E."] url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach -"Przibram": +"przibram": - firstname: ["Karl"] url: https://link.springer.com/article/10.1007/s00016-019-00242-z -"Schrödinger": +"schrodinger": - firstname: ["Erwin"] url: https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger -"Lorentz": +"lorentz": - firstname: ["Hendrik Antoon"] url: https://en.wikipedia.org/wiki/Hendrik_Lorentz -"Planck": +"planck": - firstname: ["Max"] url: https://en.wikipedia.org/wiki/Max_Planck diff --git a/_data/cv.yml b/_data/cv.yml index 5b11572..5885b30 100644 --- a/_data/cv.yml +++ b/_data/cv.yml @@ -72,18 +72,18 @@ type: time_table contents: - year: 1921 - items: - - Nobel Prize in Physics + items: + - Nobel Prize in Physics - Matteucci Medal - year: 2029 - items: + items: - Max Planck Medal - title: Academic Interests type: nested_list contents: - title: Topic 1. - items: + items: - Description 1. - Description 2. - title: Topic 2. diff --git a/_data/repositories.yml b/_data/repositories.yml index 0a4e4cf..29e00a6 100644 --- a/_data/repositories.yml +++ b/_data/repositories.yml @@ -1,5 +1,12 @@ -#github_users: -# - andrewmzhang - -#github_repos: -# - jcarreira/cirrus +# github_users: +# - torvalds +# - alshedivat +# +# github_repos: +# - alshedivat/al-folio +# - twbs/bootstrap +# - jekyll/jekyll +# - jquery/jquery +# - FortAwesome/Font-Awesome +# - jpswalsh/academicons +# - mathjax/MathJax diff --git a/_data/venues.yml b/_data/venues.yml index 6c16ad5..4196320 100644 --- a/_data/venues.yml +++ b/_data/venues.yml @@ -4,3 +4,6 @@ "PhysRev": url: https://journals.aps.org/ + +"Vision": + color: "#009f36" diff --git a/_drafts/2015-03-15-formatting-and-links.md b/_drafts/2015-03-15-formatting-and-links.md index 0ecd303..0962756 100644 --- a/_drafts/2015-03-15-formatting-and-links.md +++ b/_drafts/2015-03-15-formatting-and-links.md @@ -1,20 +1,28 @@ --- layout: post -title: a post with formatting and links -date: 2015-03-15 16:40:16 +title: a post with formatting and links +date: 2015-03-15 16:40:16 description: march & april, looking forward to summer tags: formatting links categories: sample-posts --- -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. [Pinterest](https://www.pinterest.com) DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. #### Hipster list -
    -
  • brunch
  • -
  • fixie
  • -
  • raybans
  • -
  • messenger bag
  • -
+ +- brunch +- fixie +- raybans +- messenger bag + +#### Check List + +- [x] Brush Teeth +- [ ] Put on socks + - [x] Put on left sock + - [ ] Put on right sock +- [x] Go to school Hoodie Thundercats retro, tote bag 8-bit Godard craft beer gastropub. Truffaut Tumblr taxidermy, raw denim Kickstarter sartorial dreamcatcher. Quinoa chambray slow-carb salvia readymade, bicycle rights 90's yr typewriter selfies letterpress cardigan vegan. @@ -22,9 +30,7 @@ Hoodie Thundercats retro, tote bag 8-bit Godard craft beer gastropub. Truffaut T Pug heirloom High Life vinyl swag, single-origin coffee four dollar toast taxidermy reprehenderit fap distillery master cleanse locavore. Est anim sapiente leggings Brooklyn ea. Thundercats locavore excepteur veniam eiusmod. Raw denim Truffaut Schlitz, migas sapiente Portland VHS twee Bushwick Marfa typewriter retro id keytar. -
- We do not grow absolutely, chronologically. We grow sometimes in one dimension, and not in another, unevenly. We grow partially. We are relative. We are mature in one realm, childish in another. - —Anais Nin -
+> We do not grow absolutely, chronologically. We grow sometimes in one dimension, and not in another, unevenly. We grow partially. We are relative. We are mature in one realm, childish in another. +> —Anais Nin Fap aliqua qui, scenester pug Echo Park polaroid irony shabby chic ex cardigan church-key Odd Future accusamus. Blog stumptown sartorial squid, gastropub duis aesthetic Truffaut vero. Pinterest tilde twee, odio mumblecore jean shorts lumbersexual. diff --git a/_drafts/2015-05-15-images.md b/_drafts/2015-05-15-images.md index e81d92f..61f687f 100644 --- a/_drafts/2015-05-15-images.md +++ b/_drafts/2015-05-15-images.md @@ -1,20 +1,21 @@ --- layout: post -title: a post with images +title: a post with images date: 2015-05-15 21:01:00 description: this is what included images could look like tags: formatting images categories: sample-posts thumbnail: assets/img/9.jpg --- + This is an example post with image galleries.
- {% include figure.html path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %}
- {% include figure.html path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" %}
@@ -26,10 +27,10 @@ Simply add `data-zoomable` to `` tags that you want to make zoomable.
- {% include figure.html path="assets/img/8.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} + {% include figure.liquid loading="eager" path="assets/img/8.jpg" class="img-fluid rounded z-depth-1" zoomable=true %}
- {% include figure.html path="assets/img/10.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} + {% include figure.liquid loading="eager" path="assets/img/10.jpg" class="img-fluid rounded z-depth-1" zoomable=true %}
@@ -37,12 +38,12 @@ The rest of the images in this post are all zoomable, arranged into different mi
- {% include figure.html path="assets/img/11.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} + {% include figure.liquid path="assets/img/11.jpg" class="img-fluid rounded z-depth-1" zoomable=true %}
- {% include figure.html path="assets/img/12.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} + {% include figure.liquid path="assets/img/12.jpg" class="img-fluid rounded z-depth-1" zoomable=true %}
- {% include figure.html path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} + {% include figure.liquid path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" zoomable=true %}
diff --git a/_drafts/2015-07-15-code.md b/_drafts/2015-07-15-code.md index a86fa07..c721ec9 100644 --- a/_drafts/2015-07-15-code.md +++ b/_drafts/2015-07-15-code.md @@ -5,7 +5,9 @@ date: 2015-07-15 15:09:00 description: an example of a blog post with some code tags: formatting code categories: sample-posts +featured: true --- + This theme implements a built-in Jekyll feature, the use of Rouge, for syntax highlighting. It supports more than 100 languages. This example is in C++. @@ -37,12 +39,38 @@ int main(int argc, char const \*argv[]) } ``` +For displaying code in a list item, you have to be aware of the indentation, as stated in this [Stackoverflow answer](https://stackoverflow.com/questions/34987908/embed-a-code-block-in-a-list-item-with-proper-indentation-in-kramdown/38090598#38090598). You must indent your code by **(3 \* bullet_indent_level)** spaces. This is because kramdown (the markdown engine used by Jekyll) indentation for the code block in lists is determined by the column number of the first non-space character after the list item marker. For example: + +````markdown +1. We can put fenced code blocks inside nested bullets, too. + + 1. Like this: + + ```c + printf("Hello, World!"); + ``` + + 2. The key is to indent your fenced block in the same line as the first character of the line. +```` + +Which displays: + +1. We can put fenced code blocks inside nested bullets, too. + + 1. Like this: + + ```c + printf("Hello, World!"); + ``` + + 2. The key is to indent your fenced block in the same line as the first character of the line. + By default, it does not display line numbers. If you want to display line numbers for every code block, you can set `kramdown.syntax_highlighter_opts.block.line_numbers` to true in your `_config.yml` file. If you want to display line numbers for a specific code block, all you have to do is wrap your code in a liquid tag: -{% raw %} -{% highlight c++ linenos %}
code code code
{% endhighlight %} +{% raw %} +{% highlight c++ linenos %}
code code code
{% endhighlight %} {% endraw %} The keyword `linenos` triggers display of line numbers. @@ -52,7 +80,7 @@ Produces something like this: int main(int argc, char const \*argv[]) { - string myString; +string myString; cout << "input a string: "; getline(cin, myString); @@ -66,6 +94,7 @@ int main(int argc, char const \*argv[]) } return 0; + } {% endhighlight %} diff --git a/_drafts/2015-10-20-comments.md b/_drafts/2015-10-20-comments.md deleted file mode 100644 index 55b900f..0000000 --- a/_drafts/2015-10-20-comments.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -layout: post -title: a post with comments -date: 2015-10-20 11:59:00-0400 -description: an example of a blog post with comments -comments: true ---- -This post shows how to add DISQUS comments. diff --git a/_drafts/2015-10-20-disqus-comments.md b/_drafts/2015-10-20-disqus-comments.md index ec406e4..cf53884 100644 --- a/_drafts/2015-10-20-disqus-comments.md +++ b/_drafts/2015-10-20-disqus-comments.md @@ -3,8 +3,10 @@ layout: post title: a post with disqus comments date: 2015-10-20 11:59:00-0400 description: an example of a blog post with disqus comments +tags: comments categories: sample-posts external-services disqus_comments: true related_posts: false --- + This post shows how to add DISQUS comments. diff --git a/_drafts/2015-10-20-math.md b/_drafts/2015-10-20-math.md index 860a3ec..e7a614e 100644 --- a/_drafts/2015-10-20-math.md +++ b/_drafts/2015-10-20-math.md @@ -7,6 +7,7 @@ tags: formatting math categories: sample-posts related_posts: false --- + This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/) engine. You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. To use display mode, again surround your expression with `$$` and place it as a separate paragraph. Here is an example: @@ -20,7 +21,7 @@ MathJax will automatically number equations: \begin{equation} \label{eq:cauchy-schwarz} -\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) +\left( \sum*{k=1}^n a_k b_k \right)^2 \leq \left( \sum*{k=1}^n a*k^2 \right) \left( \sum*{k=1}^n b_k^2 \right) \end{equation} and by adding `\label{...}` inside the equation environment, we can now refer to the equation using `\eqref`. diff --git a/_drafts/2018-12-22-distill.md b/_drafts/2018-12-22-distill.md index ca0da2b..6fa2e8d 100644 --- a/_drafts/2018-12-22-distill.md +++ b/_drafts/2018-12-22-distill.md @@ -2,8 +2,10 @@ layout: distill title: a distill-style blog post description: an example of a distill-style blog post and main elements +tags: distill formatting giscus_comments: true date: 2021-05-22 +featured: true authors: - name: Albert Einstein @@ -57,7 +59,6 @@ _styles: > text-align: center; font-size: 16px; } - --- ## Equations @@ -75,7 +76,7 @@ $$ Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html) that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php). -*** +--- ## Citations @@ -89,14 +90,14 @@ If you have an appendix, a bibliography is automatically created and populated i Distill chose a numerical inline citation style to improve readability of citation dense articles and because many of the benefits of longer citations are obviated by displaying more information on hover. However, we consider it good style to mention author last names if you discuss something at length and it fits into the flow well — the authors are human and it’s nice for them to have the community associate them with their work. -*** +--- ## Footnotes Just wrap the text you would like to show up in a footnote in a `` tag. The number of the footnote will be automatically generated.This will become a hoverable footnote. -*** +--- ## Code Blocks @@ -117,11 +118,11 @@ You can always use the default code-highlight using the `highlight` liquid tag: {% highlight javascript %} var x = 25; function(x) { - return x * x; +return x \* x; } {% endhighlight %} -*** +--- ## Interactive Plots @@ -138,25 +139,25 @@ To generate the plot that you see above, you can use the following code snippet: import pandas as pd import plotly.express as px df = pd.read_csv( - 'https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv' +'https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv' ) fig = px.density_mapbox( - df, - lat='Latitude', - lon='Longitude', - z='Magnitude', - radius=10, - center=dict(lat=0, lon=180), - zoom=0, - mapbox_style="stamen-terrain", +df, +lat='Latitude', +lon='Longitude', +z='Magnitude', +radius=10, +center=dict(lat=0, lon=180), +zoom=0, +mapbox_style="stamen-terrain", ) fig.show() fig.write_html('assets/plotly/demo.html') {% endhighlight %} -*** +--- -## Details boxes +## Details boxes Details boxes are collapsible boxes which hide additional information from the user. They can be added with the `details` liquid tag: @@ -164,7 +165,7 @@ Details boxes are collapsible boxes which hide additional information from the u Additional details, where math $$ 2x - 1 $$ and `code` is rendered correctly. {% enddetails %} -*** +--- ## Layouts @@ -210,13 +211,13 @@ It does not interrupt the normal flow of `.l-body` sized text except on mobile s

.l-gutter

-*** +--- ## Other Typography? -Emphasis, aka italics, with *asterisks* (`*asterisks*`) or _underscores_ (`_underscores_`). +Emphasis, aka italics, with _asterisks_ (`*asterisks*`) or _underscores_ (`_underscores_`). -Strong emphasis, aka bold, with **asterisks** or __underscores__. +Strong emphasis, aka bold, with **asterisks** or **underscores**. Combined emphasis with **asterisks and _underscores_**. @@ -224,9 +225,9 @@ Strikethrough uses two tildes. ~~Scratch this.~~ 1. First ordered list item 2. Another item -⋅⋅* Unordered sub-list. -1. Actual numbers don't matter, just that it's a number -⋅⋅1. Ordered sub-list + ⋅⋅\* Unordered sub-list. +3. Actual numbers don't matter, just that it's a number + ⋅⋅1. Ordered sub-list 4. And another item. ⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown). @@ -235,9 +236,11 @@ Strikethrough uses two tildes. ~~Scratch this.~~ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.) -* Unordered list can use asterisks -- Or minuses -+ Or pluses +- Unordered list can use asterisks + +* Or minuses + +- Or pluses [I'm an inline-style link](https://www.google.com) @@ -245,8 +248,6 @@ Strikethrough uses two tildes. ~~Scratch this.~~ [I'm a reference-style link][Arbitrary case-insensitive reference text] -[I'm a relative reference to a repository file](../blob/master/LICENSE) - [You can use numbers for reference-style link definitions][1] Or leave it empty and use the [link text itself]. @@ -290,32 +291,31 @@ But let's throw in a tag. Colons can be used to align columns. -| Tables | Are | Cool | -| ------------- |:-------------:| -----:| +| Tables | Are | Cool | +| ------------- | :-----------: | ----: | | col 3 is | right-aligned | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown. -Markdown | Less | Pretty ---- | --- | --- -*Still* | `renders` | **nicely** -1 | 2 | 3 +| Markdown | Less | Pretty | +| -------- | --------- | ---------- | +| _Still_ | `renders` | **nicely** | +| 1 | 2 | 3 | > Blockquotes are very handy in email to emulate reply text. > This line is part of the same quote. Quote break. -> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. - +> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote. Here's a line for us to start with. -This line is separated from the one above by two newlines, so it will be a *separate paragraph*. +This line is separated from the one above by two newlines, so it will be a _separate paragraph_. This line is also a separate paragraph, but... -This line is only separated by a single newline, so it's a separate line in the *same paragraph*. +This line is only separated by a single newline, so it's a separate line in the _same paragraph_. diff --git a/_drafts/2020-09-28-github-metadata.md b/_drafts/2020-09-28-github-metadata.md index b6e6504..3adbdee 100644 --- a/_drafts/2020-09-28-github-metadata.md +++ b/_drafts/2020-09-28-github-metadata.md @@ -1,34 +1,39 @@ --- layout: post -title: a post with github metadata +title: a post with github metadata date: 2020-09-28 21:01:00 description: a quick run down on accessing github metadata. +tags: metadata +categories: sample-posts external-services --- A sample blog page that demonstrates the accessing of github meta data. ## What does Github-MetaData do? -* Propagates the site.github namespace with repository metadata -* Setting site variables : - * site.title - * site.description - * site.url - * site.baseurl -* Accessing the metadata - duh. -* Generating edittable links. + +- Propagates the site.github namespace with repository metadata +- Setting site variables : + - site.title + - site.description + - site.url + - site.baseurl +- Accessing the metadata - duh. +- Generating edittable links. ## Additional Reading -* If you're recieving incorrect/missing data, you may need to perform a Github API authentication. -* Go through this README for more details on the topic. -* This page highlights all the feilds you can access with github-metadata. -
+ +- If you're recieving incorrect/missing data, you may need to perform a Github API authentication. +- Go through this README for more details on the topic. +- This page highlights all the feilds you can access with github-metadata. +
## Example MetaData -* Host Name : {{ site.github.hostname }} -* URL : {{ site.github.url }} -* BaseURL : {{ site.github.baseurl }} -* Archived : {{ site.github.archived}} -* Contributors : -{% for contributor in site.github.contributors %} - * {{ contributor.login }} -{% endfor %} + +- Host Name : {{ site.github.hostname }} +- URL : {{ site.github.url }} +- BaseURL : {{ site.github.baseurl }} +- Archived : {{ site.github.archived}} +- Contributors : + {% for contributor in site.github.contributors %} + - {{ contributor.login }} + {% endfor %} diff --git a/_drafts/2020-09-28-twitter.md b/_drafts/2020-09-28-twitter.md index 06e287d..e99c12d 100644 --- a/_drafts/2020-09-28-twitter.md +++ b/_drafts/2020-09-28-twitter.md @@ -3,24 +3,22 @@ layout: post title: a post with twitter date: 2020-09-28 11:12:00-0400 description: an example of a blog post with twitter +tags: formatting +categories: sample-posts external-services --- -A sample blog page that demonstrates the inclusion of Tweets/Timelines/etc. -
+A sample blog page that demonstrates the inclusion of Tweets/Timelines/etc. # Tweet + An example of displaying a tweet: {% twitter https://twitter.com/rubygems/status/518821243320287232 %} -
-
-
-
+ # Timeline + An example of pulling from a timeline: {% twitter https://twitter.com/jekyllrb maxwidth=500 limit=3 %} -
-
-
-
+ # Additional Details + For more details on using the plugin visit: [jekyll-twitter-plugin](https://github.com/rob-murray/jekyll-twitter-plugin) diff --git a/_drafts/2021-07-04-diagrams.md b/_drafts/2021-07-04-diagrams.md index 7957fce..c85baa2 100644 --- a/_drafts/2021-07-04-diagrams.md +++ b/_drafts/2021-07-04-diagrams.md @@ -2,42 +2,33 @@ layout: post title: a post with diagrams date: 2021-07-04 17:39:00 +tags: formatting diagrams description: an example of a blog post with diagrams +mermaid: + enabled: true + zoomable: true --- -This theme supports generating various diagrams from a text description using [jekyll-diagrams](https://github.com/zhustec/jekyll-diagrams){:target="\_blank"} plugin. -Below, we generate a few examples of such diagrams using languages such as [mermaid](https://mermaid-js.github.io/mermaid/){:target="\_blank"}, [plantuml](https://plantuml.com/){:target="\_blank"}, [vega-lite](https://vega.github.io/vega-lite/){:target="\_blank"}, etc. - -**Note:** different diagram-generation packages require external dependencies to be installed on your machine. -Also, be mindful of that because of diagram generation the fist time you build your Jekyll website after adding new diagrams will be SLOW. -For any other details, please refer to [jekyll-diagrams](https://github.com/zhustec/jekyll-diagrams){:target="\_blank"} README. - +This theme supports generating various diagrams from a text description using [mermaid](https://mermaid-js.github.io/mermaid/){:target="\_blank"}. Previously, this was done using the [jekyll-diagrams](https://github.com/zhustec/jekyll-diagrams){:target="\_blank"} plugin. For more information on this matter, see the [related issue](https://github.com/alshedivat/al-folio/issues/1609#issuecomment-1656995674). To disable the zooming feature, set `mermaid.zoomable` to `false` in this post frontmatter. ## Mermaid -Install mermaid using `node.js` package manager `npm` by running the following command: -```bash -npm install -g mermaid.cli -``` - The diagram below was generated by the following code: -{% raw %} -``` -{% mermaid %} +````markdown +```mermaid sequenceDiagram participant John participant Alice Alice->>John: Hello John, how are you? John-->>Alice: Great! -{% endmermaid %} ``` -{% endraw %} +```` -{% mermaid %} +```mermaid sequenceDiagram participant John participant Alice Alice->>John: Hello John, how are you? John-->>Alice: Great! -{% endmermaid %} +``` diff --git a/_drafts/2022-12-10-giscus-comments.md b/_drafts/2022-12-10-giscus-comments.md index a8971a5..72e0847 100644 --- a/_drafts/2022-12-10-giscus-comments.md +++ b/_drafts/2022-12-10-giscus-comments.md @@ -3,8 +3,10 @@ layout: post title: a post with giscus comments date: 2022-12-10 11:59:00-0400 description: an example of a blog post with giscus comments +tags: comments categories: sample-posts external-services giscus_comments: true related_posts: false --- + This post shows how to add GISCUS comments. diff --git a/_drafts/2023-03-20-table-of-contents.md b/_drafts/2023-03-20-table-of-contents.md index f94c52b..ec91cd3 100644 --- a/_drafts/2023-03-20-table-of-contents.md +++ b/_drafts/2023-03-20-table-of-contents.md @@ -3,21 +3,25 @@ layout: post title: a post with table of contents date: 2023-03-20 11:59:00-0400 description: an example of a blog post with table of contents -categories: sample-posts toc +tags: formatting toc +categories: sample-posts giscus_comments: true related_posts: false toc: beginning: true --- + This post shows how to add a table of contents in the beginning of the post. ## Adding a Table of Contents To add a table of contents to a post, simply add + ```yml toc: beginning: true ``` + to the front matter of the post. The table of contents will be automatically generated from the headings in the post. ### Example of Sub-Heading 1 diff --git a/_drafts/2023-03-21-tables.md b/_drafts/2023-03-21-tables.md index 305d0ca..da1d7e8 100644 --- a/_drafts/2023-03-21-tables.md +++ b/_drafts/2023-03-21-tables.md @@ -3,10 +3,11 @@ layout: post title: displaying beautiful tables with Bootstrap Tables date: 2023-03-20 14:37:00-0400 description: an example of how to use Bootstrap Tables +tags: formatting tables categories: sample-posts giscus_comments: true related_posts: true -datatable: true +pretty_table: true --- Using markdown to display tables is easy. Just use the following syntax: @@ -14,29 +15,27 @@ Using markdown to display tables is easy. Just use the following syntax: ```markdown | Left aligned | Center aligned | Right aligned | | :----------- | :------------: | ------------: | -| Left 1 | center 1 | right 1 | -| Left 2 | center 2 | right 2 | -| Left 3 | center 3 | right 3 | +| Left 1 | center 1 | right 1 | +| Left 2 | center 2 | right 2 | +| Left 3 | center 3 | right 3 | ``` That will generate: | Left aligned | Center aligned | Right aligned | | :----------- | :------------: | ------------: | -| Left 1 | center 1 | right 1 | -| Left 2 | center 2 | right 2 | -| Left 3 | center 3 | right 3 | +| Left 1 | center 1 | right 1 | +| Left 2 | center 2 | right 2 | +| Left 3 | center 3 | right 3 |

It is also possible to use HTML to display tables. For example, the following HTML code will display a table with [Bootstrap Table](https://bootstrap-table.com/), loaded from a JSON file: {% raw %} + ```html - +
@@ -46,6 +45,7 @@ It is also possible to use HTML to display tables. For example, the following HT
ID
``` + {% endraw %} + data-url="{{ '/assets/json/table_data.json' | relative_url }}" +> @@ -83,6 +85,7 @@ By using [Bootstrap Table](https://bootstrap-table.com/) it is possible to creat
``` + {% endraw %}
- {% include video.html path="assets/video/pexels-engin-akyurt-6069112-960x540-30fps.mp4" class="img-fluid rounded z-depth-1" controls=true autoplay=true %} + {% include video.liquid path="assets/video/pexels-engin-akyurt-6069112-960x540-30fps.mp4" class="img-fluid rounded z-depth-1" controls=true autoplay=true %}
- {% include video.html path="assets/video/pexels-engin-akyurt-6069112-960x540-30fps.mp4" class="img-fluid rounded z-depth-1" controls=true %} + {% include video.liquid path="assets/video/pexels-engin-akyurt-6069112-960x540-30fps.mp4" class="img-fluid rounded z-depth-1" controls=true %}
@@ -24,9 +25,9 @@ It does also support embedding videos from different sources. Here are some exam
- {% include video.html path="https://www.youtube.com/embed/jNQXAC9IVRw" class="img-fluid rounded z-depth-1" %} + {% include video.liquid path="https://www.youtube.com/embed/jNQXAC9IVRw" class="img-fluid rounded z-depth-1" %}
- {% include video.html path="https://player.vimeo.com/video/524933864?h=1ac4fd9fb4&title=0&byline=0&portrait=0" class="img-fluid rounded z-depth-1" %} + {% include video.liquid path="https://player.vimeo.com/video/524933864?h=1ac4fd9fb4&title=0&byline=0&portrait=0" class="img-fluid rounded z-depth-1" %}
-
\ No newline at end of file +
diff --git a/_drafts/2023-04-25-audios.md b/_drafts/2023-04-25-audios.md index 8feb768..1f3691c 100644 --- a/_drafts/2023-04-25-audios.md +++ b/_drafts/2023-04-25-audios.md @@ -1,19 +1,20 @@ --- layout: post -title: a post with audios +title: a post with audios date: 2023-04-25 10:25:00 description: this is what included audios could look like -tags: including audios +tags: formatting audios categories: sample-posts --- + This is an example post with audios. It supports local audio files.
- {% include audio.html path="assets/audio/epicaly-short-113909.mp3" controls=true %} + {% include audio.liquid path="assets/audio/epicaly-short-113909.mp3" controls=true %}
- {% include audio.html path="https://cdn.pixabay.com/download/audio/2022/06/25/audio_69a61cd6d6.mp3" controls=true %} + {% include audio.liquid path="https://cdn.pixabay.com/download/audio/2022/06/25/audio_69a61cd6d6.mp3" controls=true %}
diff --git a/_drafts/2023-04-25-sidebar-table-of-contents.md b/_drafts/2023-04-25-sidebar-table-of-contents.md index 6159587..2afb8fc 100644 --- a/_drafts/2023-04-25-sidebar-table-of-contents.md +++ b/_drafts/2023-04-25-sidebar-table-of-contents.md @@ -3,21 +3,25 @@ layout: post title: a post with table of contents on a sidebar date: 2023-04-25 10:14:00-0400 description: an example of a blog post with table of contents on a sidebar -categories: sample-posts toc sidebar +tags: formatting toc sidebar +categories: sample-posts giscus_comments: true related_posts: false toc: sidebar: left --- + This post shows how to add a table of contents as a sidebar. ## Adding a Table of Contents To add a table of contents to a post as a sidebar, simply add + ```yml toc: sidebar: left ``` + to the front matter of the post. The table of contents will be automatically generated from the headings in the post. If you wish to display the sidebar to the right, simply change `left` to `right`. ### Example of Sub-Heading 1 @@ -29,6 +33,7 @@ Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptow Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. ## Customizing Your Table of Contents + {:data-toc-text="Customizing"} If you want to learn more about how to customize the table of contents of your sidebar, you can check the [bootstrap-toc](https://afeld.github.io/bootstrap-toc/) documentation. Notice that you can even customize the text of the heading that will be displayed on the sidebar. diff --git a/_drafts/2023-05-12-custom-blockquotes.md b/_drafts/2023-05-12-custom-blockquotes.md index 751f9eb..fdaf47e 100644 --- a/_drafts/2023-05-12-custom-blockquotes.md +++ b/_drafts/2023-05-12-custom-blockquotes.md @@ -3,18 +3,20 @@ layout: post title: a post with custom blockquotes date: 2023-05-12 15:53:00-0400 description: an example of a blog post with custom blockquotes -categories: sample-posts blockquotes +tags: formatting blockquotes +categories: sample-posts giscus_comments: true related_posts: true --- + This post shows how to add custom styles for blockquotes. Based on [jekyll-gitbook](https://github.com/sighingnow/jekyll-gitbook) implementation. -We decided to support the same custom blockquotes as in [jekyll-gitbook](https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-06-30-tips_warnings_dangers.html), which are also found in a lot of other sites' styles. The styles definitions can be found on the [_base.scss](https://github.com/alshedivat/al-folio/blob/master/_sass/_base.scss) file, more specifically: +We decided to support the same custom blockquotes as in [jekyll-gitbook](https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-06-30-tips_warnings_dangers.html), which are also found in a lot of other sites' styles. The styles definitions can be found on the [\_base.scss](https://github.com/alshedivat/al-folio/blob/master/_sass/_base.scss) file, more specifically: ```scss /* Tips, warnings, and dangers */ .post .post-content blockquote { - &.block-tip { + &.block-tip { border-color: var(--global-tip-block); background-color: var(--global-tip-block-bg); @@ -22,7 +24,12 @@ We decided to support the same custom blockquotes as in [jekyll-gitbook](https:/ color: var(--global-tip-block-text); } - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { color: var(--global-tip-block-title); } } @@ -35,7 +42,12 @@ We decided to support the same custom blockquotes as in [jekyll-gitbook](https:/ color: var(--global-warning-block-text); } - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { color: var(--global-warning-block-title); } } @@ -48,7 +60,12 @@ We decided to support the same custom blockquotes as in [jekyll-gitbook](https:/ color: var(--global-danger-block-text); } - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { color: var(--global-danger-block-title); } } @@ -67,6 +84,8 @@ A regular blockquote can be used as following: These custom styles can be used by adding the specific class to the blockquote, as follows: + + ```markdown > ##### TIP > @@ -108,3 +127,5 @@ These custom styles can be used by adding the specific class to the blockquote, > This is a danger zone, and thus should > be used carefully {: .block-danger } + + diff --git a/_drafts/2023-07-04-jupyter-notebook.md b/_drafts/2023-07-04-jupyter-notebook.md new file mode 100644 index 0000000..8c1a1fc --- /dev/null +++ b/_drafts/2023-07-04-jupyter-notebook.md @@ -0,0 +1,45 @@ +--- +layout: post +title: a post with jupyter notebook +date: 2023-07-04 08:57:00-0400 +description: an example of a blog post with jupyter notebook +tags: formatting jupyter +categories: sample-posts +giscus_comments: true +related_posts: false +--- + +To include a jupyter notebook in a post, you can use the following code: + +{% raw %} + +```liquid +{::nomarkdown} +{% assign jupyter_path = 'assets/jupyter/blog.ipynb' | relative_url %} +{% capture notebook_exists %}{% file_exists assets/jupyter/blog.ipynb %}{% endcapture %} +{% if notebook_exists == 'true' %} + {% jupyter_notebook jupyter_path %} +{% else %} +

Sorry, the notebook you are looking for does not exist.

+{% endif %} +{:/nomarkdown} +``` + +{% endraw %} + +Let's break it down: this is possible thanks to [Jekyll Jupyter Notebook plugin](https://github.com/red-data-tools/jekyll-jupyter-notebook) that allows you to embed jupyter notebooks in your posts. It basically calls [`jupyter nbconvert --to html`](https://nbconvert.readthedocs.io/en/latest/usage.html#convert-html) to convert the notebook to an html page and then includes it in the post. Since [Kramdown](https://jekyllrb.com/docs/configuration/markdown/) is the default Markdown renderer for Jekyll, we need to surround the call to the plugin with the [::nomarkdown](https://kramdown.gettalong.org/syntax.html#extensions) tag so that it stops processing this part with Kramdown and outputs the content as-is. + +The plugin takes as input the path to the notebook, but it assumes the file exists. If you want to check if the file exists before calling the plugin, you can use the `file_exists` filter. This avoids getting a 404 error from the plugin and ending up displaying the main page inside of it instead. If the file does not exist, you can output a message to the user. The code displayed above outputs the following: + +{::nomarkdown} +{% assign jupyter_path = "assets/jupyter/blog.ipynb" | relative_url %} +{% capture notebook_exists %}{% file_exists assets/jupyter/blog.ipynb %}{% endcapture %} +{% if notebook_exists == "true" %} +{% jupyter_notebook jupyter_path %} +{% else %} + +

Sorry, the notebook you are looking for does not exist.

+{% endif %} +{:/nomarkdown} + +Note that the jupyter notebook supports both light and dark themes. diff --git a/_drafts/2023-07-12-post-bibliography.md b/_drafts/2023-07-12-post-bibliography.md new file mode 100644 index 0000000..168356c --- /dev/null +++ b/_drafts/2023-07-12-post-bibliography.md @@ -0,0 +1,22 @@ +--- +layout: post +title: a post with bibliography +date: 2023-07-12 09:56:00-0400 +description: an example of a blog post with bibliography +tags: formatting bib +categories: sample-posts +giscus_comments: true +related_posts: false +related_publications: true +--- + +This post shows how to add bibliography to simple blog posts. We support every citation style that [jekyll-scholar](https://github.com/inukshuk/jekyll-scholar) does. That means simple citation like {% cite einstein1950meaning %}, multiple citations like {% cite einstein1950meaning einstein1905movement %}, long references like {% reference einstein1905movement %} or also quotes: + +{% quote einstein1905electrodynamics %} +Lorem ipsum dolor sit amet, consectetur adipisicing elit, +sed do eiusmod tempor. + +Lorem ipsum dolor sit amet, consectetur adipisicing. +{% endquote %} + +If you would like something more academic, check the [distill style post]({% post_url 2018-12-22-distill %}). diff --git a/_drafts/2023-12-12-tikzjax.md b/_drafts/2023-12-12-tikzjax.md new file mode 100644 index 0000000..a0df331 --- /dev/null +++ b/_drafts/2023-12-12-tikzjax.md @@ -0,0 +1,19 @@ +--- +layout: post +title: a post with TikZJax +date: 2023-12-12 22:25:00 +description: this is what included TikZ code could look like +tags: formatting diagrams +categories: sample-posts +tikzjax: true +--- + +This is an example post with TikZ code. TikZJax converts script tags (containing TikZ code) into SVGs. + + diff --git a/_drafts/2024-01-26-chartjs.md b/_drafts/2024-01-26-chartjs.md new file mode 100644 index 0000000..210557d --- /dev/null +++ b/_drafts/2024-01-26-chartjs.md @@ -0,0 +1,188 @@ +--- +layout: post +title: a post with chart.js +date: 2024-01-26 01:04:00 +description: this is what included chart.js code could look like +tags: formatting charts +categories: sample-posts +chart: + chartjs: true +--- + +This is an example post with some [chart.js](https://www.chartjs.org/) code. + +````markdown +```chartjs +{ + "type": "line", + "data": { + "labels": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July" + ], + "datasets": [ + { + "label": "# of bugs", + "fill": false, + "lineTension": 0.1, + "backgroundColor": "rgba(75,192,192,0.4)", + "borderColor": "rgba(75,192,192,1)", + "borderCapStyle": "butt", + "borderDash": [], + "borderDashOffset": 0, + "borderJoinStyle": "miter", + "pointBorderColor": "rgba(75,192,192,1)", + "pointBackgroundColor": "#fff", + "pointBorderWidth": 1, + "pointHoverRadius": 5, + "pointHoverBackgroundColor": "rgba(75,192,192,1)", + "pointHoverBorderColor": "rgba(220,220,220,1)", + "pointHoverBorderWidth": 2, + "pointRadius": 1, + "pointHitRadius": 10, + "data": [ + 65, + 59, + 80, + 81, + 56, + 55, + 40 + ], + "spanGaps": false + } + ] + }, + "options": {} +} +``` +```` + +This is how it looks like: + +```chartjs +{ + "type": "line", + "data": { + "labels": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July" + ], + "datasets": [ + { + "label": "# of bugs", + "fill": false, + "lineTension": 0.1, + "backgroundColor": "rgba(75,192,192,0.4)", + "borderColor": "rgba(75,192,192,1)", + "borderCapStyle": "butt", + "borderDash": [], + "borderDashOffset": 0, + "borderJoinStyle": "miter", + "pointBorderColor": "rgba(75,192,192,1)", + "pointBackgroundColor": "#fff", + "pointBorderWidth": 1, + "pointHoverRadius": 5, + "pointHoverBackgroundColor": "rgba(75,192,192,1)", + "pointHoverBorderColor": "rgba(220,220,220,1)", + "pointHoverBorderWidth": 2, + "pointRadius": 1, + "pointHitRadius": 10, + "data": [ + 65, + 59, + 80, + 81, + 56, + 55, + 40 + ], + "spanGaps": false + } + ] + }, + "options": {} +} +``` + +Also another example chart. + +````markdown +```chartjs +{ + "type": "doughnut", + "data": { + "labels": [ + "Red", + "Blue", + "Yellow" + ], + "datasets": [ + { + "data": [ + 300, + 50, + 100 + ], + "backgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ], + "hoverBackgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ] + } + ] + }, + "options": {} +} +``` +```` + +Which generates: + +```chartjs +{ + "type": "doughnut", + "data": { + "labels": [ + "Red", + "Blue", + "Yellow" + ], + "datasets": [ + { + "data": [ + 300, + 50, + 100 + ], + "backgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ], + "hoverBackgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ] + } + ] + }, + "options": {} +} +``` diff --git a/_drafts/2024-01-26-echarts.md b/_drafts/2024-01-26-echarts.md new file mode 100644 index 0000000..b496288 --- /dev/null +++ b/_drafts/2024-01-26-echarts.md @@ -0,0 +1,68 @@ +--- +layout: post +title: a post with echarts +date: 2024-01-26 16:03:00 +description: this is what included echarts code could look like +tags: formatting charts +categories: sample-posts +chart: + echarts: true +--- + +This is an example post with some [echarts](https://echarts.apache.org/) code. + +````markdown +```echarts +{ + "title": { + "text": "ECharts Getting Started Example" + }, + "responsive": true, + "tooltip": {}, + "legend": { + "top": "30px", + "data": ["sales"] + }, + "xAxis": { + "data": ["Shirts", "Cardigans", "Chiffons", "Pants", "Heels", "Socks"] + }, + "yAxis": {}, + "series": [ + { + "name": "sales", + "type": "bar", + "data": [5, 20, 36, 10, 10, 20] + } + ] +} +``` +```` + +Which generates: + +```echarts +{ + "title": { + "text": "ECharts Getting Started Example" + }, + "responsive": true, + "tooltip": {}, + "legend": { + "top": "30px", + "data": ["sales"] + }, + "xAxis": { + "data": ["Shirts", "Cardigans", "Chiffons", "Pants", "Heels", "Socks"] + }, + "yAxis": {}, + "series": [ + { + "name": "sales", + "type": "bar", + "data": [5, 20, 36, 10, 10, 20] + } + ] +} +``` + +Note that this library offer support for both light and dark themes. You can switch between them using the theme switcher in the top right corner of the page. diff --git a/_drafts/2024-01-26-geojson-map.md b/_drafts/2024-01-26-geojson-map.md new file mode 100644 index 0000000..6909aee --- /dev/null +++ b/_drafts/2024-01-26-geojson-map.md @@ -0,0 +1,93 @@ +--- +layout: post +title: a post with geojson +date: 2024-01-26 17:57:00 +description: this is what included geojson code could look like +tags: formatting charts maps +categories: sample-posts +map: true +--- + +This is an example post with some [geojson](https://geojson.org/) code. The support is provided thanks to [Leaflet](https://leafletjs.com/). To create your own visualization, go to [geojson.io](https://geojson.io/). + +````markdown +```geojson +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + -60.11363029935569, + -2.904625022183211 + ], + [ + -60.11363029935569, + -3.162613728707967 + ], + [ + -59.820894493858034, + -3.162613728707967 + ], + [ + -59.820894493858034, + -2.904625022183211 + ], + [ + -60.11363029935569, + -2.904625022183211 + ] + ] + ], + "type": "Polygon" + } + } + ] +} +``` +```` + +Which generates: + +```geojson +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + -60.11363029935569, + -2.904625022183211 + ], + [ + -60.11363029935569, + -3.162613728707967 + ], + [ + -59.820894493858034, + -3.162613728707967 + ], + [ + -59.820894493858034, + -2.904625022183211 + ], + [ + -60.11363029935569, + -2.904625022183211 + ] + ] + ], + "type": "Polygon" + } + } + ] +} +``` diff --git a/_drafts/2024-01-27-advanced-images.md b/_drafts/2024-01-27-advanced-images.md new file mode 100644 index 0000000..3baa160 --- /dev/null +++ b/_drafts/2024-01-27-advanced-images.md @@ -0,0 +1,35 @@ +--- +layout: post +title: a post with advanced image components +date: 2024-01-27 11:46:00 +description: this is what advanced image components could look like +tags: formatting images +categories: sample-posts +thumbnail: assets/img/9.jpg +images: + compare: true + slider: true +--- + +This is an example post with advanced image components. + +## Image Slider + +This is a simple image slider. It uses the [Swiper](https://swiperjs.com/) library. Check the [examples page](https://swiperjs.com/demos) for more information of what you can achieve with it. + + + {% include figure.liquid loading="eager" path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/8.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/10.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/12.jpg" class="img-fluid rounded z-depth-1" %} + + +## Image Comparison Slider + +This is a simple image comparison slider. It uses the [img-comparison-slider](https://img-comparison-slider.sneas.io/) library. Check the [examples page](https://img-comparison-slider.sneas.io/examples.html) for more information of what you can achieve with it. + + + {% include figure.liquid path="assets/img/prof_pic.jpg" class="img-fluid rounded z-depth-1" slot="first" %} + {% include figure.liquid path="assets/img/prof_pic_color.png" class="img-fluid rounded z-depth-1" slot="second" %} + diff --git a/_drafts/2024-01-27-code-diff.md b/_drafts/2024-01-27-code-diff.md new file mode 100644 index 0000000..6ec06d5 --- /dev/null +++ b/_drafts/2024-01-27-code-diff.md @@ -0,0 +1,473 @@ +--- +layout: post +title: a post with code diff +date: 2024-01-27 19:22:00 +description: this is how you can display code diffs +tags: formatting code +categories: sample-posts +code_diff: true +--- + +You can display diff code by using the regular markdown syntax: + +````markdown +```diff +diff --git a/sample.js b/sample.js +index 0000001..0ddf2ba +--- a/sample.js ++++ b/sample.js +@@ -1 +1 @@ +-console.log("Hello World!") ++console.log("Hello from Diff2Html!") +``` +```` + +Which generates: + +```diff +diff --git a/sample.js b/sample.js +index 0000001..0ddf2ba +--- a/sample.js ++++ b/sample.js +@@ -1 +1 @@ +-console.log("Hello World!") ++console.log("Hello from Diff2Html!") +``` + +But this is difficult to read, specially if you have a large diff. You can use [diff2html](https://diff2html.xyz/) to display a more readable version of the diff. For this, just use `diff2html` instead of `diff` for the code block language: + +````markdown +```diff2html +diff --git a/sample.js b/sample.js +index 0000001..0ddf2ba +--- a/sample.js ++++ b/sample.js +@@ -1 +1 @@ +-console.log("Hello World!") ++console.log("Hello from Diff2Html!") +``` +```` + +If we use a longer example, for example [this commit from diff2html](https://github.com/rtfpessoa/diff2html/commit/c2c253d3e3f8b8b267f551e659f72b44ca2ac927), it will generate the following output: + +```diff2html +From 2aaae31cc2a37bfff83430c2c914b140bee59b6a Mon Sep 17 00:00:00 2001 +From: Rodrigo Fernandes +Date: Sun, 9 Oct 2016 16:41:54 +0100 +Subject: [PATCH 1/2] Initial template override support + +--- + scripts/hulk.js | 4 ++-- + src/diff2html.js | 3 +-- + src/file-list-printer.js | 11 ++++++++--- + src/hoganjs-utils.js | 29 +++++++++++++++++------------ + src/html-printer.js | 6 ++++++ + src/line-by-line-printer.js | 6 +++++- + src/side-by-side-printer.js | 6 +++++- + test/file-list-printer-tests.js | 2 +- + test/hogan-cache-tests.js | 18 +++++++++++++++--- + test/line-by-line-tests.js | 3 +-- + test/side-by-side-printer-tests.js | 3 +-- + 11 files changed, 62 insertions(+), 29 deletions(-) + +diff --git a/scripts/hulk.js b/scripts/hulk.js +index 5a793c18..a4b1a4d5 100755 +--- a/scripts/hulk.js ++++ b/scripts/hulk.js +@@ -173,11 +173,11 @@ function namespace(name) { + // write a template foreach file that matches template extension + templates = extractFiles(options.argv.remain) + .map(function(file) { +- var openedFile = fs.readFileSync(file, 'utf-8'); ++ var openedFile = fs.readFileSync(file, 'utf-8').trim(); + var name; + if (!openedFile) return; + name = namespace(path.basename(file).replace(/\..*$/, '')); +- openedFile = removeByteOrderMark(openedFile.trim()); ++ openedFile = removeByteOrderMark(openedFile); + openedFile = wrap(file, name, openedFile); + if (!options.outputdir) return openedFile; + fs.writeFileSync(path.join(options.outputdir, name + '.js') +diff --git a/src/diff2html.js b/src/diff2html.js +index 21b0119e..64e138f5 100644 +--- a/src/diff2html.js ++++ b/src/diff2html.js +@@ -7,7 +7,6 @@ + + (function() { + var diffParser = require('./diff-parser.js').DiffParser; +- var fileLister = require('./file-list-printer.js').FileListPrinter; + var htmlPrinter = require('./html-printer.js').HtmlPrinter; + + function Diff2Html() { +@@ -43,7 +42,7 @@ + + var fileList = ''; + if (configOrEmpty.showFiles === true) { +- fileList = fileLister.generateFileList(diffJson, configOrEmpty); ++ fileList = htmlPrinter.generateFileListSummary(diffJson, configOrEmpty); + } + + var diffOutput = ''; +diff --git a/src/file-list-printer.js b/src/file-list-printer.js +index e408d9b2..1e0a2c61 100644 +--- a/src/file-list-printer.js ++++ b/src/file-list-printer.js +@@ -8,11 +8,16 @@ + (function() { + var printerUtils = require('./printer-utils.js').PrinterUtils; + +- var hoganUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ var hoganUtils; ++ + var baseTemplatesPath = 'file-summary'; + var iconsBaseTemplatesPath = 'icon'; + +- function FileListPrinter() { ++ function FileListPrinter(config) { ++ this.config = config; ++ ++ var HoganJsUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ hoganUtils = new HoganJsUtils(config); + } + + FileListPrinter.prototype.generateFileList = function(diffFiles) { +@@ -38,5 +43,5 @@ + }); + }; + +- module.exports.FileListPrinter = new FileListPrinter(); ++ module.exports.FileListPrinter = FileListPrinter; + })(); +diff --git a/src/hoganjs-utils.js b/src/hoganjs-utils.js +index 9949e5fa..0dda08d7 100644 +--- a/src/hoganjs-utils.js ++++ b/src/hoganjs-utils.js +@@ -8,18 +8,19 @@ + (function() { + var fs = require('fs'); + var path = require('path'); +- + var hogan = require('hogan.js'); + + var hoganTemplates = require('./templates/diff2html-templates.js'); + +- var templatesPath = path.resolve(__dirname, 'templates'); ++ var extraTemplates; + +- function HoganJsUtils() { ++ function HoganJsUtils(configuration) { ++ this.config = configuration || {}; ++ extraTemplates = this.config.templates || {}; + } + +- HoganJsUtils.prototype.render = function(namespace, view, params, configuration) { +- var template = this.template(namespace, view, configuration); ++ HoganJsUtils.prototype.render = function(namespace, view, params) { ++ var template = this.template(namespace, view); + if (template) { + return template.render(params); + } +@@ -27,17 +28,16 @@ + return null; + }; + +- HoganJsUtils.prototype.template = function(namespace, view, configuration) { +- var config = configuration || {}; ++ HoganJsUtils.prototype.template = function(namespace, view) { + var templateKey = this._templateKey(namespace, view); + +- return this._getTemplate(templateKey, config); ++ return this._getTemplate(templateKey); + }; + +- HoganJsUtils.prototype._getTemplate = function(templateKey, config) { ++ HoganJsUtils.prototype._getTemplate = function(templateKey) { + var template; + +- if (!config.noCache) { ++ if (!this.config.noCache) { + template = this._readFromCache(templateKey); + } + +@@ -53,6 +53,7 @@ + + try { + if (fs.readFileSync) { ++ var templatesPath = path.resolve(__dirname, 'templates'); + var templatePath = path.join(templatesPath, templateKey); + var templateContent = fs.readFileSync(templatePath + '.mustache', 'utf8'); + template = hogan.compile(templateContent); +@@ -66,12 +67,16 @@ + }; + + HoganJsUtils.prototype._readFromCache = function(templateKey) { +- return hoganTemplates[templateKey]; ++ return extraTemplates[templateKey] || hoganTemplates[templateKey]; + }; + + HoganJsUtils.prototype._templateKey = function(namespace, view) { + return namespace + '-' + view; + }; + +- module.exports.HoganJsUtils = new HoganJsUtils(); ++ HoganJsUtils.prototype.compile = function(templateStr) { ++ return hogan.compile(templateStr); ++ }; ++ ++ module.exports.HoganJsUtils = HoganJsUtils; + })(); +diff --git a/src/html-printer.js b/src/html-printer.js +index 585d5b66..13f83047 100644 +--- a/src/html-printer.js ++++ b/src/html-printer.js +@@ -8,6 +8,7 @@ + (function() { + var LineByLinePrinter = require('./line-by-line-printer.js').LineByLinePrinter; + var SideBySidePrinter = require('./side-by-side-printer.js').SideBySidePrinter; ++ var FileListPrinter = require('./file-list-printer.js').FileListPrinter; + + function HtmlPrinter() { + } +@@ -22,5 +23,10 @@ + return sideBySidePrinter.generateSideBySideJsonHtml(diffFiles); + }; + ++ HtmlPrinter.prototype.generateFileListSummary = function(diffJson, config) { ++ var fileListPrinter = new FileListPrinter(config); ++ return fileListPrinter.generateFileList(diffJson); ++ }; ++ + module.exports.HtmlPrinter = new HtmlPrinter(); + })(); +diff --git a/src/line-by-line-printer.js b/src/line-by-line-printer.js +index b07eb53c..d230bedd 100644 +--- a/src/line-by-line-printer.js ++++ b/src/line-by-line-printer.js +@@ -11,7 +11,8 @@ + var utils = require('./utils.js').Utils; + var Rematch = require('./rematch.js').Rematch; + +- var hoganUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ var hoganUtils; ++ + var genericTemplatesPath = 'generic'; + var baseTemplatesPath = 'line-by-line'; + var iconsBaseTemplatesPath = 'icon'; +@@ -19,6 +20,9 @@ + + function LineByLinePrinter(config) { + this.config = config; ++ ++ var HoganJsUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ hoganUtils = new HoganJsUtils(config); + } + + LineByLinePrinter.prototype.makeFileDiffHtml = function(file, diffs) { +diff --git a/src/side-by-side-printer.js b/src/side-by-side-printer.js +index bbf1dc8d..5e3033b3 100644 +--- a/src/side-by-side-printer.js ++++ b/src/side-by-side-printer.js +@@ -11,7 +11,8 @@ + var utils = require('./utils.js').Utils; + var Rematch = require('./rematch.js').Rematch; + +- var hoganUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ var hoganUtils; ++ + var genericTemplatesPath = 'generic'; + var baseTemplatesPath = 'side-by-side'; + var iconsBaseTemplatesPath = 'icon'; +@@ -26,6 +27,9 @@ + + function SideBySidePrinter(config) { + this.config = config; ++ ++ var HoganJsUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ hoganUtils = new HoganJsUtils(config); + } + + SideBySidePrinter.prototype.makeDiffHtml = function(file, diffs) { +diff --git a/test/file-list-printer-tests.js b/test/file-list-printer-tests.js +index a502a46f..60ea3208 100644 +--- a/test/file-list-printer-tests.js ++++ b/test/file-list-printer-tests.js +@@ -1,6 +1,6 @@ + var assert = require('assert'); + +-var fileListPrinter = require('../src/file-list-printer.js').FileListPrinter; ++var fileListPrinter = new (require('../src/file-list-printer.js').FileListPrinter)(); + + describe('FileListPrinter', function() { + describe('generateFileList', function() { +diff --git a/test/hogan-cache-tests.js b/test/hogan-cache-tests.js +index 190bf6f8..3bb754ac 100644 +--- a/test/hogan-cache-tests.js ++++ b/test/hogan-cache-tests.js +@@ -1,6 +1,6 @@ + var assert = require('assert'); + +-var HoganJsUtils = require('../src/hoganjs-utils.js').HoganJsUtils; ++var HoganJsUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(); + var diffParser = require('../src/diff-parser.js').DiffParser; + + describe('HoganJsUtils', function() { +@@ -21,16 +21,28 @@ describe('HoganJsUtils', function() { + }); + assert.equal(emptyDiffHtml, result); + }); ++ + it('should render view without cache', function() { + var result = HoganJsUtils.render('generic', 'empty-diff', { + contentClass: 'd2h-code-line', + diffParser: diffParser + }, {noCache: true}); +- assert.equal(emptyDiffHtml + '\n', result); ++ assert.equal(emptyDiffHtml, result); + }); ++ + it('should return null if template is missing', function() { +- var result = HoganJsUtils.render('generic', 'missing-template', {}, {noCache: true}); ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)({noCache: true}); ++ var result = hoganUtils.render('generic', 'missing-template', {}); + assert.equal(null, result); + }); ++ ++ it('should allow templates to be overridden', function() { ++ var emptyDiffTemplate = HoganJsUtils.compile('

{{myName}}

'); ++ ++ var config = {templates: {'generic-empty-diff': emptyDiffTemplate}}; ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); ++ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); ++ assert.equal('

Rodrigo Fernandes

', result); ++ }); + }); + }); +diff --git a/test/line-by-line-tests.js b/test/line-by-line-tests.js +index 1cd92073..8869b3df 100644 +--- a/test/line-by-line-tests.js ++++ b/test/line-by-line-tests.js +@@ -14,7 +14,7 @@ describe('LineByLinePrinter', function() { + ' File without changes\n' + + '
\n' + + ' \n' + +- '\n'; ++ ''; + + assert.equal(expected, fileHtml); + }); +@@ -422,7 +422,6 @@ describe('LineByLinePrinter', function() { + ' \n' + + ' \n' + + '\n' + +- '\n' + + ' \n' + + '
\n' + + ' \n' + +diff --git a/test/side-by-side-printer-tests.js b/test/side-by-side-printer-tests.js +index 76625f8e..771daaa5 100644 +--- a/test/side-by-side-printer-tests.js ++++ b/test/side-by-side-printer-tests.js +@@ -14,7 +14,7 @@ describe('SideBySidePrinter', function() { + ' File without changes\n' + + ' \n' + + ' \n' + +- '\n'; ++ ''; + + assert.equal(expectedRight, fileHtml.right); + assert.equal(expectedLeft, fileHtml.left); +@@ -324,7 +324,6 @@ describe('SideBySidePrinter', function() { + ' \n' + + ' \n' + + '\n' + +- '\n' + + ' \n' + + ' \n' + + ' \n' + + +From f3cadb96677d0eb82fc2752dc3ffbf35ca9b5bdb Mon Sep 17 00:00:00 2001 +From: Rodrigo Fernandes +Date: Sat, 15 Oct 2016 13:21:22 +0100 +Subject: [PATCH 2/2] Allow uncompiled templates + +--- + README.md | 3 +++ + src/hoganjs-utils.js | 7 +++++++ + test/hogan-cache-tests.js | 24 +++++++++++++++++++++++- + 3 files changed, 33 insertions(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 132c8a28..46909f25 100644 +--- a/README.md ++++ b/README.md +@@ -98,6 +98,9 @@ The HTML output accepts a Javascript object with configuration. Possible options + - `synchronisedScroll`: scroll both panes in side-by-side mode: `true` or `false`, default is `false` + - `matchWordsThreshold`: similarity threshold for word matching, default is 0.25 + - `matchingMaxComparisons`: perform at most this much comparisons for line matching a block of changes, default is `2500` ++ - `templates`: object with previously compiled templates to replace parts of the html ++ - `rawTemplates`: object with raw not compiled templates to replace parts of the html ++ > For more information regarding the possible templates look into [src/templates](https://github.com/rtfpessoa/diff2html/tree/master/src/templates) + + ## Diff2HtmlUI Helper + +diff --git a/src/hoganjs-utils.js b/src/hoganjs-utils.js +index 0dda08d7..b2e9c275 100644 +--- a/src/hoganjs-utils.js ++++ b/src/hoganjs-utils.js +@@ -17,6 +17,13 @@ + function HoganJsUtils(configuration) { + this.config = configuration || {}; + extraTemplates = this.config.templates || {}; ++ ++ var rawTemplates = this.config.rawTemplates || {}; ++ for (var templateName in rawTemplates) { ++ if (rawTemplates.hasOwnProperty(templateName)) { ++ if (!extraTemplates[templateName]) extraTemplates[templateName] = this.compile(rawTemplates[templateName]); ++ } ++ } + } + + HoganJsUtils.prototype.render = function(namespace, view, params) { +diff --git a/test/hogan-cache-tests.js b/test/hogan-cache-tests.js +index 3bb754ac..a34839c0 100644 +--- a/test/hogan-cache-tests.js ++++ b/test/hogan-cache-tests.js +@@ -36,7 +36,7 @@ describe('HoganJsUtils', function() { + assert.equal(null, result); + }); + +- it('should allow templates to be overridden', function() { ++ it('should allow templates to be overridden with compiled templates', function() { + var emptyDiffTemplate = HoganJsUtils.compile('

{{myName}}

'); + + var config = {templates: {'generic-empty-diff': emptyDiffTemplate}}; +@@ -44,5 +44,27 @@ describe('HoganJsUtils', function() { + var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); + assert.equal('

Rodrigo Fernandes

', result); + }); ++ ++ it('should allow templates to be overridden with uncompiled templates', function() { ++ var emptyDiffTemplate = '

{{myName}}

'; ++ ++ var config = {rawTemplates: {'generic-empty-diff': emptyDiffTemplate}}; ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); ++ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); ++ assert.equal('

Rodrigo Fernandes

', result); ++ }); ++ ++ it('should allow templates to be overridden giving priority to compiled templates', function() { ++ var emptyDiffTemplate = HoganJsUtils.compile('

{{myName}}

'); ++ var emptyDiffTemplateUncompiled = '

Not used!

'; ++ ++ var config = { ++ templates: {'generic-empty-diff': emptyDiffTemplate}, ++ rawTemplates: {'generic-empty-diff': emptyDiffTemplateUncompiled} ++ }; ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); ++ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); ++ assert.equal('

Rodrigo Fernandes

', result); ++ }); + }); + }); +``` diff --git a/_drafts/2024-01-27-vega-lite.md b/_drafts/2024-01-27-vega-lite.md new file mode 100644 index 0000000..099eb88 --- /dev/null +++ b/_drafts/2024-01-27-vega-lite.md @@ -0,0 +1,105 @@ +--- +layout: post +title: a post with vega lite +date: 2024-01-27 00:20:00 +last_updated: 2024-04-14 04:30:00 +description: this is what included vega lite code could look like +tags: formatting charts +categories: sample-posts +chart: + vega_lite: true +--- + +This is an example post with some [vega lite](https://vega.github.io/vega-lite/) code. + +````markdown +```vega_lite +{ + "$schema": "https://vega.github.io/schema/vega-lite/v5.json", + "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", + "data": { + "url": "https://raw.githubusercontent.com/vega/vega/main/docs/data/movies.json" + }, + "transform": [ + {"filter": "datum['IMDB Rating'] != null"}, + {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, + { + "joinaggregate": [{ + "op": "mean", + "field": "IMDB Rating", + "as": "AverageRating" + }] + }, + { + "calculate": "datum['IMDB Rating'] - datum.AverageRating", + "as": "RatingDelta" + } + ], + "mark": "point", + "encoding": { + "x": { + "field": "Release Date", + "type": "temporal" + }, + "y": { + "field": "RatingDelta", + "type": "quantitative", + "title": "Rating Delta" + }, + "color": { + "field": "RatingDelta", + "type": "quantitative", + "scale": {"domainMid": 0}, + "title": "Rating Delta" + } + } +} +``` +```` + +Which generates: + +```vega_lite +{ + "$schema": "https://vega.github.io/schema/vega-lite/v5.json", + "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", + "data": { + "url": "https://raw.githubusercontent.com/vega/vega/main/docs/data/movies.json" + }, + "transform": [ + {"filter": "datum['IMDB Rating'] != null"}, + {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, + { + "joinaggregate": [{ + "op": "mean", + "field": "IMDB Rating", + "as": "AverageRating" + }] + }, + { + "calculate": "datum['IMDB Rating'] - datum.AverageRating", + "as": "RatingDelta" + } + ], + "mark": "point", + "encoding": { + "x": { + "field": "Release Date", + "type": "temporal" + }, + "y": { + "field": "RatingDelta", + "type": "quantitative", + "title": "Rating Delta" + }, + "color": { + "field": "RatingDelta", + "type": "quantitative", + "scale": {"domainMid": 0}, + "title": "Rating Delta" + } + } +} +``` + +This plot supports both light and dark themes. diff --git a/_drafts/2024-04-15-pseudocode.md b/_drafts/2024-04-15-pseudocode.md new file mode 100644 index 0000000..d7ff18b --- /dev/null +++ b/_drafts/2024-04-15-pseudocode.md @@ -0,0 +1,71 @@ +--- +layout: post +title: a post with pseudo code +date: 2024-04-15 00:01:00 +description: this is what included pseudo code could look like +tags: formatting code +categories: sample-posts +pseudocode: true +--- + +This is an example post with some pseudo code rendered by [pseudocode](https://github.com/SaswatPadhi/pseudocode.js). The example presented here is the same as the one in the [pseudocode.js](https://saswat.padhi.me/pseudocode.js/) documentation, with only one simple but important change: everytime you would use `$`, you should use `$$` instead. Also, note that the `pseudocode` key in the front matter is set to `true` to enable the rendering of pseudo code. As an example, using this code: + +````markdown +```pseudocode +% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) +\begin{algorithm} +\caption{Quicksort} +\begin{algorithmic} +\PROCEDURE{Quicksort}{$$A, p, r$$} + \IF{$$p < r$$} + \STATE $$q = $$ \CALL{Partition}{$$A, p, r$$} + \STATE \CALL{Quicksort}{$$A, p, q - 1$$} + \STATE \CALL{Quicksort}{$$A, q + 1, r$$} + \ENDIF +\ENDPROCEDURE +\PROCEDURE{Partition}{$$A, p, r$$} + \STATE $$x = A[r]$$ + \STATE $$i = p - 1$$ + \FOR{$$j = p$$ \TO $$r - 1$$} + \IF{$$A[j] < x$$} + \STATE $$i = i + 1$$ + \STATE exchange + $$A[i]$$ with $$A[j]$$ + \ENDIF + \STATE exchange $$A[i]$$ with $$A[r]$$ + \ENDFOR +\ENDPROCEDURE +\end{algorithmic} +\end{algorithm} +``` +```` + +Generates: + +```pseudocode +% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) +\begin{algorithm} +\caption{Quicksort} +\begin{algorithmic} +\PROCEDURE{Quicksort}{$$A, p, r$$} + \IF{$$p < r$$} + \STATE $$q = $$ \CALL{Partition}{$$A, p, r$$} + \STATE \CALL{Quicksort}{$$A, p, q - 1$$} + \STATE \CALL{Quicksort}{$$A, q + 1, r$$} + \ENDIF +\ENDPROCEDURE +\PROCEDURE{Partition}{$$A, p, r$$} + \STATE $$x = A[r]$$ + \STATE $$i = p - 1$$ + \FOR{$$j = p$$ \TO $$r - 1$$} + \IF{$$A[j] < x$$} + \STATE $$i = i + 1$$ + \STATE exchange + $$A[i]$$ with $$A[j]$$ + \ENDIF + \STATE exchange $$A[i]$$ with $$A[r]$$ + \ENDFOR +\ENDPROCEDURE +\end{algorithmic} +\end{algorithm} +``` diff --git a/_drafts/mnist_high_accuracy.markdown b/_drafts/mnist_high_accuracy.markdown index e48c76d..f4262b7 100644 --- a/_drafts/mnist_high_accuracy.markdown +++ b/_drafts/mnist_high_accuracy.markdown @@ -16,7 +16,6 @@ To give your project a background in the portfolio page, just add the img tag to img: /assets/img/12.jpg --- -
@@ -32,8 +31,7 @@ To give your project a background in the portfolio page, just add the img tag to This image can also have a caption. It's like magic.
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images. - +You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, _bled_ for your project, and then.... you reveal it's glory in the next row of images.
@@ -43,13 +41,11 @@ You can also put regular text between your rows of images. Say you wanted to wri You can also have artistically styled 2/3 + 1/3 images, like these.
-

- The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
\ No newline at end of file + diff --git a/_includes/audio.html b/_includes/audio.html deleted file mode 100644 index 14c7801..0000000 --- a/_includes/audio.html +++ /dev/null @@ -1,16 +0,0 @@ -
- -
diff --git a/_includes/audio.liquid b/_includes/audio.liquid new file mode 100644 index 0000000..338e212 --- /dev/null +++ b/_includes/audio.liquid @@ -0,0 +1,30 @@ +
+
diff --git a/_includes/cv/list.html b/_includes/cv/list.html deleted file mode 100644 index 7562585..0000000 --- a/_includes/cv/list.html +++ /dev/null @@ -1,5 +0,0 @@ -
    - {% for content in entry.contents %} -
  • {{ content }}
  • - {% endfor %} -
\ No newline at end of file diff --git a/_includes/cv/list.liquid b/_includes/cv/list.liquid new file mode 100644 index 0000000..1cc2598 --- /dev/null +++ b/_includes/cv/list.liquid @@ -0,0 +1,5 @@ +
    + {% for content in entry.contents %} +
  • {{ content }}
  • + {% endfor %} +
diff --git a/_includes/cv/list_groups.liquid b/_includes/cv/list_groups.liquid new file mode 100644 index 0000000..1ca90e4 --- /dev/null +++ b/_includes/cv/list_groups.liquid @@ -0,0 +1,51 @@ +
+ {% for content in entry.contents %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus: 1 %} + {% endfor %} + + + {% for item in content.items %} + + + + {% if item.level %} + + {% endif %} + {% if item.school %} + + {% else %} + + {% endif %} + {% if item.link %} + + {% endif %} + + {% endfor %} + +
{{ content.category }}
+ {{ item.name }} + {{ item.level }}{{ item.school }} + {% endif %} + {% if item.time %} +
+ {{ item.time }} +
+
+ {% endfor %} +
diff --git a/_includes/cv/map.html b/_includes/cv/map.html deleted file mode 100644 index e0d1983..0000000 --- a/_includes/cv/map.html +++ /dev/null @@ -1,8 +0,0 @@ - - {% for content in entry.contents %} - - - - - {% endfor %} -
{{ content.name }}{{ content.value }}
\ No newline at end of file diff --git a/_includes/cv/map.liquid b/_includes/cv/map.liquid new file mode 100644 index 0000000..aee3419 --- /dev/null +++ b/_includes/cv/map.liquid @@ -0,0 +1,29 @@ + + {% for content in entry.contents %} + + + {% if content.value %} + + {% endif %} + {% if content.links %} + + {% endif %} + + {% endfor %} +
+ {{ content.name }} + {{ content.value }} +
+ {% for item in content.links %} + {% if item.link %} + + {% endif %} + {% endfor %} +
+
diff --git a/_includes/cv/nested_list.html b/_includes/cv/nested_list.liquid similarity index 59% rename from _includes/cv/nested_list.html rename to _includes/cv/nested_list.liquid index 4778aca..72200de 100644 --- a/_includes/cv/nested_list.html +++ b/_includes/cv/nested_list.liquid @@ -1,14 +1,16 @@
    - {% for content in entry.contents %} -
  • + {% for content in entry.contents %} +
  • {{ content.title }}
    {% if content.items %}
      {% for subitem in content.items %} -
    • {{ subitem }}
    • +
    • + {{ subitem }} +
    • {% endfor %}
    {% endif %} -
  • - {% endfor %} -
\ No newline at end of file + + {% endfor %} + diff --git a/_includes/cv/time_table.html b/_includes/cv/time_table.html deleted file mode 100644 index 123b9d0..0000000 --- a/_includes/cv/time_table.html +++ /dev/null @@ -1,59 +0,0 @@ -
    - {% for content in entry.contents %} -
  • -
    - {% if content.year %} -
    - - {{ content.year }} - -
    - {% endif %} -
    - {% if content.title %} -
    {{content.title}}
    - {% endif %} - {% if content.institution %} -
    {{content.institution}}
    - {% endif %} - {% if content.description %} -
      - {% for item in content.description %} -
    • - {% if item.contents %} - {{ item.title }} -
        - {% for subitem in item.contents %} -
      • {{ subitem }}
      • - {% endfor %} -
      - {% else %} - {{ item }} - {% endif %} -
    • - {% endfor %} -
    - {% endif %} - {% if content.items %} -
      - {% for item in content.items %} -
    • - {% if item.contents %} - {{ item.title }} -
        - {% for subitem in item.contents %} -
      • {{ subitem }}
      • - {% endfor %} -
      - {% else %} - {{ item }} - {% endif %} -
    • - {% endfor %} -
    - {% endif %} -
    -
    -
  • - {% endfor %} -
\ No newline at end of file diff --git a/_includes/cv/time_table.liquid b/_includes/cv/time_table.liquid new file mode 100644 index 0000000..beb1c52 --- /dev/null +++ b/_includes/cv/time_table.liquid @@ -0,0 +1,118 @@ +
    + {% for content in entry.contents %} +
  • +
    + {% if content.year %} +
    + + + + + + {% if content.location %} + + + + {% endif %} + +
    + + {{- content.year -}} + +
    +

    + + {{ content.location }} +

    +
    +
    + {% endif %} +
    + {% if content.title %} +
    {{ content.title }}
    + {% endif %} + {% if content.department or content.institution %} + + + {% if content.institution %} + + + + + {% endif %} + {% if content.department %} + + + + + {% endif %} + +
    + + {{ content.institution }}
    + + {{ content.department }}
    + {% endif %} + {% if content.maindescription %} +
    {{ content.maindescription }}
    + {% endif %} + {% if content.description %} +
      + {% for item in content.description %} +
    • + {% if item.contents %} + {{ item.title }} +
        + {% for subitem in item.contents %} +
      • + {{ subitem }} +
      • + {% endfor %} +
      + {% else %} + {{ item }} + {% endif %} +
    • + {% endfor %} +
    + {% endif %} + {% if content.items %} +
      + {% for item in content.items %} +
    • + {% if item.contents %} + {{ item.title }} +
        + {% for subitem in item.contents %} +
      • + {{ subitem }} +
      • + {% endfor %} +
      + {% else %} + {{ item }} + {% endif %} +
    • + {% endfor %} +
    + {% endif %} + {% if content.linkitems %} + + {% endif %} +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/disqus.html b/_includes/disqus.html deleted file mode 100644 index 73fe953..0000000 --- a/_includes/disqus.html +++ /dev/null @@ -1,13 +0,0 @@ -
- - -
diff --git a/_includes/disqus.liquid b/_includes/disqus.liquid new file mode 100644 index 0000000..6979a4e --- /dev/null +++ b/_includes/disqus.liquid @@ -0,0 +1,13 @@ +
+ + +
diff --git a/_includes/figure.html b/_includes/figure.html deleted file mode 100644 index e67e804..0000000 --- a/_includes/figure.html +++ /dev/null @@ -1,36 +0,0 @@ -{%- assign img_path = include.path | remove: ".jpg" | remove: ".jpeg" | remove: ".png" | remove: ".tiff" -%} - -
- - - {% if site.imagemagick.enabled %} - {% for i in site.imagemagick.widths -%} - - {% endfor -%} - {% endif %} - - - - - - - {%- if include.caption -%}
{{ include.caption }}
{%- endif %} - -
diff --git a/_includes/figure.liquid b/_includes/figure.liquid new file mode 100644 index 0000000..7c10854 --- /dev/null +++ b/_includes/figure.liquid @@ -0,0 +1,78 @@ +{% assign img_path = include.path | remove: '.jpg' | remove: '.jpeg' | remove: '.png' | remove: '.tiff' | remove: '.gif' %} + +
+ + + + {% if site.imagemagick.enabled %} + + {% endif %} + {{ include.alt }} + + + {% if include.caption %} +
{{ include.caption }}
+ {% endif %} +
diff --git a/_includes/footer.html b/_includes/footer.html deleted file mode 100644 index acc4688..0000000 --- a/_includes/footer.html +++ /dev/null @@ -1,25 +0,0 @@ - {% if site.footer_fixed %} -
-
- © Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {{ site.footer_text }} - {%- if site.impressum_path -%} - Impressum. - {%- endif -%} - {%- if site.last_updated -%} - Last updated: {{ "now" | date: '%B %d, %Y' }}. - {%- endif %} -
-
- {%- else -%} -
-
- © Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {{ site.footer_text }} - {%- if site.impressum_path -%} - Impressum. - {%- endif -%} - {%- if site.last_updated -%} - Last updated: {{ "now" | date: '%B %d, %Y' }}. - {%- endif %} -
-
- {%- endif %} \ No newline at end of file diff --git a/_includes/footer.liquid b/_includes/footer.liquid new file mode 100644 index 0000000..7541c96 --- /dev/null +++ b/_includes/footer.liquid @@ -0,0 +1,31 @@ +{% if site.footer_fixed %} +
+
+ © Copyright {{ site.time | date: '%Y' }} + {{ site.first_name }} + {{ site.middle_name }} + {{ site.last_name }}. {{ site.footer_text }} + {% if site.impressum_path %} + Impressum. + {% endif %} + {% if site.last_updated %} + Last updated: {{ 'now' | date: '%B %d, %Y' }}. + {% endif %} +
+
+{% else %} +
+
+ © Copyright {{ site.time | date: '%Y' }} + {{ site.first_name }} + {{ site.middle_name }} + {{ site.last_name }}. {{ site.footer_text }} + {% if site.impressum_path %} + Impressum. + {% endif %} + {% if site.last_updated %} + Last updated: {{ 'now' | date: '%B %d, %Y' }}. + {% endif %} +
+
+{% endif %} diff --git a/_includes/giscus.html b/_includes/giscus.html deleted file mode 100644 index bb504f6..0000000 --- a/_includes/giscus.html +++ /dev/null @@ -1,27 +0,0 @@ -
- - -
diff --git a/_includes/giscus.liquid b/_includes/giscus.liquid new file mode 100644 index 0000000..8ac16ee --- /dev/null +++ b/_includes/giscus.liquid @@ -0,0 +1,32 @@ +
+ {% if site.giscus.repo %} + + + {% else %} + {% capture giscus_warning %} > ##### giscus comments misconfigured > Please follow instructions at + [http://giscus.app](http://giscus.app) and update your giscus configuration. {: .block-danger } {% endcapture %} + {{ giscus_warning | markdownify }} + {% endif %} +
diff --git a/_includes/head.html b/_includes/head.html deleted file mode 100644 index e717c18..0000000 --- a/_includes/head.html +++ /dev/null @@ -1,39 +0,0 @@ - - {% include metadata.html %} - - - - - - - - - - - - - - - - - {% if page.toc and page.toc.sidebar %} - - - {% endif %} - - - {% if site.icon.size <= 4 %} - - {% elsif site.icon != blank %} - - {% endif %} - - - - - {% if site.enable_darkmode %} - - - - - {% endif %} diff --git a/_includes/head.liquid b/_includes/head.liquid new file mode 100644 index 0000000..fc316ba --- /dev/null +++ b/_includes/head.liquid @@ -0,0 +1,146 @@ + +{% include metadata.liquid %} + + + + + + +{% if page.pretty_table %} + +{% endif %} + + + + + + + + +{% if page.toc and page.toc.sidebar %} + + +{% endif %} + + + + +{% if page.pseudocode %} + +{% endif %} + +{% if site.icon.size <= 4 %} + +{% elsif site.icon != blank %} + +{% endif %} + + + + + +{% if site.enable_darkmode %} + + +{% endif %} + + +{% if page.map %} + +{% endif %} + + +{% if page.code_diff %} + + + +{% endif %} + +{% if page.images %} + + {% if page.images.compare %} + + {% endif %} + + {% if page.images.slider %} + + {% endif %} +{% endif %} + +{% if page.tikzjax %} + +{% endif %} diff --git a/_includes/header.html b/_includes/header.html deleted file mode 100644 index 79779f6..0000000 --- a/_includes/header.html +++ /dev/null @@ -1,119 +0,0 @@ - -
- - - -{% if site.enable_progressbar %} - - -
- -
-
-{%- endif %} -
diff --git a/_includes/header.liquid b/_includes/header.liquid new file mode 100644 index 0000000..6a5829e --- /dev/null +++ b/_includes/header.liquid @@ -0,0 +1,132 @@ +
+ + + {% if site.enable_progressbar %} + + +
+ +
+
+ {% endif %} +
diff --git a/_includes/latest_posts.html b/_includes/latest_posts.html deleted file mode 100644 index 91514d7..0000000 --- a/_includes/latest_posts.html +++ /dev/null @@ -1,26 +0,0 @@ - -
- {% if site.latest_posts != blank -%} - {%- assign latest_posts_size = site.posts | size -%} -
3 %}style="max-height: 60vw"{% endif %}> - - {%- assign latest_posts = site.posts -%} - {% if site.latest_posts.limit %} - {% assign latest_posts_limit = site.latest_posts.limit %} - {% else %} - {% assign latest_posts_limit = latest_posts_size %} - {% endif %} - {% for item in latest_posts limit: latest_posts_limit %} - - - - - {%- endfor %} -
{{ item.date | date: "%b %-d, %Y" }} - {{ item.title }} -
-
- {%- else -%} -

No posts so far...

- {%- endif %} -
diff --git a/_includes/latest_posts.liquid b/_includes/latest_posts.liquid new file mode 100644 index 0000000..e710727 --- /dev/null +++ b/_includes/latest_posts.liquid @@ -0,0 +1,48 @@ +
+ {% if site.latest_posts != blank %} + {% assign latest_posts_size = site.posts | size %} +
3 %} + style="max-height: 60vw" + {% endif %} + > + + {% assign latest_posts = site.posts %} + {% if site.latest_posts.limit %} + {% assign latest_posts_limit = site.latest_posts.limit %} + {% else %} + {% assign latest_posts_limit = latest_posts_size %} + {% endif %} + {% for item in latest_posts limit: latest_posts_limit %} + + + + + {% endfor %} +
{{ item.date | date: '%b %d, %Y' }} + {% if item.redirect == blank %} + {{ item.title }} + {% elsif item.redirect contains '://' %} + {{ item.title }} + + + + {% else %} + {{ item.title }} + {% endif %} +
+
+ {% else %} +

No posts so far...

+ {% endif %} +
diff --git a/_includes/metadata.html b/_includes/metadata.html deleted file mode 100644 index e54f8ee..0000000 --- a/_includes/metadata.html +++ /dev/null @@ -1,213 +0,0 @@ -{% if site.enable_google_verification or site.enable_bing_verification %} - - {% if site.enable_google_verification -%} - - {%- endif -%} - {% if site.enable_bing_verification -%} - - {%- endif -%} - - -{%- endif %} - - - - - - - {%- if site.title == "blank" -%} - {%- capture title -%}{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}{%- endcapture -%} - {%- else -%} - {%- capture title -%}{{ site.title }}{%- endcapture -%} - {%- endif -%} - {% if page.url == '/blog/index.html' %} - {{ site.blog_nav_title }} | {{ title }} - {%- elsif page.title != "blank" and page.url != "/" -%} - {%- if page.title == nil or page.title == "" -%} - {{ page.date | date: "%Y" }} | {{ title }} - {%- else -%} - {{ page.title }} | {{ title }} - {%- endif -%} - {%- else -%} - {{ title }} - {%- endif -%} - - - -{%- if page.keywords or site.keywords %} - -{%- endif %} - -{%- if site.serve_og_meta %} - - - - - - - - {% if page.og_image or site.og_image -%} - - {%- endif %} - - - - - - - {% if page.og_image or site.og_image -%} - - {%- endif %} - {% if site.twitter_username -%} - - - {%- endif %} -{%- endif %} - -{%- if site.serve_schema_org %} - - - {%- comment -%} Social links generator for "sameAs schema" {%- endcomment %} - {% assign sameaslinks = "" | split: "," %} - {%- if site.orcid_id -%} - {%- capture link -%}https://orcid.org/{{ site.orcid_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.scholar_userid -%} - {%- capture link -%}https://scholar.google.com/citations?user={{ site.scholar_userid }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.semanticscholar_id -%} - {%- capture link -%}https://www.semanticscholar.org/author/{{ site.semanticscholar_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.publons_id -%} - {%- capture link -%}https://publons.com/a/{{ site.publons_id }}/{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.research_gate_profile -%} - {%- capture link -%}https://www.researchgate.net/profile/{{site.research_gate_profile}}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.scopus_id -%} - {%- capture link -%}https://www.scopus.com/authid/detail.uri?authorId={{site.scopus_id}}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.github_username -%} - {%- capture link -%}https://github.com/{{ site.github_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.telegram_username -%} - {%- capture link -%}https://telegram.me/{{ site.telegram_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.linkedin_username -%} - {%- capture link -%}https://www.linkedin.com/in/{{ site.linkedin_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.twitter_username -%} - {%- capture link -%}https://twitter.com/{{ site.twitter_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.medium_username -%} - {%- capture link -%}https://medium.com/@{{ site.medium_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.quora_username -%} - {%- capture link -%}https://www.quora.com/profile/{{ site.quora_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.blogger_url -%} - {%- capture link -%}{{ site.blogger_url }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.work_url -%} - {%- capture link -%}{{ site.work_url }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.wikidata_id -%} - {%- capture link -%}https://www.wikidata.org/wiki/{{ site.wikidata_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.wikipedia_id -%} - {%- capture link -%}https://wikipedia.org/wiki/User:{{ site.wikipedia_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.strava_userid -%} - {%- capture link -%}https://www.strava.com/athletes/{{ site.strava_userid }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.keybase_username -%} - {%- capture link -%}https://keybase.io/{{ site.keybase_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.gitlab_username -%} - {%- capture link -%}https://gitlab.com/{{ site.gitlab_username }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.dblp_url -%} - {%- capture link -%}{{ site.dblp_url }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.stackoverflow_id -%} - {%- capture link -%}https://stackoverflow.com/users/{{ site.stackoverflow_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.kaggle_id -%} - {%- capture link -%}https://www.kaggle.com/{{ site.kaggle_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.lastfm_id -%} - {%- capture link -%}https://www.last.fm/user/{{ site.lastfm_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.spotify_id -%} - {%- capture link -%}https://open.spotify.com/user/{{ site.spotify_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.pinterest_id -%} - {%- capture link -%}https://www.pinterest.com/{{ site.pinterest_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.unsplash_id -%} - {%- capture link -%}https://unsplash.com/@{{ site.unsplash_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.instagram_id -%} - {%- capture link -%}https://instagram.com/{{ site.instagram_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.facebook_id -%} - {%- capture link -%}https://facebook.com/{{ site.facebook_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if site.discord_id -%} - {%- capture link -%}https://discord.com/users/{{ site.discord_id }}{%- endcapture -%} - {%- assign sameaslinks = sameaslinks | push: link -%} - {%- endif -%} - {%- if sameaslinks != blank -%} - {%- assign sameaslinks = sameaslinks | split: "" -%} - {%- endif -%} - - -{%- endif %} diff --git a/_includes/metadata.liquid b/_includes/metadata.liquid new file mode 100644 index 0000000..b737370 --- /dev/null +++ b/_includes/metadata.liquid @@ -0,0 +1,241 @@ +{% if site.enable_google_verification or site.enable_bing_verification %} + + {% if site.enable_google_verification %} + + {% endif %} + {% if site.enable_bing_verification %} + + {% endif %} + + +{% endif %} + +{% capture author_name %}{{ site.first_name }}{% if site.middle_name %} {{ site.middle_name }}{% endif %} {{ site.last_name }}{% endcapture %} + + + + + + + {% if site.title == 'blank' %} + {% capture title %}{{ author_name }}{% endcapture %} + {% else %} + {% capture title %}{{ site.title }}{% endcapture %} + {% endif %} + {% if page.url == '/blog/index.html' %} + {{ page.title }} | {{ title }} + {% elsif page.title != 'blank' and page.url != '/' %} + {% if page.title == null or page.title == '' %} + {{ page.date | date: '%Y' }} | {{ title }} + {% else %} + {{ page.title }} | {{ title }} + {% endif %} + {% else %} + {{ title }} + {% endif %} + + + +{% if page.keywords or site.keywords %} + +{% endif %} + +{% assign is_blog_post = false %} +{% if page.url != '/blog/index.html' and page.url contains '/blog/' %} + {% unless page.url contains '/tag/' or page.url contains '/category/' %} + {% assign is_blog_post = true %} + {% endunless %} +{% endif %} + +{% if site.serve_og_meta %} + + + + + + + {% if page.og_image or site.og_image %} + + {% endif %} + + + + + + + {% if page.og_image or site.og_image %} + + {% endif %} + {% if site.x_username %} + + + {% endif %} +{% endif %} + +{% if site.serve_schema_org %} + + {% comment %} Social links generator for "sameAs schema" {% endcomment %} + {% assign sameaslinks = '' | split: ',' %} + {% if site.orcid_id %} + {% capture link %}https://orcid.org/{{ site.orcid_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.scholar_userid %} + {% capture link %}https://scholar.google.com/citations?user={{ site.scholar_userid }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.semanticscholar_id %} + {% capture link %}https://www.semanticscholar.org/author/{{ site.semanticscholar_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.publons_id %} + {% capture link %}https://publons.com/a/{{ site.publons_id }}/{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.lattes_id %} + {% capture link %}http://lattes.cnpq.br/{{ site.lattes_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.osf_id %} + {% capture link %}https://osf.io/{{ site.osf_id }}/{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.research_gate_profile %} + {% capture link %}https://www.researchgate.net/profile/{{site.research_gate_profile}}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.scopus_id %} + {% capture link %}https://www.scopus.com/authid/detail.uri?authorId={{site.scopus_id}}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.github_username %} + {% capture link %}https://github.com/{{ site.github_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.telegram_username %} + {% capture link %}https://telegram.me/{{ site.telegram_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.linkedin_username %} + {% capture link %}https://www.linkedin.com/in/{{ site.linkedin_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.x_username %} + {% capture link %}https://twitter.com/{{ site.x_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.mastodon_username %} + {% capture link %}https://{{ site.mastodon_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.medium_username %} + {% capture link %}https://medium.com/@{{ site.medium_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.quora_username %} + {% capture link %}https://www.quora.com/profile/{{ site.quora_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.blogger_url %} + {% capture link %}{{ site.blogger_url }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.work_url %} + {% capture link %}{{ site.work_url }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.wikidata_id %} + {% capture link %}https://www.wikidata.org/wiki/{{ site.wikidata_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.wikipedia_id %} + {% capture link %}https://wikipedia.org/wiki/User:{{ site.wikipedia_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.strava_userid %} + {% capture link %}https://www.strava.com/athletes/{{ site.strava_userid }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.keybase_username %} + {% capture link %}https://keybase.io/{{ site.keybase_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.gitlab_username %} + {% capture link %}https://gitlab.com/{{ site.gitlab_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.dblp_url %} + {% capture link %}{{ site.dblp_url }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.stackoverflow_id %} + {% capture link %}https://stackoverflow.com/users/{{ site.stackoverflow_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.kaggle_id %} + {% capture link %}https://www.kaggle.com/{{ site.kaggle_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.lastfm_id %} + {% capture link %}https://www.last.fm/user/{{ site.lastfm_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.spotify_id %} + {% capture link %}https://open.spotify.com/user/{{ site.spotify_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.pinterest_id %} + {% capture link %}https://www.pinterest.com/{{ site.pinterest_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.unsplash_id %} + {% capture link %}https://unsplash.com/@{{ site.unsplash_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.instagram_id %} + {% capture link %}https://instagram.com/{{ site.instagram_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.facebook_id %} + {% capture link %}https://facebook.com/{{ site.facebook_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.youtube_id %} + {% capture link %}https://youtube.com/@{{ site.youtube_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.discord_id %} + {% capture link %}https://discord.com/users/{{ site.discord_id }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if site.zotero_username %} + {% capture link %}https://www.zotero.org/{{ site.zotero_username }}{% endcapture %} + {% assign sameaslinks = sameaslinks | push: link %} + {% endif %} + {% if sameaslinks != blank %} + {% assign sameaslinks = sameaslinks | split: '' %} + {% endif %} + + +{% endif %} diff --git a/_includes/news.html b/_includes/news.html deleted file mode 100644 index 2146d88..0000000 --- a/_includes/news.html +++ /dev/null @@ -1,29 +0,0 @@ -
- {% if site.news != blank -%} - {%- assign news_size = site.news | size -%} -
3 %}style="max-height: 60vw"{% endif %}> - - {%- assign news = site.news | reverse -%} - {% if include.limit and site.announcements.limit %} - {% assign news_limit = site.announcements.limit %} - {% else %} - {% assign news_limit = news_size %} - {% endif %} - {% for item in news limit: news_limit %} - - - - - {%- endfor %} -
{{ item.date | date: "%b %-d, %Y" }} - {% if item.inline -%} - {{ item.content | remove: '

' | remove: '

' | emojify }} - {%- else -%} - {{ item.title }} - {%- endif %} -
-
- {%- else -%} -

No news so far...

- {%- endif %} -
\ No newline at end of file diff --git a/_includes/news.liquid b/_includes/news.liquid new file mode 100644 index 0000000..547ccf1 --- /dev/null +++ b/_includes/news.liquid @@ -0,0 +1,34 @@ +
+ {% if site.news != blank %} + {% assign news_size = site.news | size %} +
3 %} + style="max-height: 60vw" + {% endif %} + > + + {% assign news = site.news | reverse %} + {% if include.limit and site.announcements.limit %} + {% assign news_limit = site.announcements.limit %} + {% else %} + {% assign news_limit = news_size %} + {% endif %} + {% for item in news limit: news_limit %} + + + + + {% endfor %} +
{{ item.date | date: '%b %d, %Y' }} + {% if item.inline %} + {{ item.content | remove: '

' | remove: '

' | emojify }} + {% else %} + {{ item.title }} + {% endif %} +
+
+ {% else %} +

No news so far...

+ {% endif %} +
diff --git a/_includes/pagination.html b/_includes/pagination.html deleted file mode 100644 index 4b8d27e..0000000 --- a/_includes/pagination.html +++ /dev/null @@ -1,17 +0,0 @@ -{%- if paginator.total_pages > 1 -%} - -{%- endif -%} diff --git a/_includes/pagination.liquid b/_includes/pagination.liquid new file mode 100644 index 0000000..7d504b1 --- /dev/null +++ b/_includes/pagination.liquid @@ -0,0 +1,21 @@ +{% if paginator.total_pages > 1 %} + +{% endif %} diff --git a/_includes/projects.html b/_includes/projects.html deleted file mode 100644 index 503146e..0000000 --- a/_includes/projects.html +++ /dev/null @@ -1,36 +0,0 @@ - -
- \ No newline at end of file diff --git a/_includes/projects.liquid b/_includes/projects.liquid new file mode 100644 index 0000000..0ada935 --- /dev/null +++ b/_includes/projects.liquid @@ -0,0 +1,35 @@ + diff --git a/_includes/projects_horizontal.html b/_includes/projects_horizontal.html deleted file mode 100644 index ddf7405..0000000 --- a/_includes/projects_horizontal.html +++ /dev/null @@ -1,40 +0,0 @@ -
- {%- if project.redirect -%} - - {%- else -%} - - {%- endif -%} - diff --git a/_includes/projects_horizontal.liquid b/_includes/projects_horizontal.liquid new file mode 100644 index 0000000..8630e69 --- /dev/null +++ b/_includes/projects_horizontal.liquid @@ -0,0 +1,34 @@ + diff --git a/_includes/related_posts.html b/_includes/related_posts.liquid similarity index 99% rename from _includes/related_posts.html rename to _includes/related_posts.liquid index df6b3e5..4cf4ffb 100644 --- a/_includes/related_posts.html +++ b/_includes/related_posts.liquid @@ -1,5 +1,4 @@ {% assign have_related_posts = false %} - {% for post in site.related_posts | limit: site.related_blog_posts.max_related %} {% unless have_related_posts %} {% assign have_related_posts = true %} diff --git a/_includes/repository/repo.html b/_includes/repository/repo.html deleted file mode 100644 index a0881c0..0000000 --- a/_includes/repository/repo.html +++ /dev/null @@ -1,14 +0,0 @@ -{% assign repo_url = include.repository | split: '/' %} - -{% if site.data.repositories.github_users contains repo_url.first %} - {% assign show_owner = false %} -{% else %} - {% assign show_owner = true %} -{% endif %} - - diff --git a/_includes/repository/repo.liquid b/_includes/repository/repo.liquid new file mode 100644 index 0000000..86aecc5 --- /dev/null +++ b/_includes/repository/repo.liquid @@ -0,0 +1,21 @@ +{% assign repo_url = include.repository | split: '/' %} +{% if site.data.repositories.github_users contains repo_url.first %} + {% assign show_owner = false %} +{% else %} + {% assign show_owner = true %} +{% endif %} + + diff --git a/_includes/repository/repo_trophies.html b/_includes/repository/repo_trophies.html deleted file mode 100644 index 18f5273..0000000 --- a/_includes/repository/repo_trophies.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/_includes/repository/repo_trophies.liquid b/_includes/repository/repo_trophies.liquid new file mode 100644 index 0000000..07a8d42 --- /dev/null +++ b/_includes/repository/repo_trophies.liquid @@ -0,0 +1,42 @@ + diff --git a/_includes/repository/repo_user.html b/_includes/repository/repo_user.html deleted file mode 100644 index ae06a05..0000000 --- a/_includes/repository/repo_user.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/_includes/repository/repo_user.liquid b/_includes/repository/repo_user.liquid new file mode 100644 index 0000000..35c301d --- /dev/null +++ b/_includes/repository/repo_user.liquid @@ -0,0 +1,14 @@ + diff --git a/_includes/resume/awards.liquid b/_includes/resume/awards.liquid new file mode 100644 index 0000000..13bd9b3 --- /dev/null +++ b/_includes/resume/awards.liquid @@ -0,0 +1,19 @@ +
    + {% for content in data[1] %} +
  • +
    +
    + {% if content.date %} {% assign date = content.date | split: '-' | join: '.' %} {% else %} {% assign date = '' %} {% endif %} + {{ date }} +
    +
    +
    + {{ content.title }} +
    +
    {{ content.awarder }}
    +
    {{ content.summary }}
    +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/resume/basics.liquid b/_includes/resume/basics.liquid new file mode 100644 index 0000000..3f8d5bf --- /dev/null +++ b/_includes/resume/basics.liquid @@ -0,0 +1,28 @@ + + {% assign skip_basics = 'image,profiles,location' | split: ',' %} + {% for content in data[1] %} + {% + if (content[1] == "") or (skip_basics contains + content[0]) + %} + {% continue %} + {% endif %} + + + + + + {% endfor %} +
+ {{ content[0] | capitalize }} + + {% if content[0] == 'url' %} + {{ content[1] }} + {% elsif content[0] == 'email' %} + {{ content[1] }} + {% elsif content[0] == 'phone' %} + {{ content[1] }} + {% else %} + {{ content[1] }} + {% endif %} +
diff --git a/_includes/resume/certificates.liquid b/_includes/resume/certificates.liquid new file mode 100644 index 0000000..70ec00a --- /dev/null +++ b/_includes/resume/certificates.liquid @@ -0,0 +1,35 @@ +
+ {% assign certificates = data[1] | sort: 'date' | reverse %} + {% for content in certificates %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus: 1 %} + {% endfor %} + + + + + + + + +
+ + + {{ content.name }} +
+ {{ content.issuer }} + {{ content.date }}
+
+ {% endfor %} +
diff --git a/_includes/resume/education.liquid b/_includes/resume/education.liquid new file mode 100644 index 0000000..a570605 --- /dev/null +++ b/_includes/resume/education.liquid @@ -0,0 +1,54 @@ +
    + {% assign education = data[1] | sort: 'startDate' | reverse %} + {% for content in education %} +
  • +
    +
    + {% if content.startDate and content.startDate != '' %} + {% assign startDate = content.startDate | split: '-' | slice: 0, 2 | join: '.' %} + {% assign endDate = content.endDate | split: '-' | slice: 0, 2 | join: '.' | default: 'Present' %} + {% assign date = startDate | append: ' - ' %} + {% assign date = date | append: endDate %} + {% else %} + {% assign date = null %} + {% endif %} + + + + + + {% if content.location %} + + + + {% endif %} + +
    + {% if date %} + {{ date }} + {% endif %} +
    +

    + + {{ content.location }} +

    +
    +
    +
    +
    + {{ content.studyType }} +
    +
    {{ content.institution }}
    +
    {{ content.area }}
    +
      + {% for item in content.courses %} +
    • + {{ item }} +
    • + {% endfor %} +
    +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/resume/interests.liquid b/_includes/resume/interests.liquid new file mode 100644 index 0000000..b3b72de --- /dev/null +++ b/_includes/resume/interests.liquid @@ -0,0 +1,33 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus: 1 %} + {% endfor %} + + + {% for item in content.keywords %} + + + + + {% endfor %} + +
+ + {{ content.name }}
+ {{ item }} +
+
+ {% endfor %} +
diff --git a/_includes/resume/languages.liquid b/_includes/resume/languages.liquid new file mode 100644 index 0000000..36d7875 --- /dev/null +++ b/_includes/resume/languages.liquid @@ -0,0 +1,31 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus: 1 %} + {% endfor %} + + + + + + + +
+ + {{ content.language }}
+ {{ content.fluency }} +
+
+ {% endfor %} +
diff --git a/_includes/resume/projects.liquid b/_includes/resume/projects.liquid new file mode 100644 index 0000000..5f47ea8 --- /dev/null +++ b/_includes/resume/projects.liquid @@ -0,0 +1,32 @@ +
    + {% for content in data[1] %} +
  • +
    +
    + {% if content.startDate %} + {% assign startDate = content.startDate | split: '-' | slice: 0, 2 | join: '.' %} + {% assign endDate = content.endDate | split: '-' | slice: 0, 2 | join: '.' | default: 'Present' %} + {% assign date = startDate | append: ' - ' %} + {% assign date = date | append: endDate %} + {% else %} + {% assign date = '' %} + {% endif %} + {{ date }} +
    +
    +
    + {{ content.name }} +
    +
    {{ content.summary }}
    +
      + {% for item in content.highlights %} +
    • + {{ item }} +
    • + {% endfor %} +
    +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/resume/publications.liquid b/_includes/resume/publications.liquid new file mode 100644 index 0000000..ef23413 --- /dev/null +++ b/_includes/resume/publications.liquid @@ -0,0 +1,28 @@ +
    + {% assign publications = data[1] | sort: 'releaseDate' | reverse %} + {% for content in publications %} +
  • +
    +
    + {% if content.releaseDate %} {% assign date = content.releaseDate | split: '-' | join: '.' %} {% else %} {% assign date = '' %} {% endif %} + + + + + + +
    + {{ date }} +
    +
    +
    +
    + {{ content.name }} +
    +
    {{ content.publisher }}
    +
    {{ content.summary }}
    +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/resume/references.liquid b/_includes/resume/references.liquid new file mode 100644 index 0000000..2236568 --- /dev/null +++ b/_includes/resume/references.liquid @@ -0,0 +1,31 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus: 1 %} + {% endfor %} + + + + + + + +
+ + {{ content.name }}
+ {{ content.reference }} +
+
+ {% endfor %} +
diff --git a/_includes/resume/skills.liquid b/_includes/resume/skills.liquid new file mode 100644 index 0000000..672fd05 --- /dev/null +++ b/_includes/resume/skills.liquid @@ -0,0 +1,33 @@ +
+ {% for content in data[1] %} +
+ + + + {% if content.icon %} + + {% else %} + + {% endif %} + + {% assign i = 1 %} + {% for item in content.items %} + {% assign i = i | plus: 1 %} + {% endfor %} + + + {% for item in content.keywords %} + + + + + {% endfor %} + +
+ + {{ content.name }}
+ {{ item }} +
+
+ {% endfor %} +
diff --git a/_includes/resume/volunteer.liquid b/_includes/resume/volunteer.liquid new file mode 100644 index 0000000..7a7b2d6 --- /dev/null +++ b/_includes/resume/volunteer.liquid @@ -0,0 +1,52 @@ +
    + {% assign volunteer = data[1] | sort: 'startDate' | reverse %} + {% for content in volunteer %} +
  • +
    +
    + {% if content.startDate %} + {% assign startDate = content.startDate | split: '-' | slice: 0, 2 | join: '.' %} + {% assign endDate = content.endDate | split: '-' | slice: 0, 2 | join: '.' | default: 'Present' %} + {% assign date = startDate | append: ' - ' %} + {% assign date = date | append: endDate %} + {% else %} + {% assign date = '' %} + {% endif %} + + + + + + {% if content.location %} + + + + {% endif %} + +
    + {{ date }} +
    +

    + + {{ content.location }} +

    +
    +
    +
    +
    + {{ content.position }} +
    +
    {{ content.organization }}
    +
    {{ content.summary }}
    +
      + {% for item in content.highlights %} +
    • + {{ item }} +
    • + {% endfor %} +
    +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/resume/work.liquid b/_includes/resume/work.liquid new file mode 100644 index 0000000..79d8da9 --- /dev/null +++ b/_includes/resume/work.liquid @@ -0,0 +1,52 @@ +
    + {% assign work = data[1] | sort: 'startDate' | reverse %} + {% for content in work %} +
  • +
    +
    + {% if content.startDate %} + {% assign startDate = content.startDate | split: '-' | slice: 0, 2 | join: '.' %} + {% assign endDate = content.endDate | split: '-' | slice: 0, 2 | join: '.' | default: 'Present' %} + {% assign date = startDate | append: ' - ' %} + {% assign date = date | append: endDate %} + {% else %} + {% assign date = '' %} + {% endif %} + + + + + + {% if content.location %} + + + + {% endif %} + +
    + {{ date }} +
    +

    + + {{ content.location }} +

    +
    +
    +
    +
    + {{ content.position }} +
    +
    {{ content.name }}
    +
    {{ content.summary }}
    +
      + {% for item in content.highlights %} +
    • + {{ item }} +
    • + {% endfor %} +
    +
    +
    +
  • + {% endfor %} +
diff --git a/_includes/scripts/analytics.html b/_includes/scripts/analytics.html deleted file mode 100644 index db2aeef..0000000 --- a/_includes/scripts/analytics.html +++ /dev/null @@ -1,18 +0,0 @@ -{%- if site.enable_google_analytics -%} - - - -{%- endif -%} -{%- if site.enable_panelbear_analytics -%} - - - -{%- endif -%} diff --git a/_includes/scripts/analytics.liquid b/_includes/scripts/analytics.liquid new file mode 100644 index 0000000..886cfd3 --- /dev/null +++ b/_includes/scripts/analytics.liquid @@ -0,0 +1,24 @@ +{% if site.enable_google_analytics %} + + + +{% endif %} +{% if site.enable_cronitor_analytics %} + + + +{% endif %} diff --git a/_includes/scripts/badges.html b/_includes/scripts/badges.liquid similarity index 55% rename from _includes/scripts/badges.html rename to _includes/scripts/badges.liquid index b8a3ccd..7270690 100644 --- a/_includes/scripts/badges.html +++ b/_includes/scripts/badges.liquid @@ -1,6 +1,6 @@ -{%- if site.badges.altmetric_badge %} +{% if site.enable_publication_badges.altmetric %} -{%- endif %} -{%- if site.badges.dimensions_badge %} +{% endif %} +{% if site.enable_publication_badges.dimensions %} -{%- endif %} +{% endif %} diff --git a/_includes/scripts/bootstrap.html b/_includes/scripts/bootstrap.html deleted file mode 100644 index 1c21365..0000000 --- a/_includes/scripts/bootstrap.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/_includes/scripts/bootstrap.liquid b/_includes/scripts/bootstrap.liquid new file mode 100644 index 0000000..2573e77 --- /dev/null +++ b/_includes/scripts/bootstrap.liquid @@ -0,0 +1,8 @@ + + + + diff --git a/_includes/scripts/chartjs.liquid b/_includes/scripts/chartjs.liquid new file mode 100644 index 0000000..c64bdd3 --- /dev/null +++ b/_includes/scripts/chartjs.liquid @@ -0,0 +1,19 @@ +{% if page.chart and page.chart.chartjs %} + + +{% endif %} diff --git a/_includes/scripts/diff2html.liquid b/_includes/scripts/diff2html.liquid new file mode 100644 index 0000000..42cdcff --- /dev/null +++ b/_includes/scripts/diff2html.liquid @@ -0,0 +1,30 @@ +{% if page.code_diff %} + + + +{% endif %} diff --git a/_includes/scripts/echarts.liquid b/_includes/scripts/echarts.liquid new file mode 100644 index 0000000..7030d68 --- /dev/null +++ b/_includes/scripts/echarts.liquid @@ -0,0 +1,45 @@ +{% if page.chart and page.chart.echarts %} + + {% if site.enable_darkmode %} + + {% endif %} + +{% endif %} diff --git a/_includes/scripts/imageLayouts.liquid b/_includes/scripts/imageLayouts.liquid new file mode 100644 index 0000000..27c4f21 --- /dev/null +++ b/_includes/scripts/imageLayouts.liquid @@ -0,0 +1,13 @@ +{% if page.images %} + {% if page.images.compare %} + + {% endif %} + {% if page.images.slider %} + + {% endif %} +{% endif %} diff --git a/_includes/scripts/jquery.html b/_includes/scripts/jquery.html deleted file mode 100644 index f84a2f2..0000000 --- a/_includes/scripts/jquery.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/_includes/scripts/jquery.liquid b/_includes/scripts/jquery.liquid new file mode 100644 index 0000000..6663530 --- /dev/null +++ b/_includes/scripts/jquery.liquid @@ -0,0 +1,6 @@ + + diff --git a/_includes/scripts/leaflet.liquid b/_includes/scripts/leaflet.liquid new file mode 100644 index 0000000..d27962c --- /dev/null +++ b/_includes/scripts/leaflet.liquid @@ -0,0 +1,31 @@ +{% if page.map %} + + +{% endif %} diff --git a/_includes/scripts/mansory.html b/_includes/scripts/mansory.html deleted file mode 100644 index 5a93a9e..0000000 --- a/_includes/scripts/mansory.html +++ /dev/null @@ -1,6 +0,0 @@ -{% if site.enable_mansory %} - - - - -{% endif %} diff --git a/_includes/scripts/masonry.html b/_includes/scripts/masonry.html deleted file mode 100644 index 804389d..0000000 --- a/_includes/scripts/masonry.html +++ /dev/null @@ -1,6 +0,0 @@ - {%- if site.enable_masonry -%} - - - - - {%- endif -%} diff --git a/_includes/scripts/masonry.liquid b/_includes/scripts/masonry.liquid new file mode 100644 index 0000000..ec07f18 --- /dev/null +++ b/_includes/scripts/masonry.liquid @@ -0,0 +1,16 @@ +{% if site.enable_masonry %} + + + + +{% endif %} diff --git a/_includes/scripts/mathjax.html b/_includes/scripts/mathjax.html deleted file mode 100644 index c55ec05..0000000 --- a/_includes/scripts/mathjax.html +++ /dev/null @@ -1,12 +0,0 @@ - {%- if site.enable_math -%} - - - - - {%- endif %} diff --git a/_includes/scripts/mathjax.liquid b/_includes/scripts/mathjax.liquid new file mode 100644 index 0000000..ce0f9f9 --- /dev/null +++ b/_includes/scripts/mathjax.liquid @@ -0,0 +1,19 @@ +{% if site.enable_math %} + {% unless page.pseudocode %} + + + + + {% endunless %} +{% endif %} diff --git a/_includes/scripts/mermaid.liquid b/_includes/scripts/mermaid.liquid new file mode 100644 index 0000000..4a22fa5 --- /dev/null +++ b/_includes/scripts/mermaid.liquid @@ -0,0 +1,55 @@ +{% if page.mermaid and page.mermaid.enabled %} + + {% if page.mermaid.zoomable %} + + {% endif %} + +{% endif %} diff --git a/_includes/scripts/misc.html b/_includes/scripts/misc.html deleted file mode 100644 index ddd6ee8..0000000 --- a/_includes/scripts/misc.html +++ /dev/null @@ -1,25 +0,0 @@ -{% if site.enable_tooltips %} - - -{%- endif %} - -{%- if site.enable_medium_zoom %} - - - -{%- endif -%} - -{% if page.toc and page.toc.sidebar %} - - -{% endif %} - - - - - - - - diff --git a/_includes/scripts/misc.liquid b/_includes/scripts/misc.liquid new file mode 100644 index 0000000..56d68f5 --- /dev/null +++ b/_includes/scripts/misc.liquid @@ -0,0 +1,43 @@ +{% if site.enable_tooltips %} + + +{% endif %} +{% if site.enable_medium_zoom %} + + + +{% endif %} +{% if page.toc and page.toc.sidebar %} + + +{% endif %} + + +{% if page.pretty_table %} + + +{% endif %} + + + + + + + + + +{% assign site.test-library.url = site.test-library.url | append: 'teste' %} diff --git a/_includes/scripts/progressBar.html b/_includes/scripts/progressBar.html deleted file mode 100644 index 88bb73c..0000000 --- a/_includes/scripts/progressBar.html +++ /dev/null @@ -1,80 +0,0 @@ -{% if site.enable_progressbar %} - - - - -{%- endif %} diff --git a/_includes/scripts/progressBar.liquid b/_includes/scripts/progressBar.liquid new file mode 100644 index 0000000..08d1915 --- /dev/null +++ b/_includes/scripts/progressBar.liquid @@ -0,0 +1,78 @@ +{% if site.enable_progressbar %} + + +{% endif %} diff --git a/_includes/scripts/pseudocode.liquid b/_includes/scripts/pseudocode.liquid new file mode 100644 index 0000000..0db4ca8 --- /dev/null +++ b/_includes/scripts/pseudocode.liquid @@ -0,0 +1,48 @@ +{% if site.enable_math and page.pseudocode %} + + + + + +{% endif %} diff --git a/_includes/scripts/tikzjax.liquid b/_includes/scripts/tikzjax.liquid new file mode 100644 index 0000000..aa2a3c1 --- /dev/null +++ b/_includes/scripts/tikzjax.liquid @@ -0,0 +1,3 @@ +{% if page.tikzjax %} + +{% endif %} diff --git a/_includes/scripts/vega.liquid b/_includes/scripts/vega.liquid new file mode 100644 index 0000000..c3c1375 --- /dev/null +++ b/_includes/scripts/vega.liquid @@ -0,0 +1,47 @@ +{% if page.chart and page.chart.vega_lite %} + + + + + +{% endif %} diff --git a/_includes/scripts/wechatModal.liquid b/_includes/scripts/wechatModal.liquid new file mode 100644 index 0000000..17285b3 --- /dev/null +++ b/_includes/scripts/wechatModal.liquid @@ -0,0 +1,18 @@ +{% if site.wechat_qr %} + + + +{% endif %} diff --git a/_includes/selected_papers.html b/_includes/selected_papers.html deleted file mode 100644 index ca3b34f..0000000 --- a/_includes/selected_papers.html +++ /dev/null @@ -1,4 +0,0 @@ - -
- {% bibliography -f {{ site.scholar.bibliography }} -q @*[selected=true]* %} -
diff --git a/_includes/selected_papers.liquid b/_includes/selected_papers.liquid new file mode 100644 index 0000000..e9bf093 --- /dev/null +++ b/_includes/selected_papers.liquid @@ -0,0 +1,3 @@ +
+ {% bibliography --group_by none --query @*[selected=true]* %} +
diff --git a/_includes/social.html b/_includes/social.html deleted file mode 100644 index 7b9f720..0000000 --- a/_includes/social.html +++ /dev/null @@ -1,108 +0,0 @@ - {%- if site.email -%} - - {% endif %} - {%- if site.telegram_username -%} - - {% endif %} - {%- if site.whatsapp_number -%} - - {% endif %} - {%- if site.orcid_id -%} - - {% endif %} - {%- if site.scholar_userid -%} - - {% endif %} - {%- if site.semanticscholar_id -%} - - {% endif %} - {%- if site.publons_id -%} - - {% endif %} - {%- if site.lattes_id -%} - - {% endif %} - {%- if site.osf_id -%} - - {% endif %} - {%- if site.research_gate_profile -%} - - {% endif %} - {%- if site.scopus_id -%} - - {% endif %} - {%- if site.github_username -%} - - {% endif %} - {%- if site.linkedin_username -%} - - {% endif %} - {%- if site.twitter_username -%} - - {% endif %} - {%- if site.mastodon_username -%} - - {% endif %} - {%- if site.medium_username -%} - - {% endif %} - {%- if site.quora_username -%} - - {% endif %} - {%- if site.blogger_url -%} - - {% endif %} - {%- if site.work_url -%} - - {% endif %} - {%- if site.wikidata_id -%} - - {% endif %} - {%- if site.wikipedia_id -%} - - {% endif %} - {%- if site.strava_userid -%} - - {% endif %} - {%- if site.keybase_username -%} - - {% endif %} - {%- if site.gitlab_username -%} - - {% endif %} - {%- if site.dblp_url -%} - - {% endif %} - {%- if site.stackoverflow_id -%} - - {% endif %} - {%- if site.kaggle_id -%} - - {% endif %} - {%- if site.lastfm_id -%} - - {% endif %} - {%- if site.spotify_id -%} - - {% endif %} - {%- if site.pinterest_id -%} - - {% endif %} - {%- if site.unsplash_id -%} - - {% endif %} - {%- if site.instagram_id -%} - - {% endif %} - {%- if site.facebook_id -%} - - {% endif %} - {%- if site.youtube_id -%} - - {% endif %} - {%- if site.discord_id -%} - - {% endif %} - {%- if site.rss_icon -%} - - {% endif %} diff --git a/_includes/social.liquid b/_includes/social.liquid new file mode 100644 index 0000000..0e4f395 --- /dev/null +++ b/_includes/social.liquid @@ -0,0 +1,130 @@ +{% if site.email %} + +{% endif %} +{% if site.telegram_username %} + +{% endif %} +{% if site.whatsapp_number %} + +{% endif %} +{% if site.orcid_id %} + +{% endif %} +{% if site.scholar_userid %} + +{% endif %} +{% if site.semanticscholar_id %} + +{% endif %} +{% if site.publons_id %} + +{% endif %} +{% if site.lattes_id %} + +{% endif %} +{% if site.osf_id %} + +{% endif %} +{% if site.research_gate_profile %} + +{% endif %} +{% if site.ieee_id %} + +{% endif %} +{% if site.acm_id %} + +{% endif %} +{% if site.scopus_id %} + +{% endif %} +{% if site.github_username %} + +{% endif %} +{% if site.linkedin_username %} + +{% endif %} +{% if site.x_username %} + +{% endif %} +{% if site.mastodon_username %} + +{% endif %} +{% if site.medium_username %} + +{% endif %} +{% if site.quora_username %} + +{% endif %} +{% if site.flickr_id %} + +{% endif %} +{% if site.blogger_url %} + +{% endif %} +{% if site.work_url %} + +{% endif %} +{% if site.wikidata_id %} + +{% endif %} +{% if site.wikipedia_id %} + +{% endif %} +{% if site.strava_userid %} + +{% endif %} +{% if site.keybase_username %} + +{% endif %} +{% if site.gitlab_username %} + +{% endif %} +{% if site.dblp_url %} + +{% endif %} +{% if site.stackoverflow_id %} + +{% endif %} +{% if site.kaggle_id %} + +{% endif %} +{% if site.lastfm_id %} + +{% endif %} +{% if site.spotify_id %} + +{% endif %} +{% if site.pinterest_id %} + +{% endif %} +{% if site.unsplash_id %} + +{% endif %} +{% if site.instagram_id %} + +{% endif %} +{% if site.facebook_id %} + +{% endif %} +{% if site.bluesky_url %} + +{% endif %} +{% if site.youtube_id %} + +{% endif %} +{% if site.discord_id %} + +{% endif %} +{% if site.zotero_username %} + +{% endif %} +{% if site.rss_icon %} + +{% endif %} +{% if site.wechat_qr %} + +
+ WeChat QR +
+ {% include scripts/wechatModal.liquid %} +{% endif %} diff --git a/_includes/video.html b/_includes/video.html deleted file mode 100644 index e56e054..0000000 --- a/_includes/video.html +++ /dev/null @@ -1,47 +0,0 @@ -{% assign extension = include.path | split:'.' | last %} - -
- - {% if extension == "mp4" or extension == "webm" or extension == "ogg" %} - -