Hermes Agent 进阶教程:服务器安全防护3项必做
<div class="ce-block ce-block--focused" data-id="Cr98-2Jrw2" ><div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">甚至一些密码、密钥,如果不做一些基础的检查和设置,随时都有暴露的风险。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="tREXz4wvsw" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">本篇文章就会分为两个部分去教你,怎么把你的 Hermes Agent 打造成密不透风的安全屋,你只需要安心地使用下去即可。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="UaC7S9ykIe" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">第一部分:<b>服务器安全</b>,不管你的 Agent 是运行在本地,还是在远程服务器,都需要做一些最基本的防护,确保你的数据安全。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="R9M0cSakjR" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">第二部分:<b>数据备份</b>,天灾人祸是不可避免的,就算你的服务器是放在远程,也可能会导致一些意外,出现数据不可用的情况,所以你的一些特殊资料一定要做备份,这样出现意外的时候,可以随时恢复。</div>
</div>
</div><div class="ce-block" data-id="SZ8inJGaER" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">服务器安全设置</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="IsMdul3uje" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">在使用 Agent 的过程中,最可怕的不是你已经知道自己的机器或者服务器出现了问题,而是自己的机器已经出问题而不自知,所以做提前的防护就变得尤为重要。下面会以 Linux 服务器为例,教你怎么把你的服务器做安全加固。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="Ihvg317VnJ" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">不会复杂的命令也没有关系,只需要把下面的提示词丢给 AI 操作即可,但是一定一定要阅读完下面的注意事项才可以开始动手。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="lv2aWgCgqg" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">公网环境极其恶劣,默认的 22 端口和密码登录方式是黑客脚本攻击的重点对象。为了保障服务器不沦为肉鸡,必须进行以下三项配置:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="8cwbqUXvJS" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_8cwbqUXvJS" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225146uhslfs5qbq2z6jsf.png" title="" alt="" data-aid="139"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="Q5inhEXr01" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">1、</span><b>修改 SSH 默认端口</b><span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">:将默认的 22 端口修改为 20000–65535 之间的高位端口。这能规避 99% 的无差别自动化扫描。</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="zAatXEsKY1" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">txt</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-zAatXEsKY1">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-zAatXEsKY1">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-zAatXEsKY1" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-zAatXEsKY1">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463XATzh = document.getElementById('codeflask-zAatXEsKY1');
var isCollapsed1790134463XATzh = true;
const flask1790134463XATzh = new CodeFlask(editorElem1790134463XATzh, {
language: 'txt',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463XATzh = `请检查当前 Linux 系统和 SSH 配置,备份配置文件后,从 20000–65535 中选择一个未占用的端口并修改 SSH 配置。先放行新端口并暂时保留 22 端口,执行配置检查后重新加载 SSH,确认新端口正在监听。最后给出新端口的登录测试命令和回滚方法;遇到错误立即停止。`;
code1790134463XATzh = code1790134463XATzh.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463XATzh.addLanguage('txt', Prism.languages['txt']);
flask1790134463XATzh.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463XATzh.updateCode(code1790134463XATzh);
const currentCode1790134463XATzh = flask1790134463XATzh.getCode();
var coderow1790134463XATzh = parseInt('');
if (coderow1790134463XATzh === undefined || coderow1790134463XATzh !== coderow1790134463XATzh || coderow1790134463XATzh === 0) {
coderow1790134463XATzh = flask1790134463XATzh.lineNumber;
}
if (coderow1790134463XATzh < 20) {
editorElem1790134463XATzh.parentElement.style.height = '300px';
editorElem1790134463XATzh.style.height = '300px';
} else if (coderow1790134463XATzh >= 20) {
editorElem1790134463XATzh.parentElement.style.height = '500px';
editorElem1790134463XATzh.style.height = '500px';
}
//console.log({currentCode1790134463XATzh})
const copyBtn1790134463XATzh = document.getElementById('codeflask-copy-zAatXEsKY1');
copyBtn1790134463XATzh.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463XATzh).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463XATzh.innerHTML;
copyBtn1790134463XATzh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463XATzh.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463XATzh);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463XATzh);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463XATzh.innerHTML;
copyBtn1790134463XATzh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463XATzh.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463XATzh = document.getElementById('codeflask-bottomBtn-zAatXEsKY1');
const Toggle1790134463XATzh = document.getElementById('codeflask-Toggle-zAatXEsKY1');
bottomBtn1790134463XATzh.addEventListener('click', function() {
if (isCollapsed1790134463XATzh) {
// 展开代码
isCollapsed1790134463XATzh = false;
const codeElement1790134463XATzh = editorElem1790134463XATzh.querySelector('.codeflask__code');
if (codeElement1790134463XATzh) {
const actualHeight1790134463XATzh = codeElement1790134463XATzh.scrollHeight + 20;
editorElem1790134463XATzh.parentElement.style.height = actualHeight1790134463XATzh + 'px';
editorElem1790134463XATzh.style.height = actualHeight1790134463XATzh + 'px';
}
bottomBtn1790134463XATzh.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463XATzh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463XATzh = true;
if (coderow1790134463XATzh < 20) {
editorElem1790134463XATzh.parentElement.style.height = '300px';
editorElem1790134463XATzh.style.height = '300px';
} else if (coderow1790134463XATzh >= 20) {
editorElem1790134463XATzh.parentElement.style.height = '500px';
editorElem1790134463XATzh.style.height = '500px';
}
bottomBtn1790134463XATzh.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463XATzh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463XATzh.addEventListener('click', function() {
bottomBtn1790134463XATzh.click();
});
</script><div class="ce-block ce-block--focused" data-id="cbNj_HtcOO" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">2、</span><b>禁用密码登录</b><span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">:配置 SSH 密钥对,仅允许持有私钥的客户端登录,并彻底关闭密码验证功能。这样设置基本可以安全很多,因为密码泄露是很大的风险,密钥登录基本上杜绝了撞库或者其他方式的扫描。</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="MNxZOx0nJV" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">txt</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-MNxZOx0nJV">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-MNxZOx0nJV">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-MNxZOx0nJV" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-MNxZOx0nJV">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463Vs13I = document.getElementById('codeflask-MNxZOx0nJV');
var isCollapsed1790134463Vs13I = true;
const flask1790134463Vs13I = new CodeFlask(editorElem1790134463Vs13I, {
language: 'txt',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463Vs13I = `请检查当前用户的 SSH 公钥和 authorized_keys 权限。如果没有公钥,指导我在本地生成 Ed25519 密钥,我只会提供公钥,绝不提供私钥。备份 SSH 配置,启用密钥认证;等我在另一个终端确认密钥登录成功后,再关闭密码和交互式认证。修改后检查配置、重新加载服务,并给出验证结果和回滚方法。`;
code1790134463Vs13I = code1790134463Vs13I.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463Vs13I.addLanguage('txt', Prism.languages['txt']);
flask1790134463Vs13I.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463Vs13I.updateCode(code1790134463Vs13I);
const currentCode1790134463Vs13I = flask1790134463Vs13I.getCode();
var coderow1790134463Vs13I = parseInt('');
if (coderow1790134463Vs13I === undefined || coderow1790134463Vs13I !== coderow1790134463Vs13I || coderow1790134463Vs13I === 0) {
coderow1790134463Vs13I = flask1790134463Vs13I.lineNumber;
}
if (coderow1790134463Vs13I < 20) {
editorElem1790134463Vs13I.parentElement.style.height = '300px';
editorElem1790134463Vs13I.style.height = '300px';
} else if (coderow1790134463Vs13I >= 20) {
editorElem1790134463Vs13I.parentElement.style.height = '500px';
editorElem1790134463Vs13I.style.height = '500px';
}
//console.log({currentCode1790134463Vs13I})
const copyBtn1790134463Vs13I = document.getElementById('codeflask-copy-MNxZOx0nJV');
copyBtn1790134463Vs13I.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463Vs13I).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463Vs13I.innerHTML;
copyBtn1790134463Vs13I.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463Vs13I.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463Vs13I);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463Vs13I);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463Vs13I.innerHTML;
copyBtn1790134463Vs13I.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463Vs13I.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463Vs13I = document.getElementById('codeflask-bottomBtn-MNxZOx0nJV');
const Toggle1790134463Vs13I = document.getElementById('codeflask-Toggle-MNxZOx0nJV');
bottomBtn1790134463Vs13I.addEventListener('click', function() {
if (isCollapsed1790134463Vs13I) {
// 展开代码
isCollapsed1790134463Vs13I = false;
const codeElement1790134463Vs13I = editorElem1790134463Vs13I.querySelector('.codeflask__code');
if (codeElement1790134463Vs13I) {
const actualHeight1790134463Vs13I = codeElement1790134463Vs13I.scrollHeight + 20;
editorElem1790134463Vs13I.parentElement.style.height = actualHeight1790134463Vs13I + 'px';
editorElem1790134463Vs13I.style.height = actualHeight1790134463Vs13I + 'px';
}
bottomBtn1790134463Vs13I.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463Vs13I.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463Vs13I = true;
if (coderow1790134463Vs13I < 20) {
editorElem1790134463Vs13I.parentElement.style.height = '300px';
editorElem1790134463Vs13I.style.height = '300px';
} else if (coderow1790134463Vs13I >= 20) {
editorElem1790134463Vs13I.parentElement.style.height = '500px';
editorElem1790134463Vs13I.style.height = '500px';
}
bottomBtn1790134463Vs13I.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463Vs13I.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463Vs13I.addEventListener('click', function() {
bottomBtn1790134463Vs13I.click();
});
</script><div class="ce-block ce-block--focused" data-id="RElsZwhByu" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">3、</span><b>配置防火墙与 Fail2Ban</b><span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;"><b>:</b>启用 UFW 防火墙并放行新端口;启用 Fail2Ban 监控 SSH 日志,自动封禁多次试错的恶意 IP。</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="B_sy2bHt_Q" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">txt</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-B_sy2bHt_Q">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-B_sy2bHt_Q">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-B_sy2bHt_Q" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-B_sy2bHt_Q">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463c7gts = document.getElementById('codeflask-B_sy2bHt_Q');
var isCollapsed1790134463c7gts = true;
const flask1790134463c7gts = new CodeFlask(editorElem1790134463c7gts, {
language: 'txt',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463c7gts = `请检查服务器当前的防火墙、SSH 端口和正在使用的业务端口。备份现有规则,先放行新的 SSH 端口和必要业务端口,再启用 UFW,设置为默认拒绝入站、允许出站。随后安装并配置 Fail2Ban 保护新的 SSH 端口,使用 maxretry=5、findtime=10m、bantime=1h,并检查防火墙、Fail2Ban 和 SSH 是否正常。不要覆盖现有规则,最后给出配置结果和回滚方法。`;
code1790134463c7gts = code1790134463c7gts.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463c7gts.addLanguage('txt', Prism.languages['txt']);
flask1790134463c7gts.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463c7gts.updateCode(code1790134463c7gts);
const currentCode1790134463c7gts = flask1790134463c7gts.getCode();
var coderow1790134463c7gts = parseInt('');
if (coderow1790134463c7gts === undefined || coderow1790134463c7gts !== coderow1790134463c7gts || coderow1790134463c7gts === 0) {
coderow1790134463c7gts = flask1790134463c7gts.lineNumber;
}
if (coderow1790134463c7gts < 20) {
editorElem1790134463c7gts.parentElement.style.height = '300px';
editorElem1790134463c7gts.style.height = '300px';
} else if (coderow1790134463c7gts >= 20) {
editorElem1790134463c7gts.parentElement.style.height = '500px';
editorElem1790134463c7gts.style.height = '500px';
}
//console.log({currentCode1790134463c7gts})
const copyBtn1790134463c7gts = document.getElementById('codeflask-copy-B_sy2bHt_Q');
copyBtn1790134463c7gts.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463c7gts).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463c7gts.innerHTML;
copyBtn1790134463c7gts.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463c7gts.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463c7gts);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463c7gts);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463c7gts.innerHTML;
copyBtn1790134463c7gts.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463c7gts.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463c7gts = document.getElementById('codeflask-bottomBtn-B_sy2bHt_Q');
const Toggle1790134463c7gts = document.getElementById('codeflask-Toggle-B_sy2bHt_Q');
bottomBtn1790134463c7gts.addEventListener('click', function() {
if (isCollapsed1790134463c7gts) {
// 展开代码
isCollapsed1790134463c7gts = false;
const codeElement1790134463c7gts = editorElem1790134463c7gts.querySelector('.codeflask__code');
if (codeElement1790134463c7gts) {
const actualHeight1790134463c7gts = codeElement1790134463c7gts.scrollHeight + 20;
editorElem1790134463c7gts.parentElement.style.height = actualHeight1790134463c7gts + 'px';
editorElem1790134463c7gts.style.height = actualHeight1790134463c7gts + 'px';
}
bottomBtn1790134463c7gts.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463c7gts.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463c7gts = true;
if (coderow1790134463c7gts < 20) {
editorElem1790134463c7gts.parentElement.style.height = '300px';
editorElem1790134463c7gts.style.height = '300px';
} else if (coderow1790134463c7gts >= 20) {
editorElem1790134463c7gts.parentElement.style.height = '500px';
editorElem1790134463c7gts.style.height = '500px';
}
bottomBtn1790134463c7gts.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463c7gts.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463c7gts.addEventListener('click', function() {
bottomBtn1790134463c7gts.click();
});
</script><div class="ce-block ce-block--focused" data-id="SUx3LaCxjY" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none; background-color: rgb(249, 249, 249);">操作时不要关闭当前 SSH 窗口,应在另一个终端确认新端口和密钥可以正常登录。云服务器还需要在安全组中放行新端口。新登录方式验证成功前不要关闭 22 端口或密码登录,也不要把私钥发送给 AI。执行前建议先创建服务器快照或确保可以通过云厂商的控制台救援模式恢复。</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="bOSrZtKjIp" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none; background-color: rgb(249, 249, 249);">如果感兴趣,想自己动手设置,可以看这篇文章:</span><a href="https://legacyvps.com/archives/vps-initial-setup-guide-benchmark-dd-security-optimization" rel="noopener nofollow ugc">从零到一:我的 VPS 标准化开荒 SOP,五步打造稳定、安全、高性能的服务器</a></div>
</div>
</div><div class="ce-block" data-id="gghobJB2s4" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">数据备份</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="OZN6T34gxx" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">数据备份的方式有很多,但是我觉得最安全、最高效的还是 GitHub 仓库的形式,它有以下优点:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="sAERwWv4PB" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">1、只需要一个简单的邮箱就可以注册账号,提供了账号和 API Key 授权方式,可以非常方便地管理仓库和内容。尤其是官方工具<span> </span><code>gh</code>,提供了完善的接口,可以由 AI 自主完成。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="95l2tAr0G-" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">2、使用 GitHub 基本上是 AI 的必备技能之一,上面有非常多开源的优秀工具和项目,不管是学习,还是找到一些你能用的软件,都是不二之选。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="jIqVunoFry" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <code>gh</code><span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none; background-color: rgb(249, 249, 249);"> 安装命令:</span><code><code class="inline-code">sudo apt install gh</code></code></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="24QQ7nsk9e" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_24QQ7nsk9e" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225409qyhlipp8smslnlyh.png" title="" alt="" data-aid="140"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block" data-id="iZF-JrTDRl" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">登录账户</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="4Z5nXh2DhF" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">官方提供了两种方式,可以登录账号。第一种是直接使用账户名和密码。第二种是创建一个 API Key,两种方式各有优劣。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="GBe1TXFd42" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">第一种方式相对简单,只需要提供账户名密码即可,但是权限过大可能会造成项目之间的影响和污染,如果你只有一个项目的话,也就不影响,但是如果你有多个账户,就不推荐这种方式。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="2vrrAKdY30" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">txt</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-2vrrAKdY30">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-2vrrAKdY30">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-2vrrAKdY30" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-2vrrAKdY30">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463ax3kM = document.getElementById('codeflask-2vrrAKdY30');
var isCollapsed1790134463ax3kM = true;
const flask1790134463ax3kM = new CodeFlask(editorElem1790134463ax3kM, {
language: 'txt',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463ax3kM = `登录命令:gh auth login,然后选择 GitHub,再选择 HTTPS 浏览器方式授权即可。到时候会出现一个 URL 和 Code,只需要在已登录 GitHub 的账号中输入对应的 Code 即可。`;
code1790134463ax3kM = code1790134463ax3kM.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463ax3kM.addLanguage('txt', Prism.languages['txt']);
flask1790134463ax3kM.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463ax3kM.updateCode(code1790134463ax3kM);
const currentCode1790134463ax3kM = flask1790134463ax3kM.getCode();
var coderow1790134463ax3kM = parseInt('');
if (coderow1790134463ax3kM === undefined || coderow1790134463ax3kM !== coderow1790134463ax3kM || coderow1790134463ax3kM === 0) {
coderow1790134463ax3kM = flask1790134463ax3kM.lineNumber;
}
if (coderow1790134463ax3kM < 20) {
editorElem1790134463ax3kM.parentElement.style.height = '300px';
editorElem1790134463ax3kM.style.height = '300px';
} else if (coderow1790134463ax3kM >= 20) {
editorElem1790134463ax3kM.parentElement.style.height = '500px';
editorElem1790134463ax3kM.style.height = '500px';
}
//console.log({currentCode1790134463ax3kM})
const copyBtn1790134463ax3kM = document.getElementById('codeflask-copy-2vrrAKdY30');
copyBtn1790134463ax3kM.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463ax3kM).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463ax3kM.innerHTML;
copyBtn1790134463ax3kM.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463ax3kM.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463ax3kM);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463ax3kM);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463ax3kM.innerHTML;
copyBtn1790134463ax3kM.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463ax3kM.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463ax3kM = document.getElementById('codeflask-bottomBtn-2vrrAKdY30');
const Toggle1790134463ax3kM = document.getElementById('codeflask-Toggle-2vrrAKdY30');
bottomBtn1790134463ax3kM.addEventListener('click', function() {
if (isCollapsed1790134463ax3kM) {
// 展开代码
isCollapsed1790134463ax3kM = false;
const codeElement1790134463ax3kM = editorElem1790134463ax3kM.querySelector('.codeflask__code');
if (codeElement1790134463ax3kM) {
const actualHeight1790134463ax3kM = codeElement1790134463ax3kM.scrollHeight + 20;
editorElem1790134463ax3kM.parentElement.style.height = actualHeight1790134463ax3kM + 'px';
editorElem1790134463ax3kM.style.height = actualHeight1790134463ax3kM + 'px';
}
bottomBtn1790134463ax3kM.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463ax3kM.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463ax3kM = true;
if (coderow1790134463ax3kM < 20) {
editorElem1790134463ax3kM.parentElement.style.height = '300px';
editorElem1790134463ax3kM.style.height = '300px';
} else if (coderow1790134463ax3kM >= 20) {
editorElem1790134463ax3kM.parentElement.style.height = '500px';
editorElem1790134463ax3kM.style.height = '500px';
}
bottomBtn1790134463ax3kM.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463ax3kM.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463ax3kM.addEventListener('click', function() {
bottomBtn1790134463ax3kM.click();
});
</script><div class="ce-block ce-block--focused" data-id="Zhwp1cpw0y" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_Zhwp1cpw0y" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225436dnl236vlo4uu4643.png" title="" alt="" data-aid="141"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="yei3m1_ovp" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">第二种方式相对于第一种复杂一点,需要去账号后台申请对应权限的 API Key,可以设置这个 Key 的权限范围和项目范围,它只能做哪些事情、不能做哪些事情,这样就可以做到很细的颗粒度。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="Dzgoftnyj7" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">1、登录 GitHub,选择设置菜单</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="OeYSKdqKZs" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_OeYSKdqKZs" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225452lmfxz0yxxfd0kl0x.png" title="" alt="" data-aid="142"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="xfhaK2MOEN" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">2、选择 Developer settings</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="Cucik894GF" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_Cucik894GF" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225505lvfuk9qgogbesgnx.png" title="" alt="" data-aid="143"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="e-ZkQWhvN5" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none;">3、创建 API Key(选择 Personal access tokens → Fine-grained tokens)</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="9K5XIl2xe8" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_9K5XIl2xe8" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225519n6q2i82zuq1oei1u.png" title="" alt="" data-aid="144"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="UyXBV41IlP" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"> <span style="color: rgb(34, 34, 34); font-family: Inter, Arial, sans-serif; font-variant-ligatures: none; background-color: rgb(249, 249, 249);">这里可以控制对应的权限和有效期。如果不了解的话,默认使用第一种方式获取授权。但是如果大家感兴趣的话,我可以专门出一期讲解 GitHub 仓库权限的文章。</span></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="1nWgOxyTBS" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_1nWgOxyTBS" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/225536skkk9j80m6igkm7z.png" title="" alt="" data-aid="145"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block" data-id="yeM9L1ewHo" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">自动化备份</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="xl-yHlywfi" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">前面的都准备好之后,我们就可以用一句话让我们的 Hermes Agent 完成自动备份定时任务。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="mOZ-ZkB4Ag" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">但是在此之前,我们需要划分好哪些文件夹是需要备份的,哪些文件夹是不需要备份的。不然把所有的内容放上去,不仅备份效率低,而且单个 GitHub 仓库是有容量上限的,所以这里我们一定要做一个简单的划分。</div>
</div>
</div><div class="ce-block" data-id="e9f2UjCNMl" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">需要备份的内容</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="jjJNq0oSjo" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">需要备份的东西,简单理解为一句话:<b>你手工维护的资产</b>,唯一且不可重复产生的内容,这里我已经帮你整理好。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="sTftTzhrGb" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-sTftTzhrGb">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-sTftTzhrGb">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-sTftTzhrGb" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-sTftTzhrGb">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463PW50Y = document.getElementById('codeflask-sTftTzhrGb');
var isCollapsed1790134463PW50Y = true;
const flask1790134463PW50Y = new CodeFlask(editorElem1790134463PW50Y, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463PW50Y = `SOUL.md AI 的性格属性
config.yaml 基础的配置项
skills/ 你自己的技能库
scripts/ 自定义的脚本
wiki / 观点库 观点沉淀(不是每个人都有)
cron/jobs.json(任务定义) 自动化任务`;
code1790134463PW50Y = code1790134463PW50Y.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463PW50Y.addLanguage('shell', Prism.languages['shell']);
flask1790134463PW50Y.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463PW50Y.updateCode(code1790134463PW50Y);
const currentCode1790134463PW50Y = flask1790134463PW50Y.getCode();
var coderow1790134463PW50Y = parseInt('');
if (coderow1790134463PW50Y === undefined || coderow1790134463PW50Y !== coderow1790134463PW50Y || coderow1790134463PW50Y === 0) {
coderow1790134463PW50Y = flask1790134463PW50Y.lineNumber;
}
if (coderow1790134463PW50Y < 20) {
editorElem1790134463PW50Y.parentElement.style.height = '300px';
editorElem1790134463PW50Y.style.height = '300px';
} else if (coderow1790134463PW50Y >= 20) {
editorElem1790134463PW50Y.parentElement.style.height = '500px';
editorElem1790134463PW50Y.style.height = '500px';
}
//console.log({currentCode1790134463PW50Y})
const copyBtn1790134463PW50Y = document.getElementById('codeflask-copy-sTftTzhrGb');
copyBtn1790134463PW50Y.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463PW50Y).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463PW50Y.innerHTML;
copyBtn1790134463PW50Y.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463PW50Y.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463PW50Y);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463PW50Y);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463PW50Y.innerHTML;
copyBtn1790134463PW50Y.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463PW50Y.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463PW50Y = document.getElementById('codeflask-bottomBtn-sTftTzhrGb');
const Toggle1790134463PW50Y = document.getElementById('codeflask-Toggle-sTftTzhrGb');
bottomBtn1790134463PW50Y.addEventListener('click', function() {
if (isCollapsed1790134463PW50Y) {
// 展开代码
isCollapsed1790134463PW50Y = false;
const codeElement1790134463PW50Y = editorElem1790134463PW50Y.querySelector('.codeflask__code');
if (codeElement1790134463PW50Y) {
const actualHeight1790134463PW50Y = codeElement1790134463PW50Y.scrollHeight + 20;
editorElem1790134463PW50Y.parentElement.style.height = actualHeight1790134463PW50Y + 'px';
editorElem1790134463PW50Y.style.height = actualHeight1790134463PW50Y + 'px';
}
bottomBtn1790134463PW50Y.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463PW50Y.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463PW50Y = true;
if (coderow1790134463PW50Y < 20) {
editorElem1790134463PW50Y.parentElement.style.height = '300px';
editorElem1790134463PW50Y.style.height = '300px';
} else if (coderow1790134463PW50Y >= 20) {
editorElem1790134463PW50Y.parentElement.style.height = '500px';
editorElem1790134463PW50Y.style.height = '500px';
}
bottomBtn1790134463PW50Y.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463PW50Y.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463PW50Y.addEventListener('click', function() {
bottomBtn1790134463PW50Y.click();
});
</script><div class="ce-block ce-block--focused" data-id="S59x7QM2hF" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">我列出来的每一项都是独一无二的,每个人的 Hermes Agent 中,这几个文件夹都可能不一样。如果有一个丢失了,基本上没有办法还原,除非你花时间把你前面做过的内容重新再做一遍,所以这部分是一定要做备份的。</div>
</div>
</div><div class="ce-block" data-id="1npdYKjB4F" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">不需要备份的内容</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="L7l4X6v3dH" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">不需要备份的内容,简单一句话:<b>不备份“运行时自动生成的东西”</b>。它们可能是系统自带的,或者是运行中产生的过渡文件,不影响你整体使用,就算删除了也没有多大关系。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="XTVlLS6TH3" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-XTVlLS6TH3">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-XTVlLS6TH3">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-XTVlLS6TH3" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-XTVlLS6TH3">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463YX94S = document.getElementById('codeflask-XTVlLS6TH3');
var isCollapsed1790134463YX94S = true;
const flask1790134463YX94S = new CodeFlask(editorElem1790134463YX94S, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463YX94S = `.env 环境配置,保存了你的密钥,这部分基于保密不推荐备份。
auth.json 授权信息
sessions/ 所有的聊天内容和信息,如果想回溯信息,也可以做备份。
logs/ 运行过程中产生的日志
cache/ 缓存内容
executions.db / ticker / lock
node / lsp / 依赖安装产物`;
code1790134463YX94S = code1790134463YX94S.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463YX94S.addLanguage('shell', Prism.languages['shell']);
flask1790134463YX94S.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463YX94S.updateCode(code1790134463YX94S);
const currentCode1790134463YX94S = flask1790134463YX94S.getCode();
var coderow1790134463YX94S = parseInt('');
if (coderow1790134463YX94S === undefined || coderow1790134463YX94S !== coderow1790134463YX94S || coderow1790134463YX94S === 0) {
coderow1790134463YX94S = flask1790134463YX94S.lineNumber;
}
if (coderow1790134463YX94S < 20) {
editorElem1790134463YX94S.parentElement.style.height = '300px';
editorElem1790134463YX94S.style.height = '300px';
} else if (coderow1790134463YX94S >= 20) {
editorElem1790134463YX94S.parentElement.style.height = '500px';
editorElem1790134463YX94S.style.height = '500px';
}
//console.log({currentCode1790134463YX94S})
const copyBtn1790134463YX94S = document.getElementById('codeflask-copy-XTVlLS6TH3');
copyBtn1790134463YX94S.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463YX94S).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463YX94S.innerHTML;
copyBtn1790134463YX94S.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463YX94S.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463YX94S);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463YX94S);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463YX94S.innerHTML;
copyBtn1790134463YX94S.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463YX94S.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463YX94S = document.getElementById('codeflask-bottomBtn-XTVlLS6TH3');
const Toggle1790134463YX94S = document.getElementById('codeflask-Toggle-XTVlLS6TH3');
bottomBtn1790134463YX94S.addEventListener('click', function() {
if (isCollapsed1790134463YX94S) {
// 展开代码
isCollapsed1790134463YX94S = false;
const codeElement1790134463YX94S = editorElem1790134463YX94S.querySelector('.codeflask__code');
if (codeElement1790134463YX94S) {
const actualHeight1790134463YX94S = codeElement1790134463YX94S.scrollHeight + 20;
editorElem1790134463YX94S.parentElement.style.height = actualHeight1790134463YX94S + 'px';
editorElem1790134463YX94S.style.height = actualHeight1790134463YX94S + 'px';
}
bottomBtn1790134463YX94S.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463YX94S.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463YX94S = true;
if (coderow1790134463YX94S < 20) {
editorElem1790134463YX94S.parentElement.style.height = '300px';
editorElem1790134463YX94S.style.height = '300px';
} else if (coderow1790134463YX94S >= 20) {
editorElem1790134463YX94S.parentElement.style.height = '500px';
editorElem1790134463YX94S.style.height = '500px';
}
bottomBtn1790134463YX94S.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463YX94S.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463YX94S.addEventListener('click', function() {
bottomBtn1790134463YX94S.click();
});
</script><div class="ce-block" data-id="qxBbZGdeyG" >
<div class="ce-block__content" style="">
<h3 class="ce-header ce-header--left">设置备份自动化任务</h3>
</div>
</div><div class="ce-block ce-block--focused" data-id="E6OqQWkbfb" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">区分好了,对应备份的内容就很简单了,我们只需要告诉我们的 Hermes Agent,帮我们设置一条定时任务,每天凌晨三点自动运行一次。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="IhnAV-PqX7" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">可以直接使用我下面的提示词,让 AI 帮你自动设置:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="2d4KKTD5kW" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">txt</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-2d4KKTD5kW">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-2d4KKTD5kW">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-2d4KKTD5kW" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-2d4KKTD5kW">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134463Li2Fp = document.getElementById('codeflask-2d4KKTD5kW');
var isCollapsed1790134463Li2Fp = true;
const flask1790134463Li2Fp = new CodeFlask(editorElem1790134463Li2Fp, {
language: 'txt',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134463Li2Fp = `每天对 Hermes 做一次轻量配置备份,只保留可重建能力,不备份运行时垃圾和敏感凭据。
备份范围:
1. 主 profile 的 SOUL.md 和 config.yaml
2. research / publish / shortvideo-pipeline 的 SOUL.md 和 config.yaml(如果存在)
3. ~/.hermes/skills/
4. ~/.hermes/scripts/
5. /root/hermes-wiki
6. ~/.hermes/vault/opinions/(如果存在)
7. 各 profile 的 cron/jobs.json(任务定义;如果存在)
不要备份:
- .env
- auth.json
- sessions/
- state.db
- logs/
- cache/
- executions.db
- ticker / lock 文件
- node / lsp / 安装产物
执行要求:
- 目标仓库:/root/hermes-backup
- 用同步方式覆盖旧内容,源不存在就删除目标对应文件
- git add -A
- 只有有变更时才 commit 和 push
- commit message: auto backup YYYY-MM-DD_HH:MM
- 失败时输出明确错误,不要静默吞掉`;
code1790134463Li2Fp = code1790134463Li2Fp.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134463Li2Fp.addLanguage('txt', Prism.languages['txt']);
flask1790134463Li2Fp.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134463Li2Fp.updateCode(code1790134463Li2Fp);
const currentCode1790134463Li2Fp = flask1790134463Li2Fp.getCode();
var coderow1790134463Li2Fp = parseInt('');
if (coderow1790134463Li2Fp === undefined || coderow1790134463Li2Fp !== coderow1790134463Li2Fp || coderow1790134463Li2Fp === 0) {
coderow1790134463Li2Fp = flask1790134463Li2Fp.lineNumber;
}
if (coderow1790134463Li2Fp < 20) {
editorElem1790134463Li2Fp.parentElement.style.height = '300px';
editorElem1790134463Li2Fp.style.height = '300px';
} else if (coderow1790134463Li2Fp >= 20) {
editorElem1790134463Li2Fp.parentElement.style.height = '500px';
editorElem1790134463Li2Fp.style.height = '500px';
}
//console.log({currentCode1790134463Li2Fp})
const copyBtn1790134463Li2Fp = document.getElementById('codeflask-copy-2d4KKTD5kW');
copyBtn1790134463Li2Fp.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134463Li2Fp).then(function() {
// 复制成功提示
const originalText = copyBtn1790134463Li2Fp.innerHTML;
copyBtn1790134463Li2Fp.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134463Li2Fp.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134463Li2Fp);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134463Li2Fp);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134463Li2Fp.innerHTML;
copyBtn1790134463Li2Fp.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134463Li2Fp.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134463Li2Fp = document.getElementById('codeflask-bottomBtn-2d4KKTD5kW');
const Toggle1790134463Li2Fp = document.getElementById('codeflask-Toggle-2d4KKTD5kW');
bottomBtn1790134463Li2Fp.addEventListener('click', function() {
if (isCollapsed1790134463Li2Fp) {
// 展开代码
isCollapsed1790134463Li2Fp = false;
const codeElement1790134463Li2Fp = editorElem1790134463Li2Fp.querySelector('.codeflask__code');
if (codeElement1790134463Li2Fp) {
const actualHeight1790134463Li2Fp = codeElement1790134463Li2Fp.scrollHeight + 20;
editorElem1790134463Li2Fp.parentElement.style.height = actualHeight1790134463Li2Fp + 'px';
editorElem1790134463Li2Fp.style.height = actualHeight1790134463Li2Fp + 'px';
}
bottomBtn1790134463Li2Fp.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134463Li2Fp.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134463Li2Fp = true;
if (coderow1790134463Li2Fp < 20) {
editorElem1790134463Li2Fp.parentElement.style.height = '300px';
editorElem1790134463Li2Fp.style.height = '300px';
} else if (coderow1790134463Li2Fp >= 20) {
editorElem1790134463Li2Fp.parentElement.style.height = '500px';
editorElem1790134463Li2Fp.style.height = '500px';
}
bottomBtn1790134463Li2Fp.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134463Li2Fp.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134463Li2Fp.addEventListener('click', function() {
bottomBtn1790134463Li2Fp.click();
});
</script><div class="ce-block ce-block--focused" data-id="PIFfAILGWF" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">配置好之后,我们隔天一定要去 GitHub 仓库查看是否备份成功,这也是为什么我在最后一句加了失败的时候要输出明确的错误,不要默认吞掉。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="wE_3H96n5u" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">就是因为有一次在设置好定时任务的时候,其实它没有执行成功,但是没有输出任何报错,导致我以为我的备份任务是一直成功的。所以踩过这个坑,我就不希望大家再踩一遍。</div>
</div>
</div><div class="ce-block" data-id="88K5zg3og_" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">写在最后</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="SMJpnS8hjr" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">做好基本的安全防护和定时任务备份,你就可以安心地去使用你的 Hermes Agent,基本上不需要担心信息泄露和数据丢失的风险。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="LoHa3ta2iZ" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">只有经历过数据丢失或者服务器被黑的人,才知道我说的这两点的重要性。不要等你真正出现了问题,再去找补救的方法。我们一定要未雨绸缪,做什么事情都要准备后手。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="akksZ1lDBr" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">希望大家能学到真正的东西,想学习更多 Hermes Agent 对应的内容,可以看我的教程。</div>
</div>
</div><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.ce-paragraph {
line-height: 1.6em;
outline: none;
text-indent: 2em;
font-size: 16px;
}
.ce-paragraph--right {
text-align: right;
}
.ce-paragraph--center {
text-align: center;
}
.ce-paragraph--left {
text-align: left;
}
.ce-paragraph--justify {
text-align: justify;
}
.ce-paragraph-text-indent {
text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}
/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}
.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}
.ce-paragraph p:first-of-type{
margin-top: 0;
}
.ce-paragraph p:last-of-type{
margin-bottom: 0;
}
.svg-icon {
width: 1em;
height: 1em;
}
.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
fill: #4691f6;
}
.svg-icon circle {
stroke: #4691f6;
stroke-width: 1;
}
</style><style type="text/css">
.ce-block {
margin-top: 20px;
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
/**
* Plugin styles
*/
.ce-header {
position: relative;
padding: 1px 0px 1px 15px;
margin: 0;
line-height: 1.25em;
outline: none;
margin-bottom: 10px;
}
.ce-header p,
.ce-header div {
padding: 0 !important;
margin: 0 !important;
}
.ce-header::before {
content: "";
background-color: #3e8fe3;
width: 6px;
height: 100%;
position: absolute;
left: 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
/**
* Styles for Plugin icon in Toolbar
*/
.ce-header__icon {
}
.ce-header::before {
position: absolute;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
cursor: text;
}
.ce-header:empty::before {
display: block;
}
.ce-header:empty:focus::before {
display: none;
}
/* FontSize */
h1.ce-header {
font-size: 2.0em;
}
h2.ce-header {
font-size: 1.7em;
}
h3.ce-header {
font-size: 1.4em;
}
h4.ce-header {
font-size: 1.15em;
}
h5.ce-header {
font-size: 0.95em;
}
h6.ce-header {
font-size: 0.8em;
}
/* Alignment*/
.ce-header--right {
text-align: right;
}
.ce-header--center {
text-align: center;
}
.ce-header--left {
text-align: left;
}
.ce-header--justify {
text-align: justify;
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.image-tool {
--bg-color: #cdd1e0;
--front-color: #388ae5;
--border-color: #e8e8eb;
}
.image-tool__image {
border-radius: 3px;
overflow: hidden;
margin-bottom: 10px;
}
.image-tool__image-picture {
max-width: 100%;
vertical-align: bottom;
display: block;
margin-left: auto;
margin-right: auto;
}
.image-tool__image-preloader {
width: 50px;
height: 50px;
border-radius: 50%;
background-size: cover;
margin: auto;
position: relative;
background-color: #cdd1e0;
background-position: center center;
}
.image-tool__image-preloader::after {
content: "";
position: absolute;
z-index: 3;
width: 60px;
height: 60px;
border-radius: 50%;
border: 2px solid #cdd1e0;
border-top-color: #388ae5;
left: 50%;
top: 50%;
margin-top: -30px;
margin-left: -30px;
animation: image-preloader-spin 2s infinite linear;
box-sizing: border-box;
}
.image-tool__caption::before {
position: absolute !important;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
}
.image-tool__caption:empty::before {
display: block;
}
.image-tool__caption:empty:focus::before {
display: none;
}
.image-tool--empty .image-tool__image {
display: none;
}
.image-tool--empty .image-tool__caption, .image-tool--loading .image-tool__caption {
display: none;
}
.image-tool .cdx-button {
display: flex;
align-items: center;
justify-content: center;
}
.image-tool .cdx-button svg {
height: auto;
margin: 0 6px 0 0;
}
.image-tool--filled .cdx-button {
display: none;
}
.image-tool--filled .image-tool__image-preloader {
display: none;
}
.image-tool--loading .image-tool__image {
min-height: 200px;
display: flex;
border: 1px solid #e8e8eb;
background-color: #fff;
}
.image-tool--loading .image-tool__image-picture {
display: none;
}
.image-tool--loading .cdx-button {
display: none;
}
/**
* Tunes
* ----------------
*/
.image-tool--withBorder .image-tool__image {
border: 1px solid #e8e8eb;
}
.image-tool--withBackground .image-tool__image {
padding: 15px;
background: #cdd1e0;
}
.image-tool--withBackground .image-tool__image-picture {
max-width: 60%;
margin: 0 auto;
}
.image-tool--stretched .image-tool__image-picture {
width: 100%;
}
.image-tool__caption {
text-align: center;
font-size: 14px;
color: #a3a3a3;
}
@keyframes image-preloader-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
position: relative;
}
/* 主容器 */
.editorjs-codeFlask_Wrapper {
border: 1px solid #dcdfe6;
border-radius: 5px;
background-color: #f6f8fa;
margin-bottom: 10px;
position: relative;
transition: all 0.3s ease;
width: 100%;
min-height: 100px;
overflow: hidden;
}
/* 标题栏 */
.editorjs-codeFlask_Header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 8px 12px;
background-color: #e9ecef;
border-bottom: 1px solid #dcdfe6;
position: relative;
z-index: 0; /* 从10降低到2 */
}
/* 语言显示 */
.editorjs-codeFlask_LangDisplay {
padding: 2px 8px;
background-color: #409eff;
color: white;
border-radius: 3px;
font-size: 12px;
font-weight: 500;
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
}
/* 内容容器 - 禁止纵向滚动 */
.editorjs-codeFlask_ContentContainer {
position: relative;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
transition: height 0.3s ease;
}
/* 编辑器容器 - 禁止纵向滚动 */
.editorjs-codeFlask_Editor {
position: relative;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
transition: height 0.3s ease;
}
/* 底部按钮容器 - 优化为更简洁的样式 */
.editorjs-codeFlask_BottomButtonContainer {
display: flex;
justify-content: center;
align-items: center;
padding: 4px;
background-color: #f8f9fa;
border-top: 1px solid #e9ecef;
position: relative;
z-index: 0;
}
/* 底部横向折叠/展开按钮 - 优化样式,使其更融入设计 */
.editorjs-codeFlask_BottomToggle {
width: 100%;
background-color: transparent;
color: #606266;
border: none;
border-radius: 4px;
padding: 6px 12px;
font-size: 12px;
font-weight: 400;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
text-align: center;
position: relative;
}
.editorjs-codeFlask_BottomToggle:hover {
background-color: #e9ecef;
color: #409eff;
}
.editorjs-codeFlask_BottomToggle:active {
background-color: #dee2e6;
}
.editorjs-codeFlask_BottomToggle .toggle-icon {
font-size: 11px;
transition: transform 0.3s ease;
}
/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
.editorjs-codeFlask_BottomToggle:has(span.toggle-icon:contains("▲"))::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6px;
background: linear-gradient(to bottom, rgba(248, 249, 250, 0) 0%, rgba(248, 249, 250, 1) 100%);
pointer-events: none;
}
/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
/* 删除不被广泛支持的:contains()选择器 */
.editorjs-codeFlask_BottomToggle.expand-mode::before {
content: '';
position: absolute;
top: -60px;
left: 0;
right: 0;
height: 60px;
background: linear-gradient(to bottom, rgb(255 255 255 / 0%) 0%, rgba(248, 249, 250, 1) 100%);
pointer-events: none;
}
/* CodeFlask 主容器样式 */
.editorjs-codeFlask_Editor .codeflask {
position: relative;
background: #fafafa;
border-radius: 0 0 4px 4px;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}
/* 行号容器 */
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 40px;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
z-index: 0;
}
/* 行号 */
.editorjs-codeFlask_Editor .codeflask__lines {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 40px;
padding: 10px 0;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
z-index: 0;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
color: #666;
text-align: right;
user-select: none;
overflow: hidden;
}
.editorjs-codeFlask_Editor .codeflask__lines__line {
padding-right: 8px;
}
/* 文本区域 - 输入框 */
.editorjs-codeFlask_Editor .codeflask__textarea {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 10px;
border: none;
background: transparent;
color: transparent;
caret-color: #333;
resize: none;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
z-index: 1;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
white-space: pre-wrap; /* 自动换行 */
tab-size: 4;
outline: none;
}
/* 添加选中文本样式 */
.editorjs-codeFlask_Editor .codeflask__textarea::selection {
background-color: #b3d4fc;
color: #333;
}
.editorjs-codeFlask_Editor .codeflask__textarea::-moz-selection {
background-color: #b3d4fc;
color: #333;
}
/* 代码预览区域 */
.editorjs-codeFlask_Editor .codeflask__pre {
position: absolute;
top: 0;
left: 0;
width: 100%; /* 确保宽度不超出容器 */
height: 100%;
padding: 10px;
margin: 0;
border: none;
background: transparent;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
z-index: 0;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
white-space: pre-wrap; /* 自动换行 */
pointer-events: none;
}
/* 代码高亮区域 */
.editorjs-codeFlask_Editor .codeflask__code {
display: block;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
color: #333;
white-space: pre-wrap; /* 自动换行 */
tab-size: 4;
overflow: visible;
}
/* 语法高亮样式 - 确保Prism.js样式正确应用 */
.editorjs-codeFlask_Editor .codeflask__code {
background: transparent !important;
}
/* 通用语法高亮token样式 */
.editorjs-codeFlask_Editor .token.comment,
.editorjs-codeFlask_Editor .token.prolog,
.editorjs-codeFlask_Editor .token.doctype,
.editorjs-codeFlask_Editor .token.cdata {
color: #708090;
}
.editorjs-codeFlask_Editor .token.punctuation {
color: #999;
}
.editorjs-codeFlask_Editor .token.namespace {
opacity: 0.7;
}
.editorjs-codeFlask_Editor .token.property,
.editorjs-codeFlask_Editor .token.tag,
.editorjs-codeFlask_Editor .token.boolean,
.editorjs-codeFlask_Editor .token.number,
.editorjs-codeFlask_Editor .token.constant,
.editorjs-codeFlask_Editor .token.symbol,
.editorjs-codeFlask_Editor .token.deleted {
color: #905;
}
.editorjs-codeFlask_Editor .token.selector,
.editorjs-codeFlask_Editor .token.attr-name,
.editorjs-codeFlask_Editor .token.string,
.editorjs-codeFlask_Editor .token.char,
.editorjs-codeFlask_Editor .token.builtin,
.editorjs-codeFlask_Editor .token.inserted {
color: #690;
}
.editorjs-codeFlask_Editor .token.operator,
.editorjs-codeFlask_Editor .token.entity,
.editorjs-codeFlask_Editor .token.url,
.editorjs-codeFlask_Editor .language-css .token.string,
.editorjs-codeFlask_Editor .style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, 0.5);
}
.editorjs-codeFlask_Editor .token.atrule,
.editorjs-codeFlask_Editor .token.attr-value,
.editorjs-codeFlask_Editor .token.keyword {
color: #07a;
}
.editorjs-codeFlask_Editor .token.function,
.editorjs-codeFlask_Editor .token.class-name {
color: #dd4a68;
}
.editorjs-codeFlask_Editor .token.regex,
.editorjs-codeFlask_Editor .token.important,
.editorjs-codeFlask_Editor .token.variable {
color: #e90;
}
/* 复制按钮样式 */
.editorjs-codeFlask_CopyButton {
background-color: #409eff;
color: white;
border: none;
border-radius: 3px;
padding: 6px 12px;
margin-right: 8px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
}
.editorjs-codeFlask_CopyButton:hover {
background-color: #66b1ff;
}
.editorjs-codeFlask_CopyButton.copied {
background-color: #67c23a;
}
/* 折叠/展开按钮样式 */
.editorjs-codeFlask_Toggle {
background-color: #909399;
color: white;
border: none;
border-radius: 3px;
padding: 0 8px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
font-weight: bold;
}
.editorjs-codeFlask_Toggle:hover {
background-color: #a6a9ad;
}
/* 响应式调整 */
@media (max-width: 768px) {
.editorjs-codeFlask_Header {
padding: 6px 8px;
}
.editorjs-codeFlask_Editor .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask__pre,
.editorjs-codeFlask_Editor .codeflask__code {
font-size: 13px;
line-height: 19px;
padding: 8px;
}
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
width: 35px;
}
.editorjs-codeFlask_Editor .codeflask__lines {
width: 35px;
font-size: 12px;
}
}
/* 滚动条样式 - 完全隐藏纵向滚动条 */
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar {
width: 0;/* 纵向滚动条宽度为0 */
height: 6px;/* 横向滚动条保持6px宽度 */
}
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-track {
background: transparent;
border-radius: 0;
}
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 0;
}
/* Firefox 滚动条隐藏 */
.editorjs-codeFlask_Wrapper {
scrollbar-width: none;/* Firefox 隐藏纵向滚动条 */
}
.editorjs-codeFlask_Wrapper ::-moz-scrollbar {
width: 0;
height: 6px;
}
/* 焦点状态 */
.editorjs-codeFlask_Wrapper:focus-within {
border-color: #409eff;
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
/* 只读模式样式 */
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Header {
background-color: #f5f7fa;
}
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Editor .codeflask__textarea {
cursor: default;
}
/* 确保所有元素正确显示 */
.editorjs-codeFlask_Wrapper * {
box-sizing: border-box;
}
/* 修复行号对齐 */
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__pre {
padding-left: 50px;
}
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__lines {
padding-top: 10px;
}
/* 语言显示元素 - 添加点击样式 */
.editorjs-codeFlask_LangDisplay {
padding: 2px 8px;
background-color: #409eff;
color: white;
border-radius: 3px;
font-size: 12px;
font-weight: 500;
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
transition: all 0.2s ease;
}
.editorjs-codeFlask_LangDisplay:hover {
background-color: #66b1ff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 语言选择弹窗 */
.editorjs-codeFlask_LanguagePopup {
background-color: white;
border: 1px solid #dcdfe6;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 250px;
max-height: 300px;
z-index: 1000;
overflow: hidden;
}
/* 搜索框 */
.editorjs-codeFlask_LanguageSearch {
width: 100%;
padding: 8px 12px;
border: none;
border-bottom: 1px solid #ebeef5;
font-size: 12px;
outline: none;
box-sizing: border-box;
}
/* 语言列表 */
.editorjs-codeFlask_LanguagesList {
max-height: 250px;
overflow-y: auto;
}
/* 语言选项 */
.editorjs-codeFlask_LanguageItem {
padding: 8px 12px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.editorjs-codeFlask_LanguageItem:hover {
background-color: #f5f7fa;
}
.editorjs-codeFlask_LanguageItem.selected {
background-color: #ecf5ff;
color: #409eff;
font-weight: 500;
}
/* 滚动条样式 */
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar {
width: 6px;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-track {
background-color: #f5f7fa;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb {
background-color: #c0c4cc;
border-radius: 3px;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb:hover {
background-color: #909399;
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>
页:
[1]