mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2026-01-10 21:11:46 +08:00
Compare commits
35 Commits
AR-Backup-
...
AR-Backup-
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fd191d418 | |||
| 99ec7de3cd | |||
| cd294479e0 | |||
| b7ab4e6356 | |||
| 934c04aea7 | |||
| 5c7773fb59 | |||
| 41ce7aabb0 | |||
| cbe4db5992 | |||
| 04e63388b6 | |||
| 106aa95def | |||
| f1e7070380 | |||
| 10a3521795 | |||
| 881ed13576 | |||
| 982a87e0bf | |||
| 5097364988 | |||
| c437b255f1 | |||
| efaaa32674 | |||
| 8a51f7a942 | |||
| afe8b95115 | |||
| 2aad4be863 | |||
| 74cb7d028c | |||
| d74fe7b4b8 | |||
| 8f7d02697d | |||
| 4afea923c5 | |||
| e6281bfa5f | |||
| a4e9d17cf1 | |||
| 975fcf9d8e | |||
| 1734d36dd5 | |||
| eefdb73475 | |||
| c622346eaa | |||
| 7609bb0b8f | |||
| 2298c9b271 | |||
| f9abd1e5d7 | |||
| 62ea62e8e8 | |||
| 3dc82a814a |
@ -6,14 +6,14 @@
|
||||
|
||||
# Template project: https://gitlab.com/pages/jekyll
|
||||
# Docs: https://docs.gitlab.com/ee/pages/
|
||||
image: ruby:2.6
|
||||
image: ruby:2.7
|
||||
|
||||
variables:
|
||||
JEKYLL_ENV: production
|
||||
LC_ALL: C.UTF-8
|
||||
|
||||
before_script:
|
||||
- gem install bundler
|
||||
- gem install bundler -v 2.4.22
|
||||
- bundle install
|
||||
|
||||
pages:
|
||||
|
||||
16
Gemfile
16
Gemfile
@ -1,11 +1,13 @@
|
||||
source "https://rubygems.org"
|
||||
gem "jekyll", "~> 4.1.0"
|
||||
gem "jekyll", "~> 3.9.3"
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-gist"
|
||||
gem "jekyll-coffeescript"
|
||||
gem "jekyll-assets"
|
||||
gem "jekyll-sitemap"
|
||||
gem "jekyll-feed"
|
||||
gem "jekyll-gist", "~> 1.5.0"
|
||||
gem "jekyll-coffeescript", "~> 1.1.1"
|
||||
gem "jekyll-assets", "~> 1.0.0"
|
||||
gem "jekyll-sitemap", "~> 1.4.0"
|
||||
gem "jekyll-feed", "~> 0.15.1"
|
||||
gem "jekyll-theme-minimal"
|
||||
gem "jekyll-paginate"
|
||||
gem "jekyll-paginate", "~> 1.1.0"
|
||||
gem "kramdown-parser-gfm", "~> 1.1.0"
|
||||
gem "kramdown", "~> 2.3.2"
|
||||
end
|
||||
|
||||
@ -290,15 +290,15 @@ if(!norunFlag){
|
||||
url: talkAPI,
|
||||
data: {
|
||||
"info": info_,
|
||||
"userid":userid_
|
||||
"userId": userid_
|
||||
},
|
||||
success: function(res) {
|
||||
if(res.code !== 100000){
|
||||
if(res.intent.code !== 0){
|
||||
talkValTimer();
|
||||
showMessage('似乎有什么错误,请和站长联系!',0);
|
||||
}else{
|
||||
talkValTimer();
|
||||
showMessage(res.text,0);
|
||||
showMessage(res.results[0].values.text,0);
|
||||
}
|
||||
console.log(res);
|
||||
$('#AIuserText').val("");
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2,8 +2,7 @@
|
||||
layout: default
|
||||
---
|
||||
|
||||
<small>{{ page.date | date: "%-d %B %Y" }} - 字数统计:{% if page.layout == "encrypt" %}God Knows {% else %}{{ page.content | strip_html | strip_newlines | remove: " " | size }} - 阅读大约需要{{ page.content | strip_html | strip_newlines | remove: " " | size | divided_by: 350 | plus: 1 }}分钟{% endif %} - Hits: <span id="{{ page.url }}" class="visitors" >Loading...</span>
|
||||
</small>
|
||||
<small>{{ page.date | date: "%-d %B %Y" }} - 字数统计:{% if page.layout == "encrypt" %}God Knows {% else %}{{ page.content | strip_html | strip_newlines | remove: " " | size }} - 阅读大约需要{{ page.content | strip_html | strip_newlines | remove: "" | size | divided_by: 350 | plus: 1 }}分钟{% endif %} - Hits: <span id="{{ page.url }}" class="visitors">Loading...</span></small>
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
<p class="view">by <a href="//github.com/{{ page.author | default: "Mabbs" }}">{{ page.author | default: site.author }}</a></p>
|
||||
@ -26,6 +25,53 @@ if (daysold > 90) {
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
{% if page.layout != "encrypt" %}
|
||||
<!--[if !IE]> -->
|
||||
<b>AI摘要</b>
|
||||
<p id="ai-output">正在生成中……</p>
|
||||
<script>
|
||||
async function sha(str) {
|
||||
const encoder = new TextEncoder();
|
||||
const data = encoder.encode(str);
|
||||
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array
|
||||
const hashHex = hashArray
|
||||
.map((b) => b.toString(16).padStart(2, "0"))
|
||||
.join(""); // convert bytes to hex string
|
||||
return hashHex;
|
||||
}
|
||||
async function ai_gen(){
|
||||
var postContent = "文章标题:" + {{ page.title | jsonify }} + ";文章内容:" + {{ page.content | strip_html | strip_newlines | jsonify }};
|
||||
var postContentSign = await sha(postContent);
|
||||
var outputContainer = document.getElementById("ai-output");
|
||||
$.get("https://summary.mayx.eu.org/is_uploaded?id={{ page.url }}&sign=" + postContentSign, function (data) {
|
||||
if (data == "yes") {
|
||||
$.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign, function (data2) {
|
||||
outputContainer.textContent = data2;
|
||||
});
|
||||
} else {
|
||||
$.post("https://summary.mayx.eu.org/upload_blog?id={{ page.url }}", postContent, function (data) {
|
||||
$.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign);
|
||||
const evSource = new EventSource("https://summary.mayx.eu.org/summary?id={{ page.url }}");
|
||||
outputContainer.textContent = "";
|
||||
evSource.onmessage = (event) => {
|
||||
if (event.data == "[DONE]") {
|
||||
evSource.close();
|
||||
return;
|
||||
} else {
|
||||
const data = JSON.parse(event.data);
|
||||
outputContainer.textContent += data.response;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
ai_gen();
|
||||
</script>
|
||||
<hr />
|
||||
<!-- <![endif]-->
|
||||
{% endif %}
|
||||
|
||||
{% include toc.html html=content sanitize=true h_max=3 %}
|
||||
|
||||
@ -60,8 +106,7 @@ if (daysold > 90) {
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<script>
|
||||
if (window.location.host != "mabbs.github.io")
|
||||
{
|
||||
if (window.location.host != "mabbs.github.io") {
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '098934a2556425f19d6e',
|
||||
clientSecret: '0bd44eed8425e5437ce43c4ba9b2791fbc04581d',
|
||||
@ -72,8 +117,7 @@ var gitalk = new Gitalk({
|
||||
distractionFreeMode: false // Facebook-like distraction free mode
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '36557aec4c3cb04f7ac6',
|
||||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
33
_posts/2023-10-21-game.md
Normal file
33
_posts/2023-10-21-game.md
Normal file
File diff suppressed because one or more lines are too long
24
_posts/2023-12-10-openfyde.md
Normal file
24
_posts/2023-12-10-openfyde.md
Normal file
File diff suppressed because one or more lines are too long
24
_posts/2023-12-24-android.md
Normal file
24
_posts/2023-12-24-android.md
Normal file
File diff suppressed because one or more lines are too long
21
_posts/2024-01-01-summary.md
Normal file
21
_posts/2024-01-01-summary.md
Normal file
File diff suppressed because one or more lines are too long
25
_posts/2024-01-20-renpy.md
Normal file
25
_posts/2024-01-20-renpy.md
Normal file
File diff suppressed because one or more lines are too long
23
_posts/2024-02-03-1panel.md
Normal file
23
_posts/2024-02-03-1panel.md
Normal file
File diff suppressed because one or more lines are too long
24
_posts/2024-02-24-luckfox.md
Normal file
24
_posts/2024-02-24-luckfox.md
Normal file
File diff suppressed because one or more lines are too long
41
_posts/2024-03-16-ssl-pinning.md
Normal file
41
_posts/2024-03-16-ssl-pinning.md
Normal file
File diff suppressed because one or more lines are too long
213
_posts/2024-04-06-old-pc.md
Normal file
213
_posts/2024-04-06-old-pc.md
Normal file
File diff suppressed because one or more lines are too long
30
_posts/2024-05-19-bt-ops.md
Normal file
30
_posts/2024-05-19-bt-ops.md
Normal file
File diff suppressed because one or more lines are too long
27
_posts/2024-06-16-hackintosh.md
Normal file
27
_posts/2024-06-16-hackintosh.md
Normal file
File diff suppressed because one or more lines are too long
294
_posts/2024-07-03-ai-summary.md
Normal file
294
_posts/2024-07-03-ai-summary.md
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user