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

add Bevy awesome to website #156

Merged
merged 30 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8e590f8
add Bevy awesome to website
mockersf May 25, 2021
cca4f72
small css improvements
mockersf May 25, 2021
43a2fdd
no space before anchor
mockersf May 25, 2021
8b11617
split CI and deploy
mockersf May 25, 2021
dd02a08
messed up copypasta
mockersf May 25, 2021
af97acb
whole card is a link
mockersf May 25, 2021
2379a27
toc
mockersf May 25, 2021
53c41ea
remove useless padding
mockersf May 25, 2021
4d9eb38
random order inside each section
mockersf May 26, 2021
f794947
reduce card height
mockersf May 26, 2021
c0118c5
link only on title and image
mockersf May 26, 2021
cf35d73
back to whole-card-is-a-link, remove markdown from description
mockersf May 26, 2021
a078993
goodbye awesome, hello assets
mockersf May 26, 2021
d9611ef
missed one
mockersf May 26, 2021
907104a
Fix nav toggle and unify styling
cart May 26, 2021
ab76e3b
Add assets to header bar
cart May 26, 2021
5ace23a
reduce asset width
cart May 27, 2021
2bff415
support boosting categories
cart May 27, 2021
3ccdc3f
use migrated PR of awesome-bevy, and order
mockersf May 27, 2021
0e7d267
remove pages directly under a main section
mockersf May 27, 2021
74caf2e
parse markdown for descriptions now that we don't have links
mockersf May 27, 2021
80caf33
can reverse sort order
mockersf May 27, 2021
da6a08e
break words of long title overflowing
mockersf May 27, 2021
079de40
use awesome bevy branch
mockersf May 27, 2021
5d72f3b
trying something for headers
mockersf May 27, 2021
978026b
no markdown in description
mockersf May 27, 2021
6a3faa5
reduce header size and remove initial >
mockersf May 27, 2021
08473ea
use fixed card height and line clamp for number of lines in description
mockersf May 27, 2021
5a7caa5
truncate at 100 chars
mockersf May 28, 2021
1ef99f4
use the correct field for header
mockersf May 28, 2021
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
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: "Build Bevy Assets"
run: cd generate-assets && ./generate_assets.sh

- name: "Build website"
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
BUILD_ONLY: true
TOKEN: fake-secret
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy

on:
push:
branches: [master]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: "Build Bevy Assets"
run: cd generate-assets && ./generate_assets.sh

- name: "Build and deploy website"
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
TOKEN: ${{ secrets.CART_PAT }}
39 changes: 0 additions & 39 deletions .github/workflows/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
public
**/.DS_Store
.idea/
content/assets
2 changes: 2 additions & 0 deletions generate-assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
assets
149 changes: 149 additions & 0 deletions generate-assets/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions generate-assets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "generate-assets"
version = "0.1.0"
authors = [
"Bevy Contributors <bevyengine@gmail.com>",
"Carter Anderson <mcanders1@gmail.com>",
]
license = "MIT"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
toml = "0.5"
serde = { version = "1", features = [ "derive" ] }
rand = "0.8"
5 changes: 5 additions & 0 deletions generate-assets/generate_assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

git clone --branch migration https://github.com/mockersf/awesome-bevy assets

cargo run -- assets ../content
42 changes: 42 additions & 0 deletions generate-assets/parse_old_readme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import re
import os
import sys

name_fix = {
'bevy_nbody': 'thallada-bevy_nbody',
'bevy-nbody': 'WhoisDavid-bevy-nbody',
}

f = open(sys.argv[1] + "/README.md")
lines = f.readlines()

root_folder = sys.argv[2] + "/"
os.mkdir(root_folder)

category = None
subcategory = None
current_path = root_folder
for line in lines:
if line[0:3] == "## ":
category = line.split("# ")[1][0:-1]
current_path = root_folder + category
os.mkdir(current_path)
elif line[0:3] == "###":
subcategory = line.split("# ")[1][0:-1]
current_path = root_folder + category + "/" + subcategory
os.mkdir(current_path)
elif line[0:2] == "* ":
line = line[0:-1]
m = re.search('\* \[([^]]*)\]\(([^)]*)\)(: (.*))?', line)
name = m.group(1)
link = m.group(2)
desc = m.group(4)
if name in name_fix:
name = name_fix[name]
f = open(current_path + '/' + name.replace(' ', '-').replace('/', '-') + ".toml", "w")
f.write("name = \"" + name + "\"\n")
if desc is not None:
f.write("description = \"" + desc.replace('"', '\'') + "\"\n")
f.write("link = \"" + link + "\"\n")
f.close()

Loading