Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanouil committed Jul 21, 2024
2 parents 330d424 + bc2e38c commit 3c46f7e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/_site/
extensions/check-new-content.sh
extensions/yaml
extensions/authors
4 changes: 0 additions & 4 deletions assets/stylesheets/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@
vertical-align: top;
text-transform: capitalize;
}

#title-block-header.quarto-title-block.default .quarto-title .title {
display: none;
}
33 changes: 33 additions & 0 deletions extensions/_author-listing.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "<<fancy-author>>"
image: https://github.com/<<author>>.png
about:
id: about-<<author>>
template: solana
image-width: 9em
image-shape: round
links:
- text: "{{< iconify octicon:mark-github-16 >}} GitHub"
href: "https://github.com/<<author>>"
repo-actions: false
listing:
id: listing-extensions-<<author>>
contents:
- ../yaml/<<author>>--**.yml
type: grid
sort-ui: [title, date, author, file-modified]
sort:
- stars desc
filter-ui: true
categories: true
page-size: 10
grid-columns: 2
grid-item-align: center
max-description-length: 500
---

::: {#about-<<author>>}
:::

::: {#listing-extensions-<<author>>}
:::
8 changes: 6 additions & 2 deletions extensions/make-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

mkdir -p extensions/yaml
mkdir -p extensions/authors
# mkdir -p extensions/readme
declare -A repos

Expand Down Expand Up @@ -43,7 +44,6 @@ while IFS=, read -r entry; do
fi
repo_description=$(echo "${repo_description}" | sed 's/^[[:space:]]*//')
repo_description=$(echo "${repo_description}" | sed -E 's/([^`])(<[^<>]+>)([^`])/\1`\2`\3/g')

repo_topics=$(echo "${repo_info}" | jq -r ".repositoryTopics")
if [[ "${repo_topics}" = "null" ]]; then
repo_topics="[]"
Expand All @@ -56,10 +56,11 @@ while IFS=, read -r entry; do
repo_topics=$(echo "${repo_topics}" | jq -r 'map(select(. | test("quarto|extension|^pub$") | not))')
repo_topics=$(echo "${repo_topics}" | jq -c 'unique')
fi
author_listing="extensions/authors/${repo%%/*}.qmd"
echo -e \
"- title: $(basename ${repo})\n" \
" path: https://github.com/${repo}\n" \
" author: \"[${repo_author}](https://github.com/${repo_owner}/)\"\n" \
" author: \"[${repo_author}](/${author_listing})\"\n" \
" date: \"${repo_created}\"\n" \
" file-modified: \"${repo_updated}\"\n" \
" categories: ${repo_topics}\n" \
Expand All @@ -69,6 +70,9 @@ while IFS=, read -r entry; do
" description: |\n ${repo_description}\n${yaml_usage}\n" \
> "${meta}"
# echo -e $(gh api "repos/${repo}/contents/README.md" -H "Accept: application/vnd.github.v3.raw") > "${readme}"
if [[ ! -f "${author_listing}" ]]; then
sed -e "s/<<author>>/${repo%%/*}/g" -e "s/<<fancy-author>>/\[${repo_author}\]\(https:\/\/github.com\/${repo_owner}\)/g" extensions/_author-listing.qmd > "${author_listing}"
fi
fi
done < extensions/quarto-extensions.csv

Expand Down

0 comments on commit 3c46f7e

Please sign in to comment.