Skip to content

Commit ddc3461

Browse files
Update
1 parent dc158ad commit ddc3461

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,27 @@ clean:
55
rm src/Gemfile.lock || true
66
docker container rm jekyll-build jekyll-serve
77

8+
#clone:
9+
#git clone --recursive --depth 1 --jobs 100 https://github.com/albertlauncher/albert.git
10+
811
doxygen:
9-
rm -rf albert src/reference
10-
git clone --depth 1 https://github.com/albertlauncher/albert.git
12+
rm -rf src/reference
1113
doxygen
1214

13-
build: doxygen
15+
readmes:
16+
rm -rf src/_site/readmes
17+
mkdir -p src/_site/readmes
18+
for path in albert/plugins/*/README.md
19+
do
20+
echo ${i:15:-10}; done
21+
cp albert/README.md src/_site/readmes/albert.md
22+
cp albert/plugins/README.md src/_site/readmes/plugins.md
23+
cp albert/plugins/README.md src/_site/readmes/plugins.md
24+
25+
build:
1426
docker-compose up --build jekyll-build
1527

16-
serve: doxygen
28+
serve:
1729
docker-compose up --build jekyll-serve
1830

1931
html-proofer: build

make_readmes.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
jekyll_collection_path="src/_plugins"
4+
5+
mkdir -p $jekyll_collection_path
6+
7+
for plugin_path in albert/plugins/*/
8+
do
9+
plugin_id=$(basename "$plugin_path")
10+
plugin_name=$(cat "$plugin_path/metadata.json" | jq -r ".name")
11+
jekyll_source_file="$jekyll_collection_path/$plugin_id.md"
12+
echo "$plugin_path | $plugin_id | $plugin_name > $jekyll_source_file"
13+
14+
cat << EOF > "$jekyll_source_file"
15+
---
16+
layout: default
17+
title: $plugin_name
18+
parent: Plugins
19+
permalink: /plugins/$plugin_id/
20+
---
21+
22+
# Albert plugin: {{ page.title }}
23+
{: .no_toc }
24+
25+
- TOC
26+
{:toc}
27+
28+
EOF
29+
30+
sed '/^# [^#]/d' "$plugin_path/README.md" >> "$jekyll_source_file"
31+
32+
done
33+

src/_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ mermaid:
7575
#exclude: [vendor]
7676
future: true
7777

78-
78+
##collections_dir: collections
79+
#collections:
80+
# plugins:
81+
# output: true
7982

8083

8184
plugins:

0 commit comments

Comments
 (0)