starters: auto-import publications from Bibtex
This commit is contained in:
57
.github/workflows/import-publications.yml
vendored
Normal file
57
.github/workflows/import-publications.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# Wowchemy GitHub Action to convert Bibtex publications to Markdown-based webpages
|
||||||
|
name: Import Publications From Bibtex
|
||||||
|
|
||||||
|
# Require permission to create a PR
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
# Run workflow when a `.bib` file is added or updated in the `data/` folder
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
paths: ['publications.bib']
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
wowchemy:
|
||||||
|
if: github.repository_owner != 'wowchemy'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up Python 3.12
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install academic==0.10.0
|
||||||
|
- name: Run Academic (Bibtex To Markdown Converter)
|
||||||
|
# Check `.bib` file exists for case when action runs on `.bib` deletion
|
||||||
|
# Note GH only provides hashFiles func in `steps.if` context, not `jobs.if` context
|
||||||
|
if: ${{ hashFiles('publications.bib') != '' }}
|
||||||
|
run: academic import publications.bib content/publication/ --compact
|
||||||
|
- name: Create Pull Request
|
||||||
|
# Set ID for `Check outputs` stage
|
||||||
|
id: cpr
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
commit-message: 'content: import publications from Bibtex'
|
||||||
|
title: Wowchemy - Import latest publications
|
||||||
|
body: |
|
||||||
|
Import the latest publications from `publications.bib` to `content/publication/`.
|
||||||
|
将最新的出版物从`publications.bib`导入到`content/publication/`。
|
||||||
|
[View Documentation](https://github.com/wowchemy/bibtex-to-markdown)
|
||||||
|
base: main
|
||||||
|
labels: automated-pr, content
|
||||||
|
branch: wowchemy-import-publications
|
||||||
|
delete-branch: true
|
||||||
|
- name: Check outputs
|
||||||
|
if: ${{ steps.cpr.outputs.pull-request-number }}
|
||||||
|
run: |
|
||||||
|
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||||
|
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||||
24
.github/workflows/publish.yaml
vendored
24
.github/workflows/publish.yaml
vendored
@@ -1,5 +1,8 @@
|
|||||||
name: Deploy Wowchemy website to GitHub Pages
|
name: Deploy Wowchemy website to GitHub Pages
|
||||||
|
|
||||||
|
env:
|
||||||
|
WC_HUGO_VERSION: '0.119.0'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow every time you push to the `main` branch
|
# Trigger the workflow every time you push to the `main` branch
|
||||||
push:
|
push:
|
||||||
@@ -17,10 +20,6 @@ concurrency:
|
|||||||
group: "pages"
|
group: "pages"
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build website
|
# Build website
|
||||||
build:
|
build:
|
||||||
@@ -32,20 +31,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# Fetch history for Hugo's .GitInfo and .Lastmod
|
# Fetch history for Hugo's .GitInfo and .Lastmod
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: '1.21'
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.119.0'
|
hugo-version: ${{ env.WC_HUGO_VERSION }}
|
||||||
extended: true
|
extended: true
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: /tmp/hugo_cache_runner/
|
||||||
|
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hugomod-
|
||||||
|
- name: Setup Pages
|
||||||
|
id: pages
|
||||||
|
uses: actions/configure-pages@v3
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
env:
|
env:
|
||||||
HUGO_ENVIRONMENT: production
|
HUGO_ENVIRONMENT: production
|
||||||
HUGO_ENV: production
|
|
||||||
run: |
|
run: |
|
||||||
|
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
|
||||||
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
|
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v2
|
uses: actions/upload-pages-artifact@v2
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -1,10 +1,10 @@
|
|||||||
# [Hugo Academic Theme](https://github.com/wowchemy/starter-hugo-academic)
|
# [Hugo Academic Theme](https://github.com/wowchemy/starter-hugo-academic)
|
||||||
|
|
||||||
[](https://wowchemy.com/hugo-themes/)
|
[](https://wowchemy.com/templates/)
|
||||||
|
|
||||||
The Hugo **Academic Resumé Template** empowers you to easily create your job-winning online resumé, showcase your academic publications, and create online courses or knowledge bases to grow your audience.
|
The Hugo **Academic Resumé Template** empowers you to easily create your job-winning online resumé, showcase your academic publications, and create online courses or knowledge bases to grow your audience.
|
||||||
|
|
||||||
[](https://wowchemy.com/hugo-themes/)
|
[](https://wowchemy.com/templates/)
|
||||||
[](https://discord.com/channels/722225264733716590/742892432458252370/742895548159492138)
|
[](https://discord.com/channels/722225264733716590/742892432458252370/742895548159492138)
|
||||||
[](https://twitter.com/wowchemy)
|
[](https://twitter.com/wowchemy)
|
||||||
|
|
||||||
@@ -16,13 +16,13 @@ Easily write technical content with plain text Markdown, LaTeX math, diagrams, R
|
|||||||
|
|
||||||
The integrated [**Wowchemy**](https://wowchemy.com) website builder and CMS makes it easy to create a beautiful website for free. Edit your site in the CMS (or your favorite editor), generate it with [Hugo](https://github.com/gohugoio/hugo), and deploy with GitHub or Netlify. Customize anything on your site with widgets, light/dark themes, and language packs.
|
The integrated [**Wowchemy**](https://wowchemy.com) website builder and CMS makes it easy to create a beautiful website for free. Edit your site in the CMS (or your favorite editor), generate it with [Hugo](https://github.com/gohugoio/hugo), and deploy with GitHub or Netlify. Customize anything on your site with widgets, light/dark themes, and language packs.
|
||||||
|
|
||||||
- 👉 [**Get Started**](https://wowchemy.com/hugo-themes/)
|
- 👉 [**Get Started**](https://wowchemy.com/templates/)
|
||||||
- 📚 [View the **documentation**](https://wowchemy.com/docs/)
|
- 📚 [View the **documentation**](https://wowchemy.com/docs/)
|
||||||
- 💬 [Chat with the **Wowchemy research community**](https://discord.gg/z8wNYzb) or [**Hugo community**](https://discourse.gohugo.io)
|
- 💬 [Chat with the **Wowchemy research community**](https://discord.gg/z8wNYzb) or [**Hugo community**](https://discourse.gohugo.io)
|
||||||
- 🐦 Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%23MadeWithWowchemy&src=typed_query)
|
- 🐦 Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%23MadeWithWowchemy&src=typed_query)
|
||||||
- ⬇️ **Automatically import your publications from BibTeX** with the [Hugo Academic CLI](https://github.com/wowchemy/hugo-academic-cli)
|
- ⬇️ **Automatically import your publications from BibTeX** with the [Hugo Academic CLI](https://github.com/wowchemy/hugo-academic-cli)
|
||||||
- 💡 [Suggest an improvement](https://github.com/wowchemy/wowchemy-hugo-themes/issues)
|
- 💡 [Suggest an improvement](https://github.com/wowchemy/wowchemy-templates/issues)
|
||||||
- ⬆️ **Updating?** View the [Update Guide](https://wowchemy.com/docs/hugo-tutorials/update/) and [Release Notes](https://github.com/wowchemy/wowchemy-hugo-themes/releases)
|
- ⬆️ **Updating?** View the [Update Guide](https://wowchemy.com/docs/hugo-tutorials/update/) and [Release Notes](https://github.com/wowchemy/wowchemy-templates/releases)
|
||||||
|
|
||||||
## We ask you, humbly, to support this open source movement
|
## We ask you, humbly, to support this open source movement
|
||||||
|
|
||||||
@@ -36,8 +36,7 @@ We're an open source movement that depends on your support to stay online and th
|
|||||||
|
|
||||||
## Demo image credits
|
## Demo image credits
|
||||||
|
|
||||||
- [Open book](https://unsplash.com/photos/J4kK8b9Fgj8)
|
- [Unsplash](https://unsplash.com)
|
||||||
- [Course](https://unsplash.com/photos/JKUTrJ4vK00)
|
|
||||||
|
|
||||||
## Latest news
|
## Latest news
|
||||||
|
|
||||||
|
|||||||
@@ -51,21 +51,21 @@ education:
|
|||||||
skills:
|
skills:
|
||||||
- name: Technical
|
- name: Technical
|
||||||
items:
|
items:
|
||||||
- name: Python
|
- name: Python
|
||||||
description: ''
|
description: ''
|
||||||
percent: 80
|
percent: 80
|
||||||
icon: python
|
icon: python
|
||||||
icon_pack: fab
|
icon_pack: fab
|
||||||
- name: Data Science
|
- name: Data Science
|
||||||
description: ''
|
description: ''
|
||||||
percent: 100
|
percent: 100
|
||||||
icon: chart-line
|
icon: chart-line
|
||||||
icon_pack: fas
|
icon_pack: fas
|
||||||
- name: SQL
|
- name: SQL
|
||||||
description: ''
|
description: ''
|
||||||
percent: 40
|
percent: 40
|
||||||
icon: database
|
icon: database
|
||||||
icon_pack: fas
|
icon_pack: fas
|
||||||
- name: Hobbies
|
- name: Hobbies
|
||||||
color: '#eeac02'
|
color: '#eeac02'
|
||||||
color_border: '#f0bf23'
|
color_border: '#f0bf23'
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
name = "Academic"
|
name = "Academic"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
licenselink = "https://github.com/wowchemy/starter-hugo-academic/blob/master/LICENSE.md"
|
licenselink = "https://github.com/wowchemy/starter-hugo-academic/blob/main/LICENSE.md"
|
||||||
description = "Use the website builder to easily build your site with 50+ widgets and deploy with one click! Fully customize your site with themes, plugins, and language packs."
|
description = "Use the no-code website framework to easily build your site. Choose from 50+ widgets and deploy with one click! Fully personalize your site with themes, plugins, and language packs."
|
||||||
homepage = "https://github.com/wowchemy/starter-hugo-academic/"
|
homepage = "https://github.com/wowchemy/starter-hugo-academic/"
|
||||||
demosite = "https://wowchemy.com/hugo-themes/"
|
demosite = "https://wowchemy.com/templates/"
|
||||||
tags = ["widgets",
|
tags = ["widgets",
|
||||||
"resume",
|
"resume",
|
||||||
"portfolio",
|
"portfolio",
|
||||||
|
|||||||
Reference in New Issue
Block a user