File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,19 @@ <h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repo
2121 {% endif %}
2222
2323 < p > {{ site.description | default: site.github.project_tagline }}</ p >
24+
25+ < script >
26+ ( async ( ) => {
27+ const response = await fetch ( 'https://api.github.com/repos/:user/:repo/contents/' ) ;
28+ const data = await response . json ( ) ;
29+ let htmlString = '<ul>' ;
30+ for ( let file of data ) {
31+ htmlString += `<li><a href="${ file . path } ">${ file . name } </a></li>` ;
32+ }
33+ htmlString += '</ul>' ;
34+ document . getElementsByTagName ( 'body' ) [ 0 ] . innerHTML = htmlString ;
35+ } ) ( )
36+ </ script >
2437
2538 {% if site.github.is_project_page %}
2639 < p class ="view "> < a href ="{{ site.github.repository_url }} "> View the Project on GitHub < small > {{ site.github.repository_nwo }}</ small > </ a > </ p >
You can’t perform that action at this time.
0 commit comments