Skip to content

Commit

Permalink
fix: 修复子模块错误
Browse files Browse the repository at this point in the history
  • Loading branch information
E1PsyCongroo committed Oct 13, 2024
1 parent 9c03f24 commit fead9bd
Show file tree
Hide file tree
Showing 15 changed files with 559 additions and 2 deletions.
1 change: 0 additions & 1 deletion Tools/.gitattributes

This file was deleted.

1 change: 0 additions & 1 deletion Tools/ghpages-mini-fileserver
Submodule ghpages-mini-fileserver deleted from 53b958
20 changes: 20 additions & 0 deletions Tools/ghpages-mini-fileserver/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
source 'https://rubygems.org'
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem 'jekyll', '~> 3.9.2'
gem 'webrick'

group :jekyll_plugins do
gem 'jekyll-default-layout', '~> 0.1.4'
gem 'jekyll-optional-front-matter', '~> 0.3.2'
gem 'jekyll-readme-index', '~> 0.3.0'
gem 'jekyll-seo-tag', '~> 2.8'
gem 'jekyll-file-size', '~> 0.0.7'
gem 'kramdown-parser-gfm', '~> 1.1'
end
102 changes: 102 additions & 0 deletions Tools/ghpages-mini-fileserver/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
colorator (1.1.0)
concurrent-ruby (1.3.4)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb
eventmachine (1.2.7)
ffi (1.17.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86-linux-musl)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jekyll (3.9.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-default-layout (0.1.5)
jekyll (>= 3.0, < 5.0)
jekyll-file-size (0.0.7)
jekyll-optional-front-matter (0.3.2)
jekyll (>= 3.0, < 5.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (>= 2.6)
public_suffix (6.0.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.8)
rouge (3.30.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
webrick (1.8.2)

PLATFORMS
aarch64-linux-gnu
aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin
ruby
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
jekyll (~> 3.9.2)
jekyll-default-layout (~> 0.1.4)
jekyll-file-size (~> 0.0.7)
jekyll-optional-front-matter (~> 0.3.2)
jekyll-readme-index (~> 0.3.0)
jekyll-seo-tag (~> 2.8)
kramdown-parser-gfm (~> 1.1)
webrick

BUNDLED WITH
2.5.21
21 changes: 21 additions & 0 deletions Tools/ghpages-mini-fileserver/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Anya Lin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions Tools/ghpages-mini-fileserver/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2016 Karlheinz Niebuhr

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 changes: 38 additions & 0 deletions Tools/ghpages-mini-fileserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Github Pages Mini Fileserver
A mini fileserver which runs on top of Github pages

## DEMO
[https://muink.github.io/ghpages-mini-fileserver.html](https://muink.github.io/ghpages-mini-fileserver/)

## Get started
- Setup your Github page here https://pages.github.com/
- Clone ghpages-mini-fileserver
```bash
git clone https://github.com/muink/ghpages-mini-fileserver
```
- Remove default home folder `resources/`
```bash
rm -rf ghpages-mini-fileserver/resources
```
- Set up your home folder like `mydepot/`
```bash
target='mydepot'
# Create directory "<target>"
mkdir ghpages-mini-fileserver/${target}
# Set home folder "<target>" in prenodes.sh
sed -i "s,^\(SERVER_HOME=\).*,\1${target}/," ghpages-mini-fileserver/prenodes.sh
```
- Run `prenodes.sh` every time at file is added to the home folder
- Start Jekyll
```bash
cd ghpages-mini-fileserver
jekyll serve
```
- Open Webbrowser at [http://localhost:4000/](http://localhost:4000/)

## Add content to your server
- Just put your stuff inside the home folder and commit & push
- Open your page at [https://username.github.io/<this_repo>](https://username.github.io/<this_repo>)

## Important
Github will complain if you host binaries and/or very large files. If you upload Binaries compress (Zip) them first and try to not abuse with file size.
35 changes: 35 additions & 0 deletions Tools/ghpages-mini-fileserver/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ref: <github.com/bryango/resources>
encoding : utf-8
plugins:
- jekyll-default-layout
- jekyll-optional-front-matter
- jekyll-readme-index
- jekyll-seo-tag
- jekyll-file-size
- kramdown-parser-gfm

readme_index:
with_frontmatter: true

kramdown:
auto_id_prefix: true

defaults:
-
scope:
path: "resources"
values:
layout: "files"

# defaults for github pages
# ... see: <https://docs.github.com/en/github/working-with-github-pages/about-github-pages-and-jekyll>

lsi: false
safe: false
highlighter: rouge
gist:
noscript: false
kramdown:
math_engine: mathjax
syntax_highlighter: rouge

49 changes: 49 additions & 0 deletions Tools/ghpages-mini-fileserver/_layouts/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="title">{{ page.title }}</title>
<link href="{{ '/assets/css/Karlheinz.css' | relative_url }}" rel="stylesheet">
<!-- css list start
<link href="{{ '/assets/css/openwrt.css' | relative_url }}" rel="stylesheet">
css list end-->
{% seo %}
</head>

<body>

{{ content }}

<p>
powered by <a href="https://github.com/muink/ghpages-mini-fileserver" target="_blank">ghpages-mini-fileserver</a> ©
Anya Lin
<br>
based on <a href="https://github.com/Karlheinzniebuhr/ghpages-fileserver" target="_blank">ghpages-fileserver</a> ©
Karlheinzniebuhr
</p>
</body>

<script>
var path = window.location.pathname;
var href = ["<a href='/'><em>(root)</em></a> /"];
var papart = path.trim().split("/");
var count = papart.length - 2;

if (count > 0) {
let regex = '';
for (var i = 1; i <= count; i++) {
regex = new RegExp('^/' + '([^/]+/){' + i + '}');
if (i > 1) {
href[i] = "<a href='" + path.match(regex)[0] + "'>" + decodeURI(papart[i]) + "</a> /";
} else {
href[i] = "<a href='" + path.match(regex)[0] + "'>~</a> /";
}
}
}

document.getElementById('title').innerHTML = "Index of " + decodeURI(path);
document.getElementById('path').innerHTML = "Index of " + href.join(" ");
</script>

</html>
75 changes: 75 additions & 0 deletions Tools/ghpages-mini-fileserver/_layouts/files.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
layout: base
---

{{ content }}

<h1 id="path"></h1>
<table style="width:100%">
<tr>
<th>Name</th>
<th>Date</th>
<th>Size</th>
</tr>

<!-- ref: <github.com/bryango/resources> start -->
{%- for res in site.static_files -%}

<!-- ignore ./ -->
{%- assign checkStart = res.path | split: page.url -%}
{%- if checkStart[0] != '' -%}
{%- continue -%}
{%- endif -%}
<!-- ignore ./*/ -->
{%- assign target = res.path | remove_first: page.url -%}
{%- if target contains '/' -%}
{%- continue -%}
{%- else -%}
<!-- ignore ./index.md -->
{%- if target == 'index.md' -%}
{%- continue -%}
{%- endif -%}
{%- endif -%}

<tr>
<td><a class="post-link" href="{{ target }}">{{ target | remove_first: folder }}</a></td>
<td>{{ res.modified_time | date: "%FT%T%z" }}</td>
<td>{{ res.path | escape | prepend: '.' | file_size | string_of_size }}</td>
</tr>

{% endfor %}

{%- for res in site.static_files -%}

<!-- ignore ./ -->
{%- assign checkStart = res.path | split: page.url -%}
{%- if checkStart[0] != '' -%}
{%- continue -%}
{%- endif -%}
<!-- keep ./*/ -->
{%- assign target = res.path | remove_first: page.url -%}
{%- if target contains '/' -%}
{%- assign folder_new = target | split: '/' | first -%}
{%- else -%}
{%- continue -%}
{%- endif -%}
<!-- register new subdir -->
{%- if folder_new != folder -%}
{%- assign folder = folder_new -%}
<tr>
<td><a class="post-link" href="{{ folder | append: '/' }}">{{ folder | append: '/' }}</a></td>
<td>{{ res.modified_time | date: "%FT%T%z" }}</td>
<td></td>
</tr>
{%- endif -%}
<!--
<tr>
<td><a class="post-link" href="{{ target }}">{{ target | remove_first: folder | remove_first: '/' }}</a></td>
<td>{{ res.modified_time | date: "%FT%T%z" }}</td>
<td>{{ res.path | escape | prepend: '.' | file_size | string_of_size }}</td>
</tr>
-->
{% endfor %}
<!-- ref: <github.com/bryango/resources> end -->

</table>
Loading

0 comments on commit fead9bd

Please sign in to comment.