mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-22 10:59:45 +08:00
[generate-themes-doc.fish] Ignore '.git' suffix on theme URLs (#472)
* Ignore '.git' suffix on theme URLs. * Regenerated the Themes doc (after a long hiatus)
This commit is contained in:
parent
38d4badbd2
commit
284f5b5518
968
docs/Themes.md
968
docs/Themes.md
File diff suppressed because it is too large
Load Diff
|
@ -35,9 +35,9 @@ echo "Generating Themes documentation to $theme_doc ..."
|
|||
echo "# Available themes" > $temp_theme_toc
|
||||
|
||||
for theme in (command find $project_dir/db/themes/ -type f|sort)
|
||||
set -l name (echo $theme|xargs basename)
|
||||
set -l url (cat $theme)
|
||||
set -l raw_content (echo $url|sed -r 's#https://github.com/([-.a-z0-9]+)/([-.a-z0-9]+)#https://raw.githubusercontent.com/\1/\2/master#gi')
|
||||
set -l name (basename $theme)
|
||||
read -l url < $theme
|
||||
set -l raw_content (echo $url | sed -r 's#\.git$#/#i; s#https://github.com/([-.a-z0-9]+)/([-.a-z0-9]+)#https://raw.githubusercontent.com/\1/\2/master#i')
|
||||
set -l readme (__find_readme $raw_content)
|
||||
|
||||
echo "- [$name](#$name)" >> $temp_theme_toc
|
||||
|
|
Loading…
Reference in New Issue
Block a user