File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,17 @@ readonly MY_PATH
2323readonly SCRIPT_DIR
2424readonly DOC_SINGLE=" ${SCRIPT_DIR} /doc-single.sh"
2525readonly LIB_BASH_DIR=" ${SCRIPT_DIR} /.."
26- readonly LIB_DOCS_DIR=" ${SCRIPT_DIR} /../docs/lib"
26+ readonly LIB_DOCS_DIR=" ${SCRIPT_DIR} /../docs/_lib"
27+
28+ function front_matter() {
29+ local title=" ${1?Must provide title} "
30+ cat << EOF
31+ ---
32+ title: "${title} – lib-bash"
33+ permalink: /lib/${title} /
34+ ---
35+ EOF
36+ }
2737
2838function main() {
2939 rm -rf " ${LIB_DOCS_DIR} "
@@ -34,8 +44,10 @@ function main() {
3444 for lib in " ${LIB_BASH_DIR} " /lib_* .sh; do
3545 local lib_name
3646 lib_name=" $( basename " ${lib} " ) "
37- local target=" ${LIB_DOCS_DIR} /${lib_name% .sh} .md"
38- " ${DOC_SINGLE} " " ${lib} " > " ${target} "
47+ lib_title=" ${lib_name% .sh} "
48+ local target=" ${LIB_DOCS_DIR} /${lib_title} .md"
49+ front_matter " ${lib_title} " > " ${target} "
50+ " ${DOC_SINGLE} " " ${lib} " >> " ${target} "
3951 done
4052}
4153
Original file line number Diff line number Diff line change 33![ Lib-Bash Decorative Image] ( img/LibBashGitHubSocialPreview.jpg )
44
55A set of libraries to use from within your Bash scripts.
6+
7+ ## Libraries
8+
9+ {% for lib in site.lib %}
10+
11+ - [ {{ lib.title }}] ({{ lib.url | relative_url }})
12+
13+ {% endfor %}
Original file line number Diff line number Diff line change 1+ # _config.yml
2+ title : lib-bash – Bash Libraries
3+ description : Documentation generated via Jekyll GitHub Action
4+ theme : jekyll-theme-minimal
5+
6+ # Other configurations
7+ markdown : kramdown
8+ strict_front_matter : true
9+ collections :
10+ lib :
11+ output : true
12+ sort_by : title
13+ permalink : /:collection/:path/
14+ # plugins:
15+ # - jekyll-feed
16+ # - jekyll-seo-tag
17+ # - jekyll-sitemap
18+ # - jekyll-remote-theme
19+ # - jekyll-redirect-from
20+ # - jekyll-paginate
21+ # - jekyll-archives
22+ # - jekyll-github-metadata
23+ # - jekyll-avatar
24+ # - jekyll-mentions
25+ # - jekyll-include-cache
26+ # - jekyll-default-layout
27+ # - jekyll-default-mimetype
28+ # - jekyll-optional-front-matter
29+ # - jekyll-readme-index
30+ # - jekyll-relative-links
31+ # - jekyll-remote-theme
32+ # - jekyll-titles-from-headings
33+ # - jekyll-redirect-from
34+ # - jekyll-optional-front-matter
35+ # - jekyll-remote-theme
36+ # - jekyll-titles-from-headings
37+ # - jekyll-redirect-from
38+ #
Original file line number Diff line number Diff line change 1+ ---
2+ title : " lib_console – lib-bash"
3+ permalink : /lib/lib_console/
4+ ---
15
26# lib_console.sh
37
Original file line number Diff line number Diff line change 1+ ---
2+ title : " lib_gnucompat – lib-bash"
3+ permalink : /lib/lib_gnucompat/
4+ ---
15
26# GNU-Tools Compatibility Layer
37
Original file line number Diff line number Diff line change 1+ ---
2+ title : " lib_init – lib-bash"
3+ permalink : /lib/lib_init/
4+ ---
15
26# lib_init.sh
37
Original file line number Diff line number Diff line change 1+ ---
2+ title : " lib_scriptinfo – lib-bash"
3+ permalink : /lib/lib_scriptinfo/
4+ ---
15
26# lib_scriptinfo.sh
37
You can’t perform that action at this time.
0 commit comments