LiuShen

LiuShen

Joined 2 years ago

LiuShen
Last active 3 months ago action auto cache edgeone eo github python tencent

通过Python,在Github Action中实现EO站点缓存刷新

0 0 2
1 import os
2 import json
3 from tencentcloud.common import credential
4 from tencentcloud.teo.v20220901 import teo_client, models
5 from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
6
7 try:
8 cred = credential.Credential(
9 os.getenv("TENCENTCLOUD_SECRET_ID"),
10 os.getenv("TENCENTCLOUD_SECRET_KEY")
LiuShen
Last active 3 months ago about butterfly new-version page

清羽飞扬新版关于页面魔改文件备份

0 0 5
1 #about-container
2 section.top-section
3 .top-content
4 .float-texts
5 each text, index in site.data.about.top_info.float_text.slice(0, 4)
6 .float-text(class=`float-text-${index + 1}`) #{text}
7 .avatar-container
8 img.no-lightbox.avatar(src=url_for(site.data.about.top_info.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt="")
9 .float-texts
10 each text, index in site.data.about.top_info.float_text.slice(4, 8)
LiuShen
Last active 3 months ago atom feed hexo pretty xml xsl

Atom通过XSL代码进行HTML化并进行美化

0 0 1
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="3.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:atom="http://www.w3.org/2005/Atom">
5 <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
6
7 <xsl:template match="/">
8 <xsl:variable name="title">
9 <xsl:value-of select="/atom:feed/atom:title"/>
10 </xsl:variable>