Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.2.1 #247

Merged
merged 5 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /bin/bash

# print folder contents for debugging
echo "Contents:"
echo ""
printf "Contents:"
printf ""
vincerubinetti marked this conversation as resolved.
Show resolved Hide resolved
ls
echo ""
printf ""

# run cite process
python3 _cite/cite.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Set root url
run: |
echo "\n\nurl: ${{ steps.pages.outputs.origin }}" >> _config.yaml
printf "\n\nurl: ${{ steps.pages.outputs.origin }}" >> _config.yaml

- name: Build live version of site
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/first-time-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: touch .nojekyll

- name: Make placeholder homepage
run: echo "Placeholder homepage" > index.html
run: printf "Placeholder homepage" > index.html

- name: Commit changes to Pages branch
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down Expand Up @@ -70,12 +70,12 @@ jobs:
run: |
user="${{ github.repository_owner }}"
description="An engaging 1-3 sentence description of your lab."
echo "USER=${user}" >> $GITHUB_ENV
echo "DESCRIPTION=${description}" >> $GITHUB_ENV
printf "USER=${user}" >> $GITHUB_ENV
printf "DESCRIPTION=${description}" >> $GITHUB_ENV

- name: Personalize readme for user
run: |
echo "
printf "
# ${{ env.USER }}'s Website

Visit **[website url](#)** 🚀
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Reference: common-changelog.org

## 1.2.1 - 2024-03-26

### Changed

- Minor bug fixes in cite process and sitemap generation.

## 1.2.0 - 2024-03-08

### Changed
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# citation metadata for the template itself

title: "Lab Website Template"
version: 1.2.0
date-released: 2024-03-08
version: 1.2.1
date-released: 2024-03-26
url: "https://github.com/greenelab/lab-website-template"
authors:
- family-names: "Rubinetti"
Expand Down
4 changes: 3 additions & 1 deletion _cite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import yaml
from yaml.loader import SafeLoader
from pathlib import Path
from datetime import datetime
from datetime import datetime, date as date_type
from rich import print
from diskcache import Cache

Expand Down Expand Up @@ -95,6 +95,8 @@ def format_date(date):

if isinstance(date, int):
return datetime.fromtimestamp(date // 1000.0).strftime("%Y-%m-%d")
if isinstance(date, date_type):
vincerubinetti marked this conversation as resolved.
Show resolved Hide resolved
return date.strftime("%Y-%m-%d")
try:
return datetime.strptime(date, "%Y-%m-%d").strftime("%Y-%m-%d")
except Exception:
Expand Down