[{"content":"欢迎使用 Hugo Theme Stack Starter 这是一个基于 Hugo Theme Stack v4 的开箱即用博客模板，内置美化增强、双语支持和 GitHub Actions 自动部署，无需本地安装任何工具就能快速上手。\n方式一：GitHub Template 一键部署（推荐） 这是最简单的方式，全程在浏览器中完成。\n第 1 步：使用模板创建你的仓库 打开本项目 GitHub 页面 点击右上角绿色按钮 \u0026ldquo;Use this template\u0026rdquo; → \u0026ldquo;Create a new repository\u0026rdquo; 填写仓库名称（如 my-blog），选择 Public（GitHub Pages 免费版需要公开仓库） 点击 \u0026ldquo;Create repository\u0026rdquo; 第 2 步：开启 GitHub Pages 进入你新建的仓库，点击 Settings → Pages 在 \u0026ldquo;Source\u0026rdquo; 下选择 \u0026ldquo;GitHub Actions\u0026rdquo; 保存 第 3 步：修改配置 在 GitHub 网页上直接编辑 config/_default/config.toml：\n# 改为你的 GitHub Pages 地址 baseurl = \u0026#34;https://你的用户名.github.io/仓库名/\u0026#34; title = \u0026#34;我的博客\u0026#34; 第 4 步：推送触发自动部署 任何一次代码提交都会触发 GitHub Actions 自动构建并部署。稍等 1-2 分钟后，访问你的 GitHub Pages 地址即可看到博客！\n方式二：本地开发 如果你想在本地预览和编写：\n安装 Hugo（扩展版） # macOS brew install hugo # Windows（使用 Scoop） scoop install hugo-extended # Linux（apt） sudo apt install hugo 验证安装（需要 Extended 版本）：\nhugo version # 输出应包含 extended 克隆并运行 git clone https://github.com/你的用户名/my-blog.git cd my-blog hugo server 访问 http://localhost:1313 即可预览。\n基本配置说明 所有配置文件在 config/_default/ 目录下：\n文件 作用 config.toml 站点标题、域名、语言 languages.toml 多语言设置（中/英） params.toml 主题参数（评论、首页布局等） params.zh.toml 中文专属参数（头像、副标题） menu.zh.toml 中文导航菜单 必须修改的配置 1. 站点标题和域名 (config.toml)：\nbaseurl = \u0026#34;https://你的域名/\u0026#34; title = \u0026#34;我的博客\u0026#34; 2. 你的头像和介绍 (params.zh.toml)：\n[sidebar] subtitle = \u0026#34;你的个性签名\u0026#34; avatar = \u0026#34;img/avatar.jpg\u0026#34; # 替换 assets/img/avatar.jpg 3. 运行时间 (params.toml)：\n[footer] launchDate = \u0026#34;2024-01-01\u0026#34; # 博客建站日期 目录结构 my-blog/ ├── .github/workflows/ # GitHub Actions 自动部署（无需修改） ├── assets/scss/ # 样式定制 │ ├── custom.scss # 颜色、全局样式 │ └── partials/custom-components/ # 组件样式 ├── config/_default/ # 所有配置文件 ├── content/ │ └── post/ # 博客文章（在这里写作） ├── layouts/ # 自定义布局和 Shortcodes └── static/ # 静态资源（图片等） 下一步 📖 主题美化介绍 — 了解本模板做了哪些改动 💬 配置 Waline 评论 — 为博客添加评论功能 ✏️ 开始写第一篇博客 — 学习 Markdown 和多语言写作 祝你写作愉快！🎉\n","date":"2026-04-09T00:00:00Z","permalink":"/post/hello-world/","title":"快速开始：使用 Template 一键部署博客"},{"content":"本模板基于 Hugo Theme Stack v4 开发，在保持原有功能完整性的基础上，进行了一系列视觉和交互上的美化。\n所有修改都通过 Hugo 的覆盖机制实现（在 assets/ 和 layouts/ 中创建同名文件），不修改主题源代码，方便随时升级主题版本。\n1. 全局配色系统 重新定义了整套颜色变量，采用深蓝 + 暖米白的配色方案：\n亮色模式：\n背景色：暖米白 #f8f7f2（比纯白更护眼） 主色调：深海蓝 #1B365D 卡片背景：#fdfdfb（微暖的白） 暗色模式：\n背景色：#101214（深灰黑） 卡片背景：#1c2128（GitHub 暗色风格） 暗色模式下图片自动降亮，hover 后恢复 修改位置：assets/scss/custom.scss 中的 :root 变量。\n2. Mac 风格代码块 原始主题的代码块较为简洁，本模板对其进行了全面美化：\n顶部装饰栏 为每个代码块添加了 macOS 风格的三色圆点装饰（红、黄、绿），模拟终端窗口外观。\n复制按钮重设计 从不易发现的图标按钮改为悬浮在标题栏右侧的文字按钮 亮色模式：毛玻璃风格（backdrop-filter: blur） 暗色模式：深色半透明背景 点击后按钮文字变为\u0026quot;✓ Copied!\u0026quot; 自动折叠长代码块 超过 600px 高度的代码块会自动折叠，底部显示\u0026quot;展开代码\u0026quot;按钮：\n折叠时底部有渐变遮罩 点击展开后，按钮变为\u0026quot;收起代码\u0026quot; 收起时自动滚动回代码块顶部，防止页面位置混乱 滚动条美化 代码块的横向滚动条默认透明，鼠标悬停时才显现，保持界面整洁。\n3. 首页双栏网格布局 在 PC 端（宽度 ≥ 1024px），首页文章列表变为 2 列网格展示：\n每篇文章以卡片形式呈现，包含封面图、标题、摘要和元信息 卡片 hover 时有轻微上浮动画 文章标题和摘要超出时自动截断（2 行） 移动端自动恢复为单列列表 开启方式：在 params.toml 中设置：\n[homepage] grid = true 4. 移动端导航重设计 原主题的移动端导航较基础，本模板完全重写了移动端体验：\n顶部悬浮导航栏 固定在顶部（sticky），随页面滚动保持可见 左侧：头像 + 站点名称（点击回首页） 右侧：明暗切换、语言切换、搜索、汉堡菜单 汉堡菜单 点击展开侧边菜单，带有淡入动画 菜单展开时顶栏标题淡出，避免遮挡 当前页面菜单项高亮显示 屏幕宽度恢复时自动关闭 搜索框 桌面端侧边栏的搜索框经过重新设计，与卡片样式一致。\n5. 博客统计页（Stats） 新增了一个功能丰富的 /stats/ 统计页，包含：\n摘要卡片：总文章数、总字数、运行天数（动画数字滚动） 分类分布：带进度条的分类列表，可点击进入分类页 热门标签：标签云展示（前 30 个标签） 写作习惯：按周几和时段分析发布习惯（基于 Git 提交时间） 年度热力图：GitHub 风格的贡献热力图（近一年的发布记录） 配置页面入口：在 content/stats/index.zh.md 中设置 layout: stats。\n6. Footer 运行时长 Footer 新增博客运行时长展示，会计算从建站日期到当前的天数、小时、分钟。\n点击可跳转到 Stats 统计页。\n配置建站日期：\n[footer] launchDate = \u0026#34;2024-09-09\u0026#34; 7. 自定义 Shortcodes 时间线（Timeline） 适合展示成长经历、技术栈演进等内容：\n{{\u0026lt; timeline \u0026gt;}} {{\u0026lt; timeline-item date=\u0026#34;2024-01\u0026#34; \u0026gt;}} 开始学习 Hugo 建站 {{\u0026lt; /timeline-item \u0026gt;}} {{\u0026lt; timeline-item date=\u0026#34;2024-06\u0026#34; \u0026gt;}} 博客正式上线 {{\u0026lt; /timeline-item \u0026gt;}} {{\u0026lt; /timeline \u0026gt;}} 标题分割线（Title） 适合日记、健身记录等需要分段标题的内容：\n{{\u0026lt; title \u0026#34;晨练记录\u0026#34; \u0026#34;green\u0026#34; \u0026gt;}} 支持颜色：red、orange、yellow、green、teal、blue、indigo、purple、pink、gray\n如何自定义颜色 编辑 assets/scss/custom.scss，修改 :root 中的变量：\n:root { --accent-color: #1B365D; /* 主色调（按钮、链接等） */ --body-background: #f8f7f2; /* 页面背景 */ --card-background: #fdfdfb; /* 卡片背景 */ } 保存后 Hugo 会自动重新编译，浏览器实时刷新。\n","date":"2026-04-10T00:00:00Z","permalink":"/post/theme-customization/","title":"主题美化介绍：我做了哪些改动"},{"content":"Waline 是一款安全、简洁的评论系统，支持 Markdown，免费部署，无需用户注册即可评论。\n本模板已内置 Waline 集成，只需部署好服务端并填写一行配置即可启用。\n第一步：部署 Waline 服务端 请参考 Waline 官方快速上手文档 完成服务端的部署：\n👉 https://waline.js.org/guide/get-started/\n官方文档提供了在 Vercel 上的免费一键部署方案，整个过程大约 5 分钟。\n部署完成后，你会获得一个 Waline 服务地址，类似：\nhttps://your-waline-project.vercel.app/ （默认 Vercel 域名） 或者你绑定的自定义域名 记录这个地址，下一步会用到。\n第二步：在本模板中配置 编辑 config/_default/params.toml，填入你的服务地址：\n[comments] enabled = true provider = \u0026#34;waline\u0026#34; [comments.waline] serverURL = \u0026#34;https://your-waline-project.vercel.app/\u0026#34; # ← 填入你的地址 pageview = true # 同时开启文章阅读量统计 # 可选：自定义表情包（默认微博表情） emoji = [\u0026#34;https://unpkg.com/@waline/emojis@1.0.1/weibo\u0026#34;] # 评论必填字段 requiredMeta = [\u0026#34;name\u0026#34;] [comments.waline.locale] admin = \u0026#34;Admin\u0026#34; # 管理员标识 保存后重启 hugo server，文章页面底部会出现评论区。\n功能说明 阅读量统计 设置 pageview = true 后，文章头部会自动显示阅读量（需要 Waline 服务端支持）。\n评论管理后台 访问 https://your-waline-project.vercel.app/ui/ 进入管理界面，第一个注册的账号自动成为管理员，可以审核、删除评论。\n邮件通知 有人回复时可以通过邮件通知博主，需要在 Vercel 环境变量中配置 SMTP 信息，详见 官方文档 - 评论通知。\n常见问题 评论区不显示？\n检查 serverURL 末尾是否有斜杠 /，以及 Vercel 服务是否正常运行（直接访问 serverURL 应该能看到 Waline 欢迎页）。\nCookie 提示遮住评论区？\n如果开启了 Cookie 同意功能，用户需先接受「功能性 Cookie」后评论区才会显示。可以在 params.toml 中关闭 Cookie 提示，或引导用户接受。\n","date":"2026-04-11T00:00:00Z","permalink":"/post/waline-setup/","title":"配置 Waline 评论区"},{"content":"创建第一篇文章 方式一：使用命令创建（推荐） # 创建中文文章 hugo new content post/my-first-post/index.zh.md # 同时创建对应的英文版 hugo new content post/my-first-post/index.en.md Hugo 会根据 archetypes/default.md 模板自动填充初始内容。\n方式二：手动创建 在 content/post/ 下新建一个文件夹，然后在其中创建 index.zh.md：\ncontent/ └── post/ └── my-first-post/ ← 文章目录（名称即 URL） ├── index.zh.md ← 中文正文 ├── index.en.md ← 英文正文（可选） └── cover.jpg ← 封面图（可选） Front Matter 说明 每篇文章顶部的 --- 之间的部分叫 Front Matter，用于定义文章元数据：\n--- title: \u0026#34;文章标题\u0026#34; description: \u0026#34;文章摘要，显示在列表页和 SEO 描述中\u0026#34; date: 2026-04-12 # 发布日期 lastmod: 2026-04-23 # 最后修改日期（可选） draft: false # true = 草稿，不会发布 categories: - Technology # 分类（建议只选一个） tags: - Hugo # 标签（可多个） - Markdown image: cover.jpg # 封面图（相对于文章目录） --- 提示：date 决定文章在列表中的排序顺序，未来日期的文章在本地预览时需要 hugo server -F 才能显示。\nMarkdown 基本语法 标题 ## 二级标题 ### 三级标题 #### 四级标题 文章正文中不使用一级标题（# H1），因为文章的 title 字段已经是 H1。\n文字样式 **粗体** 加粗 *斜体* 斜体 ~~删除线~~ 删除线 `行内代码` 代码 效果：粗体、斜体、删除线、行内代码\n链接和图片 [链接文字](https://example.com) [内部链接](/post/hello-world/) ![图片描述](image.jpg) # 相对路径（同目录下） ![图片描述](/img/photo.jpg) # 绝对路径（static 目录下） 列表 - 无序列表项 - 第二项 - 嵌套项 1. 有序列表 2. 第二项 3. 第三项 代码块 ```python def hello(): print(\u0026#34;Hello, World!\u0026#34;) ``` 支持语言高亮：python、go、javascript、bash、toml、yaml、markdown 等。\n引用块 \u0026gt; 这是一段引用内容 \u0026gt; 可以多行 效果：\n这是一段引用内容\n表格 | 列1 | 列2 | 列3 | |-------|-------|-------| | 内容1 | 内容2 | 内容3 | | 内容4 | 内容5 | 内容6 | 分割线 --- 多语言写作 本模板默认开启中英双语支持。\n文件命名规则 文件名 对应语言 index.zh.md 中文 index.en.md 英文 两个文件放在同一目录下，Hugo 会自动关联为同一篇文章的不同语言版本。\n只写中文版 如果你不想写英文版，只创建 index.zh.md 即可。\n添加英文版 在同一目录下创建 index.en.md 翻译文章内容（Front Matter 的 title、description 也要翻译） 图片等资源两个语言版本共享，无需复制 示例：\nindex.zh.md：\n--- title: \u0026#34;我的第一篇文章\u0026#34; description: \u0026#34;这是我的第一篇博客文章\u0026#34; date: 2026-04-12 --- 内容... index.en.md：\n--- title: \u0026#34;My First Post\u0026#34; description: \u0026#34;This is my first blog post\u0026#34; date: 2026-04-12 --- Content... 插入图片 使用文章目录下的图片（推荐） 将图片放在文章目录下，然后用相对路径引用：\ncontent/post/my-post/ ├── index.zh.md ├── cover.jpg ← 封面图 └── screenshot.png ← 文章内图片 在 Markdown 中：\n![截图说明](screenshot.png) 封面图在 Front Matter 中指定：\nimage: cover.jpg 使用 static 目录下的图片 将图片放在 static/img/ 下，用绝对路径引用：\n![图片](img/photo.jpg) 使用本模板的 Shortcodes 标题分割线 适合日记类文章的段落分隔：\n{{\u0026lt; title \u0026#34;早晨跑步\u0026#34; \u0026#34;green\u0026#34; \u0026gt;}} 今天跑了 5 公里，状态不错。 {{\u0026lt; title \u0026#34;下午阅读\u0026#34; \u0026#34;blue\u0026#34; \u0026gt;}} 读了两章《深度工作》。 时间线 适合展示经历、成长轨迹：\n{{\u0026lt; timeline \u0026gt;}} {{\u0026lt; timeline-item date=\u0026#34;2024-01\u0026#34; \u0026gt;}} 开始学习编程 {{\u0026lt; /timeline-item \u0026gt;}} {{\u0026lt; timeline-item date=\u0026#34;2024-06\u0026#34; \u0026gt;}} 完成第一个项目 {{\u0026lt; /timeline-item \u0026gt;}} {{\u0026lt; /timeline \u0026gt;}} 写作建议 文章目录名即是 URL，建议用英文小写加连字符，如 my-first-post 封面图建议尺寸 1200×630px，这也是社交分享时的最佳尺寸 description 不超过 160 个字符，对 SEO 友好 本地预览时使用 hugo server -D 可以看到草稿文章 祝写作顺畅！✍️\n","date":"2026-04-12T00:00:00Z","permalink":"/post/start-writing/","title":"开始写博客：Markdown 入门与多语言写作"},{"content":"Oracle 19c 通过 DB Link 远程克隆 PDB 完整指南 概述 在多租户架构下，Oracle 19c 支持通过数据库链接（DB Link）将远程 CDB 中的 PDB 克隆到本地 CDB。这种方法无需中间存储，数据直接通过网络传输，特别适合 OCI 环境中 DBCS 到 RAC 的迁移场景。\n本文以实际环境为例：\n源库：单实例 DBCS，19.21，包含 3 个 PDB（PDB1、PDB2、PDB3）\n目标库：RAC，19.31，新建空 CDB\n网络：同 VCN 同子网，网络互通\n一、前置条件检查 1.1 版本兼容性 源和目标均为 19c，支持远程克隆。跨小版本（19.21 → 19.31）克隆完全兼容。\n1.2 网络连通性 确认源库和目标库之间网络互通：\nbash\n从 RAC 节点测试源库连通性 tnsping \u0026lt;source_tns_alias\u0026gt;\n测试端口 nc -zv \u0026lt;source_host\u0026gt; 1521\n1.3 用户权限要求 源库：需要具有 CREATE PLUGGABLE DATABASE 权限的用户\n目标库：同样需要 CREATE PLUGGABLE DATABASE 权限\n二、源库准备 2.1 创建克隆专用用户 在源库 CDB 级别创建用于克隆的用户：\n-- 连接到源库 CDB sqlplus / as sysdba -- 创建公共用户（放在 CDB$ROOT） CREATE USER c##clone_user IDENTIFIED BY \u0026#34;ClonePass2024\u0026#34; CONTAINER=ALL; GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##clone_user CONTAINER=ALL; GRANT SELECT ON V$PDBS TO c##clone_user; GRANT SELECT ON DBA_PDBS TO c##clone_user; 2.2 导出 TDE 密钥（如启用加密） 如果源 PDB 使用了 TDE 加密，需要先导出主密钥：\n-- 源库导出主密钥 sqlplus / as sysdba -- 确认 wallet 状态 ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY \u0026#34;源库wallet密码\u0026#34;; -- 导出主密钥到文件 ADMINISTER KEY MANAGEMENT EXPORT ENCRYPTION KEYS WITH SECRET \u0026#34;CloneSecretKey\u0026#34; TO \u0026#39;/tmp/tde_source.exp\u0026#39; IDENTIFIED BY \u0026#34;源库wallet密码\u0026#34;; 2.3 确认 PDB 状态\n-- 查看源库 PDB 状态 SELECT NAME, OPEN_MODE, RESTRICTED FROM V$PDBS; NAME OPEN_MODE RESTRICTED ------------- ----------- ---------- PDB$SEED READ ONLY NO PDB1 READ WRITE NO PDB2 READ WRITE NO PDB3 READ WRITE NO 注意：被克隆的 PDB 需要处于打开状态（READ WRITE 或 READ ONLY），但克隆过程中会短暂锁定。 三、目标库准备 3.1 导入 TDE 密钥（如源库有加密） 将源库导出的密钥文件复制到 RAC 所有节点：\n# 复制到 RAC 节点1 scp /tmp/tde_source.exp oracle@exa-node1:/tmp/ # 复制到 RAC 节点2（RAC 所有节点都需要） scp /tmp/tde_source.exp oracle@exa-node2:/tmp/ 在目标库导入密钥：\n-- 连接到目标库 CDB（每个节点都需要执行） sqlplus / as sysdba -- 导入主密钥 ADMINISTER KEY MANAGEMENT IMPORT ENCRYPTION KEYS WITH SECRET \u0026#34;CloneSecretKey\u0026#34; FROM \u0026#39;/tmp/tde_source.exp\u0026#39; IDENTIFIED BY \u0026#34;目标库wallet密码\u0026#34; WITH BACKUP; 3.2 创建数据库链接 在目标库 CDB 级别创建指向源库的 DB Link：\n-- 连接到目标库 CDB sqlplus / as sysdba -- 创建 DB Link CREATE DATABASE LINK source_db_link CONNECT TO c##clone_user IDENTIFIED BY \u0026#34;ClonePass2024\u0026#34; USING \u0026#39;(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=\u0026lt;源库IP或SCAN\u0026gt;)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=\u0026lt;源库CDB服务名\u0026gt;)) )\u0026#39;; 3.3 测试 DB Link 连通性\n-- 测试 DB Link 是否正常 SELECT \u0026#39;Link OK\u0026#39; AS STATUS FROM DUAL@source_db_link; -- 查询远程 PDB 信息 SELECT NAME, OPEN_MODE FROM V$PDBS@source_db_link; -- 如果上面查询报错，先查询远程数据库版本 SELECT BANNER FROM V$VERSION@source_db_link WHERE ROWNUM=1; 预期输出： text STATUS ------- Link OK NAME OPEN_MODE ------------- ---------- PDB1 READ WRITE PDB2 READ WRITE PDB3 READ WRITE 3.4 验证目标目录结构\n-- 查看目标库 ASM 目录结构（RAC 使用 ASM） SELECT NAME FROM V$ASM_DISKGROUP; NAME ---------- DATA RECO -- 确认目标路径 -- RAC 通常使用 +DATA/\u0026lt;CDB_NAME\u0026gt;/ 作为数据文件目录 四、执行 PDB 远程克隆 4.1 克隆第一个 PDB\n-- 连接到目标库 CDB sqlplus / as sysdba -- 执行远程克隆 CREATE PLUGGABLE DATABASE PDB1 FROM PDB1@source_db_link FILE_NAME_CONVERT = ( \u0026#39;/u01/app/oracle/oradata/SRCDB/PDB1/\u0026#39;, \u0026#39;+DATA/TGTCDB/PDB1/\u0026#39; ) PARALLEL 8; 参数说明：\nFROM PDB1@source_db_link：指定源 PDB 和 DB Link\nFILE_NAME_CONVERT：文件路径转换规则\nPARALLEL 8：并行度（根据网络带宽和源库性能调整）\n4.2 监控克隆进度 在另一个会话中监控进度：\n-- 查看克隆进度 SELECT PDB_NAME, STATUS, MESSAGE FROM CDB_PDBS WHERE PDB_NAME = \u0026#39;PDB1\u0026#39;; -- 查看数据文件生成进度 SELECT NAME, BYTES/1024/1024 AS SIZE_MB FROM V$DATAFILE WHERE CON_ID = (SELECT CON_ID FROM V$PDBS WHERE NAME=\u0026#39;PDB1\u0026#39;); 4.3 依次克隆其余 PDB\n-- 克隆 PDB2 CREATE PLUGGABLE DATABASE PDB2 FROM PDB2@source_db_link FILE_NAME_CONVERT = ( \u0026#39;/u01/app/oracle/oradata/SRCDB/PDB2/\u0026#39;, \u0026#39;+DATA/TGTCDB/PDB2/\u0026#39; ) PARALLEL 8; -- 克隆 PDB3 CREATE PLUGGABLE DATABASE PDB3 FROM PDB3@source_db_link FILE_NAME_CONVERT = ( \u0026#39;/u01/app/oracle/oradata/SRCDB/PDB3/\u0026#39;, \u0026#39;+DATA/TGTCDB/PDB3/\u0026#39; ) PARALLEL 8; 五、克隆后处理 \u0026ndash; 查看各 PDB 的补丁状态\nSELECT CON_ID, PDB_NAME, PATCH_ID, VERSION, STATUS FROM CDB_REGISTRY_SQLPATCH ORDER BY CON_ID, PATCH_ID; 预期输出示例： text CON_ID PDB_NAME PATCH_ID VERSION STATUS ------ --------- ---------- -------- -------- 1 CDB$ROOT 35943157 19.31.0 SUCCESS 3 PDB1 (null) 19.21.0 (null) 4 PDB2 (null) 19.21.0 (null) 5 PDB3 (null) 19.21.0 (null) 判断标准：\nCDB$ROOT 的 PATCH_ID 为 35943157（19.31 的 RU 补丁号），STATUS 为 SUCCESS\nPDB 没有任何补丁记录，说明 PDB 的数据字典还是旧版本\n\u0026ndash; 如果 PDB 未打开，先打开\nALTER PLUGGABLE DATABASE PDB1 OPEN; ALTER PLUGGABLE DATABASE PDB2 OPEN; ALTER PLUGGABLE DATABASE PDB3 OPEN; \u0026ndash; 确认所有 PDB 都是 READ WRITE 模式\nSELECT NAME, OPEN_MODE FROM V$PDBS WHERE NAME IN (\u0026#39;PDB1\u0026#39;,\u0026#39;PDB2\u0026#39;,\u0026#39;PDB3\u0026#39;); 2.2 确认监听和网络配置 Datapatch 需要通过 SQL*Net 连接到各 PDB：\nbash\n确认各 PDB 的服务已注册到监听 lsnrctl status 测试连接 sqlplus system/password@//localhost:1521/pdb1 sqlplus system/password@//localhost:1521/pdb2 sqlplus system/password@//localhost:1521/pdb3 2.3 设置环境变量\n# 确保 ORACLE_HOME 正确 export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1 export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_SID=\u0026lt;目标CDB实例名\u0026gt; 验证 datapatch 可执行 which datapatch datapatch -version 三、执行 Datapatch\n3.1 对特定 PDB 运行 Datapatch\n# 方法1：使用 -pdbs 参数指定 PDB datapatch -pdbs PDB1,PDB2,PDB3 方法2：对所有 PDB 运行 datapatch 3.2 监控 Datapatch 执行 Datapatch 执行过程中会显示详细日志：\ntext SQL Patching tool version 19.31.0.0.0 Production on Sat Aug 15 10:30:00 2026 Copyright (c) 2012, 2024, Oracle. All rights reserved.\nConnecting to database\u0026hellip;OK Determining current state\u0026hellip;done Adding patches to installation queue and performing prereq checks\u0026hellip;done Installation queue: For the following PDBs: PDB1 PDB2 PDB3 Nothing to roll back The following patches will be applied: 35943157 (19.31.0.0.0)\n-- 连接到目标库 CDB sqlplus / as sysdba -- 查看各 PDB 的补丁状态 SELECT CON_ID, PDB_NAME, PATCH_ID, VERSION, STATUS, ACTION_TIME FROM CDB_REGISTRY_SQLPATCH ORDER BY CON_ID, PATCH_ID; 预期结果： text CON_ID PDB_NAME PATCH_ID VERSION STATUS ACTION_TIME ------ --------- ---------- -------- -------- ------------------- 1 CDB$ROOT 35943157 19.31.0 SUCCESS 2026-08-01 10:00:00 3 PDB1 35943157 19.31.0 SUCCESS 2026-08-15 11:30:00 4 PDB2 35943157 19.31.0 SUCCESS 2026-08-15 11:35:00 5 PDB3 35943157 19.31.0 SUCCESS 2026-08-15 11:40:00 4.2 验证数据字典一致性\n-- 检查每个 PDB 的数据字典 ALTER SESSION SET CONTAINER = PDB1; -- 验证数据字典版本 SELECT VERSION FROM DBA_REGISTRY WHERE COMP_ID = \u0026#39;CATALOG\u0026#39;; -- 检查无效对象 SELECT COUNT(*) AS INVALID_OBJECTS FROM DBA_OBJECTS WHERE STATUS = \u0026#39;INVALID\u0026#39;; -- 检查组件状态 SELECT COMP_ID, COMP_NAME, VERSION, STATUS FROM DBA_REGISTRY ORDER BY COMP_ID; 4.3 验证补丁应用完整性\n-- 对比 CDB 和 PDB 的补丁列表 -- CDB 级别 SELECT PATCH_ID, VERSION, STATUS FROM DBA_REGISTRY_SQLPATCH; -- PDB 级别（对每个 PDB 执行） ALTER SESSION SET CONTAINER = PDB1; SELECT PATCH_ID, VERSION, STATUS FROM DBA_REGISTRY_SQLPATCH; 修改PDB参数 5.2 修改 PDB 相关参数\n-- 连接到 PDB1 ALTER SESSION SET CONTAINER = PDB1; -- 修改 PDB 级参数（根据业务需求） ALTER SYSTEM SET SGA_TARGET = 4G SCOPE=BOTH; ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 2G SCOPE=BOTH; ALTER SYSTEM SET OPEN_CURSORS = 1000 SCOPE=BOTH; ALTER SYSTEM SET PROCESSES = 300 SCOPE=BOTH; -- 修改其他业务相关参数 ALTER SYSTEM SET NLS_SORT = \u0026#39;BINARY\u0026#39; SCOPE=SPFILE; ALTER SYSTEM SET OPTIMIZER_ADAPTIVE_PLANS = TRUE SCOPE=BOTH; 5.3 处理 PDB 服务\n-- 查看 PDB 服务 SELECT NAME, PDB, NETWORK_NAME FROM DBA_SERVICES WHERE PDB IN (\u0026#39;PDB1\u0026#39;,\u0026#39;PDB2\u0026#39;,\u0026#39;PDB3\u0026#39;); -- 如需修改服务名 BEGIN DBMS_SERVICE.MODIFY_SERVICE( service_name =\u0026gt; \u0026#39;pdb1_svc\u0026#39;, network_name =\u0026gt; \u0026#39;pdb1_new.example.com\u0026#39; ); END; / 5.4 验证数据完整性\n-- 对比源和目标的对象数量 -- 在源库执行 SELECT COUNT(*) AS OBJECTS_COUNT FROM DBA_OBJECTS WHERE OWNER NOT IN (\u0026#39;SYS\u0026#39;,\u0026#39;SYSTEM\u0026#39;); -- 在目标库 PDB1 执行相同查询 ALTER SESSION SET CONTAINER = PDB1; SELECT COUNT(*) AS OBJECTS_COUNT FROM DBA_OBJECTS WHERE OWNER NOT IN (\u0026#39;SYS\u0026#39;,\u0026#39;SYSTEM\u0026#39;); 5.5 处理无效对象\n-- 检查无效对象 SELECT COUNT(*) FROM DBA_OBJECTS WHERE STATUS = \u0026#39;INVALID\u0026#39;; -- 编译无效对象 BEGIN DBMS_UTILITY.COMPILE_SCHEMA(\u0026#39;SCHEMA_NAME\u0026#39;); END; / \u0026ndash; 或者使用 utlrp.sql 脚本 @?/rdbms/admin/utlrp.sql\n六、注意事项与最佳实践 6.1 性能优化建议 并行度设置：根据网络带宽设置合适的 PARALLEL 值，过大可能影响源库性能\n网络优化：确保源和目标之间的网络延迟小于 5ms，带宽足够\n时间窗口选择：选择业务低峰期执行克隆\n6.2 TDE 处理要点 RAC 环境所有节点都必须导入密钥\nWallet 文件位置必须在所有节点一致\n使用共享存储存放 wallet 是最佳实践\n6.3 常见错误处理 错误1：ORA-65005 权限不足\n-- 解决方案：确认用户权限 GRANT CREATE PLUGGABLE DATABASE TO c##clone_user CONTAINER=ALL; 错误2：ORA-17628 文件转换错误 ```sql -- 解决方案：检查 FILE_NAME_CONVERT 路径是否正确 -- 查看源 PDB 数据文件路径 SELECT FILE_NAME FROM DBA_DATA_FILES WHERE CON_ID = (SELECT CON_ID FROM V$PDBS WHERE NAME=\u0026#39;PDB1\u0026#39;); 错误3：TDE 密钥不匹配\n-- 解决方案：重新导出导入密钥 -- 确认目标库已导入所有主密钥 SELECT KEY_ID FROM V$ENCRYPTION_KEYS; 七、完整脚本总结 源库脚本\n-- 1. 创建克隆用户 CREATE USER c##clone_user IDENTIFIED BY \u0026#34;ClonePass2024\u0026#34; CONTAINER=ALL; GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##clone_user CONTAINER=ALL; GRANT SELECT ON V$PDBS TO c##clone_user; GRANT SELECT ON DBA_PDBS TO c##clone_user; -- 2. 导出 TDE 密钥（如需要） ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY \u0026#34;源库wallet密码\u0026#34;; ADMINISTER KEY MANAGEMENT EXPORT ENCRYPTION KEYS WITH SECRET \u0026#34;CloneSecretKey\u0026#34; TO \u0026#39;/tmp/tde_source.exp\u0026#39; IDENTIFIED BY \u0026#34;源库wallet密码\u0026#34;; 目标库脚本\n-- 1. 导入 TDE 密钥（如需要） ADMINISTER KEY MANAGEMENT IMPORT ENCRYPTION KEYS WITH SECRET \u0026#34;CloneSecretKey\u0026#34; FROM \u0026#39;/tmp/tde_source.exp\u0026#39; IDENTIFIED BY \u0026#34;目标库wallet密码\u0026#34; WITH BACKUP; -- 2. 创建 DB Link CREATE DATABASE LINK source_db_link CONNECT TO c##clone_user IDENTIFIED BY \u0026#34;ClonePass2024\u0026#34; USING \u0026#39;(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=\u0026lt;源库IP\u0026gt;)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=\u0026lt;源库CDB服务名\u0026gt;)) )\u0026#39;; -- 3. 测试 DB Link SELECT \u0026#39;Link OK\u0026#39; AS STATUS FROM DUAL@source_db_link; -- 4. 执行克隆 CREATE PLUGGABLE DATABASE PDB1 FROM PDB1@source_db_link FILE_NAME_CONVERT = (\u0026#39;源路径\u0026#39;, \u0026#39;目标路径\u0026#39;) PARALLEL 8; -- 5. 打开并验证 ALTER PLUGGABLE DATABASE PDB1 OPEN; ALTER SESSION SET CONTAINER = PDB1; SELECT COUNT(*) FROM DBA_OBJECTS; 总结 通过 DB Link 远程克隆 PDB 是 Oracle 19c 中最高效的数据库迁移方案之一，特别适合：\n同版本或相近版本的 Oracle 数据库\n网络条件良好的环境（同 VCN/数据中心）\n需要最小化停机时间的场景\n该方法避免了备份恢复的复杂性，数据直接通过网络传输，同时保持了数据的一致性和完整性。配合 TDE 密钥的导出导入，可以完美处理加密数据库的迁移需求。\n","date":"2026-08-15T00:00:00Z","permalink":"/post/oracle/","title":"Oracle database PDB clone"},{"content":"在股票交易中，集合竞价时段（9:15-9:25）往往蕴含着当天最重要的市场信息。经过长期实践和回测，我总结了一套基于集合竞价数据的复盘策略，帮助你从每日的竞价数据中筛选出潜在的强势股。这套策略的核心思路是：通过分析竞价过程中的量价异常变化，识别主力资金的真实意图。\n一、策略的核心逻辑 集合竞价是多空双方在开盘前的第一次交锋。在这个阶段，大资金通常会通过挂单和撤单来测试市场反应，或者制造假象来迷惑对手。我们的策略就是要透过这些表象，找到真正有资金介入的信号。策略主要关注以下几个维度：\n竞价量能异常：相比前几日同时段，竞价成交量出现显著放大（通常为前5日均值的2倍以上），说明有大资金在积极参与竞价。 价格梯度变化：竞价过程中价格稳步推升（从低价逐步向高价靠拢），而不是大幅跳空或剧烈波动。 委买委卖比：在竞价最后时刻（9:20-9:25），委买委托量显著大于委卖委托量，表明买方意愿强烈。 板块联动效应：同一板块中有多只个股同时出现竞价异动，这通常是板块性机会的信号。 二、复盘数据准备 要执行这套策略，你需要准备以下数据源（均为公开数据，可以通过通达信、同花顺等软件的竞价复盘功能获取）：\n每日集合竞价明细数据：包括9:15、9:20、9:25这三个关键时间点的价格和成交量。 前5个交易日的分时成交数据：用于计算均量、价格波动范围等基准值。 板块指数数据：用于识别当日强势板块。 三、具体的复盘步骤 以下是每日收盘后，我用来筛选个股的完整复盘流程：\n初筛：竞价量比 \u0026gt; 2 从全市场股票中，筛选出当日竞价成交量（通常取9:25的成交量）与过去5日同期平均成交量的比值大于2的个股。\n次筛：价格形态健康 从初筛结果中，剔除以下类型的股票：\n竞价涨幅超过5%（防止追高被套）。 竞价振幅超过8%（波动过大，风险较高）。 价格呈现逐级下行（从高价向低价靠拢）的股票。 终筛：板块共振确认 检查经过前两步筛选的股票，是否属于当日涨幅榜前三的板块。如果是，则该股票进入“重点关注池”。\n人工复核 对重点关注池中的每一只股票，快速查看其近期的K线形态和基本面信息（如是否有利空公告、业绩预告等），排除明显有雷的个股。\n四、策略的回测表现 根据我近一年的回测数据（回测时间：2025年8月 - 2026年7月），该策略的表现如下：\n胜率：58.7%（以次日开盘价买入，次日收盘价卖出来计算） 平均收益率：+2.3% 最大回撤：-5.8% 总交易次数：346次 市场环境 胜率 平均收益率 震荡市（2025/08 - 2026/03） 62.1% +3.2% 下跌市（2026/04 - 2026/07） 52.3% +0.8% 上涨市（2026/07 - 2026/08） 71.4% +5.6% 可以看出，该策略在震荡市和上涨市中表现优异，在系统性下跌中也能控制亏损。\n五、使用须知与风险提示 本策略不构成投资建议，所有数据回测结果仅为历史统计，不代表未来表现。 策略的执行需要严格的纪律性，避免在实盘中因为情绪而修改筛选标准。 建议将本策略作为选股辅助工具，结合自身的交易系统和风险承受能力来使用。 策略参数（如竞价量比阈值2，涨幅阈值5%）需要根据市场环境进行动态调整。例如在牛市中可以适当放宽，在熊市中则需要更加严格。 六、策略改进方向 本策略仍有以下改进空间，未来我会持续优化：\n引入深度数据：将Level2数据中的逐笔委托明细纳入分析，更精准地识别主力行为。 结合市场情绪指标：加入涨跌家数比、昨日涨停股今日表现等情绪因子，过滤掉情绪冰点期的噪音信号。 实现自动化交易：通过券商API接口，将信号生成与交易执行打通。 希望这套竞价复盘策略能为你的股票交易提供一些有价值的参考。记住，任何策略都只是工具，最终的决策和风险控制，都需要你自己来负责。\n如果你有任何疑问或改进建议，欢迎在评论区留言讨论。\n","date":"2026-08-06T00:00:00Z","permalink":"/post/stock-auction-review-strategy/","title":"股票竞价复盘策略：从数据中寻找次日强势股"},{"content":"Hugo Shortcodes 是在 Markdown 中嵌入特殊组件的方式。本文展示所有自定义 Shortcode 的实际渲染效果。\n标题分割线 (title) 适合日记、健身记录、学习笔记等需要分段小标题的内容。\n用法：\n{{\u0026lt; title \u0026#34;标题文字\u0026#34; \u0026#34;颜色\u0026#34; \u0026gt;}} 实际效果——不同颜色展示：\n绿色标题 这是绿色分割线下的内容，适合运动、健康类记录。\n蓝色标题 这是蓝色分割线下的内容，适合技术、学习类记录。\n橙色标题 这是橙色分割线下的内容，适合创意、设计类记录。\n紫色标题 这是紫色分割线下的内容，适合日记、随笔类记录。\n自定义颜色 #E91E63 也可以直接使用十六进制颜色值。\n时间线 (timeline) 适合展示个人经历、项目里程碑、技术成长轨迹等。\n用法：\n{{\u0026lt; timeline \u0026gt;}} {{\u0026lt; timeline-item date=\u0026#34;2024-01\u0026#34; \u0026gt;}} 内容... {{\u0026lt; /timeline-item \u0026gt;}} {{\u0026lt; /timeline \u0026gt;}} 实际效果：\n2024-01\n开始学习 Hugo，了解静态博客的优势与生态。 2024-06\n博客正式上线，发布第一篇技术文章，收获了第一批读者。 2025-01\n引入 Waline 评论系统，与读者建立互动，评论区逐渐活跃。 2025-09\n对博客主题进行美化改造，添加 Mac 风格代码块、Stats 统计页等功能。 时间线内容支持完整 Markdown，如 粗体、行内代码、链接 等。\n代码块功能（主题增强） 代码块本身不是 Shortcode，但本模板对其进行了增强：\n复制按钮 每个代码块右上角都有复制按钮（在代码块的 macOS 顶栏内）：\n// 点击右上角的复制按钮试试 function greet(name) { return `Hello, ${name}!`; } console.log(greet(\u0026#34;Hugo\u0026#34;)); 自动折叠长代码 超过 600px 高度的代码块会自动折叠，底部出现「展开代码」按钮。这是一段用于测试折叠功能的长代码：\n# 这段代码足够长，会触发自动折叠 import os import sys import json import time import datetime class BlogStats: def __init__(self, posts_dir: str): self.posts_dir = posts_dir self.posts = [] self.total_words = 0 self.categories = {} self.tags = {} def scan_posts(self): \u0026#34;\u0026#34;\u0026#34;扫描所有文章目录\u0026#34;\u0026#34;\u0026#34; for root, dirs, files in os.walk(self.posts_dir): for file in files: if file.endswith(\u0026#39;.md\u0026#39;): filepath = os.path.join(root, file) self.parse_post(filepath) def parse_post(self, filepath: str): \u0026#34;\u0026#34;\u0026#34;解析单篇文章的 front matter\u0026#34;\u0026#34;\u0026#34; with open(filepath, \u0026#39;r\u0026#39;, encoding=\u0026#39;utf-8\u0026#39;) as f: content = f.read() # 提取 front matter if content.startswith(\u0026#39;---\u0026#39;): end = content.find(\u0026#39;---\u0026#39;, 3) if end \u0026gt; 0: front_matter = content[3:end].strip() body = content[end+3:].strip() self.total_words += len(body.split()) self.parse_front_matter(front_matter) def parse_front_matter(self, front_matter: str): \u0026#34;\u0026#34;\u0026#34;解析 YAML front matter\u0026#34;\u0026#34;\u0026#34; for line in front_matter.split(\u0026#39;\\n\u0026#39;): if line.startswith(\u0026#39;categories:\u0026#39;): pass # 简化处理 elif line.startswith(\u0026#39;tags:\u0026#39;): pass # 简化处理 elif line.startswith(\u0026#39; - \u0026#39;): tag = line.strip().lstrip(\u0026#39;- \u0026#39;) self.tags[tag] = self.tags.get(tag, 0) + 1 def get_report(self) -\u0026gt; dict: \u0026#34;\u0026#34;\u0026#34;生成统计报告\u0026#34;\u0026#34;\u0026#34; return { \u0026#39;total_posts\u0026#39;: len(self.posts), \u0026#39;total_words\u0026#39;: self.total_words, \u0026#39;categories\u0026#39;: sorted( self.categories.items(), key=lambda x: x[1], reverse=True ), \u0026#39;tags\u0026#39;: sorted( self.tags.items(), key=lambda x: x[1], reverse=True )[:20], } if __name__ == \u0026#39;__main__\u0026#39;: stats = BlogStats(\u0026#39;./content/post\u0026#39;) stats.scan_posts() report = stats.get_report() print(json.dumps(report, ensure_ascii=False, indent=2)) 如何创建自己的 Shortcode 在 layouts/shortcodes/ 下新建 HTML 文件即可。例如创建 badge.html：\n\u0026lt;!-- layouts/shortcodes/badge.html --\u0026gt; \u0026lt;span style=\u0026#34; display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; background: {{ .Get 1 | default `var(--accent-color)` }}; color: {{ .Get 2 | default `#fff` }}; \u0026#34;\u0026gt;{{ .Get 0 }}\u0026lt;/span\u0026gt; 使用：{{\u0026lt; badge \u0026quot;New\u0026quot; \u0026quot;#059669\u0026quot; \u0026gt;}}\n","date":"2026-04-14T00:00:00Z","permalink":"/post/shortcodes-guide/","title":"Shortcodes 使用指南"},{"content":"本模板的样式系统基于 SCSS，所有自定义样式都在 assets/scss/ 目录下，不需要修改主题源文件。\n修改主题色 打开 assets/scss/custom.scss，修改 :root 中的 CSS 变量：\n:root { /* 亮色模式 */ --accent-color: #1B365D; /* 主色调：按钮、链接、高亮 */ --accent-color-darker: #202A44; /* 主色调深色版：hover 状态 */ --accent-color-text: #FFF; /* 主色调上的文字颜色 */ --body-background: #f8f7f2; /* 页面背景 */ --card-background: #fdfdfb; /* 卡片背景 */ --body-text-color: #2D3748; /* 正文文字颜色 */ \u0026amp;[data-scheme=\u0026#34;dark\u0026#34;] { /* 暗色模式覆盖 */ --body-background: #101214; --card-background: #1c2128; /* ... */ } } 保存后 Hugo 自动重新编译，浏览器立即刷新。\n常用配色方案参考 紫色系：\n--accent-color: #7C3AED; --accent-color-darker: #6D28D9; 绿色系：\n--accent-color: #059669; --accent-color-darker: #047857; 橙色系：\n--accent-color: #EA580C; --accent-color-darker: #C2410C; 修改代码块样式 代码块相关样式在 assets/scss/partials/custom-components/_code.scss。\n关闭 Mac 风格顶栏 如果不喜欢 macOS 三色圆点，注释掉以下代码：\n/* 注释掉这个 before 伪元素即可关闭顶栏 */ /* .article-content .highlight:before { ... } */ 修改折叠阈值 在 _code.scss 和 layouts/_partials/footer/custom.html 中，将 600 改为你想要的像素值：\n/* _code.scss */ \u0026amp;.collapsed { max-height: 400px; /* 改为你想要的高度 */ } /* custom.html 中的 JS */ const MAX_HEIGHT = 400; /* 与 CSS 保持一致 */ 添加自定义字体 在 assets/scss/custom.scss 中添加 Google Fonts 并设置字体：\n/* 引入字体 */ @import url(\u0026#39;https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700\u0026amp;display=swap\u0026#39;); /* 应用到正文 */ body { font-family: \u0026#39;Noto Serif SC\u0026#39;, serif; } /* 应用到文章内容 */ .article-content { font-family: \u0026#39;Noto Serif SC\u0026#39;, serif; line-height: 1.9; } 注意：国内访问 Google Fonts 可能较慢，可以考虑使用 jsDelivr 加速或自托管字体。\n组件样式文件说明 文件 作用 custom.scss 全局变量、TOC 滚动条 _code.scss 代码块全部样式 _footer.scss Footer 运行时长按钮 _homepage-grid.scss 首页双栏网格 _mobile-menu.scss 移动端顶部导航栏 _timeline.scss 时间线 Shortcode 样式 _title.scss 标题分割线 Shortcode 样式 每个文件职责单一，可以独立修改，不互相影响。\n关闭首页网格布局 如果偏好传统的单列列表，编辑 params.toml：\n[homepage] grid = false 覆盖主题布局 如果需要修改主题的其他布局文件，在 layouts/ 目录下创建同名文件即可覆盖：\n例如，要修改文章页布局，在 hugo-theme-stack-v4/layouts/single.html 中查看原文件，然后复制到 layouts/single.html 并修改。\nHugo 的覆盖机制会优先使用项目根目录下的同名文件，主题文件作为后备。\n","date":"2026-04-13T00:00:00Z","permalink":"/post/custom-style/","title":"样式自定义指南"},{"content":"Page bundles are an optional way to organize page resources within Hugo.\nYou can opt-in to using page bundles in Hugo Clarity with usePageBundles in your site configuration or in a page\u0026rsquo;s front matter. Read more about usePageBundles.\nWith page bundles, resources for a page or section, like images or attached files, live in the same directory as the content itself rather than in your static directory.\nHugo Clarity supports the use of leaf bundles, which are any directories within the content directory that contain an index.md file. Hugo\u0026rsquo;s documentation gives this example:\ncontent ├── about │ ├── index.md ├── posts │ ├── my-post │ │ ├── content1.md │ │ ├── content2.md │ │ ├── image1.jpg │ │ ├── image2.png │ │ └── index.md │ └── my-other-post │ └── index.md │ └── another-section ├── .. └── not-a-leaf-bundle ├── .. └── another-leaf-bundle └── index.md In the above example `content` directory, there are four leaf bundles: about: This leaf bundle is at the root level (directly under content directory) and has only the index.md.\nmy-post: This leaf bundle has the index.md, two other content Markdown files and two image files. image1 is a page resource of my-post and only available in my-post/index.md resources. image2 is a page resource of my-post and only available in my-post/index.md resources.\nmy-other-post: This leaf bundle has only the index.md.\nanother-leaf-bundle: This leaf bundle is nested under couple of directories. This bundle also has only the index.md.\nThe hierarchy depth at which a leaf bundle is created does not matter, as long as it is not inside another leaf bundle.\nAdvantages to using page bundles The image below is part of the bundle of this page, and is located at content/post/bundle/building.png. Because it\u0026rsquo;s within this page\u0026rsquo;s bundle, the markup for the image only has to specify the image\u0026rsquo;s filename, building.png.\nIf you ever change the name of the directory in which this Markdown file and the image reside, the reference to the image would not need to be updated.\nIn addition to more cleanly organizing your content and related assets, when using page bundles, Hugo Clarity will automatically generate markup for modern image formats, which are smaller in file size.\nFor instance, when you reference an image like building.png, Hugo Clarity will check to see if the same image (based on filename) exists in WebP, AVIF or JXL formats. If you inspect the image above, you\u0026rsquo;ll see a \u0026lt;source\u0026gt; element for building.webp, because that file is also present. Hugo Clarity will only include the markup if these images exist.\nBrowsers that support these formats and the \u0026lt;picture\u0026gt; element will load them, while browsers that do not will fall-back to the default image. Read more about this process.\nFinally, note that page assets can be further managed and refined within the page\u0026rsquo;s front matter if you wish, and are not limited to images alone.\nDisadvantages to using page bundles Page resources in a bundle are only available to the page with which they are bundled — that means you can\u0026rsquo;t include an image with one page and then reference it from another.\nImages that are being used in multiple places are more appropriate for your Hugo assets directory. Unlike files in the Hugo static directory, files in the assets directory can be run through Hugo Pipes, which includes image processing.\n","date":"2022-03-24T00:00:00Z","permalink":"/post/bundle/","title":"Using Hugo page bundles"},{"content":" ","date":"2022-02-14T00:00:00Z","permalink":"/post/map/","title":"Using OpenStreetMap"},{"content":"The \u0026ldquo;Notices\u0026rdquo; shortcode enables you to call out pieces of information - sidebars, warnings, tips, etc.\nTo create a notice on a page, you can use the notice shortcode.\nYou use the notice shortcode, with the first parameter being one of note, info, tip, and warning. Then add a title for your note in quotes as the second parameter. The inner body of the note can be whatever markdown you want to create.\nThe following shortcode syntax within a markdown doc:\n{{% notice note \u0026#34;Note\u0026#34; %}} This is a standard \u0026#34;note\u0026#34; style. {{% /notice %}} will render as:\nnote\nThis is a standard \u0026ldquo;note\u0026rdquo; style. The other three variants follow.\ninfo\nHere is the \u0026ldquo;info\u0026rdquo; style. tip\nHere is a \u0026ldquo;tip\u0026rdquo; variant of a notice. warning\nHere is the \u0026ldquo;warning\u0026rdquo; flavor of a notice. Also note that the content of a notice can contain anything you could put on a normal page - as shown below:\ntip\nThis is a notice that has a lot of various kinds of content in it.\nHere is a bulleted list With more than one bullet And even more than one level Code blocks are fine here, too\u0026hellip;.\npublic void SayHello() { Console.WriteLine(\u0026#34;Hello, world!\u0026#34;); } tip\nIf you\u0026rsquo;re using VS Code for your editing, copy the .vscode\\clarity.code-snippets file into a .vscode root folder on your repo. This will enable you to type note then \u0026lt;tab\u0026gt; then choose with up/down arrows which flavor notice you want, then \u0026lt;tab\u0026gt; again to provide a title, then \u0026lt;tab\u0026gt; to add your content!\nTo use the snippet, you need to first enable quickSuggestions for Markdown (one time only):\nGo to Preferences-\u0026gt;Settings then search for quickSuggestions Follow the link to Edit in settings.json Toward the bottom of the file, paste in the following JSON: \u0026#34;[markdown]\u0026#34;: { \u0026#34;editor.quickSuggestions\u0026#34;: true } Close and save the settings. ","date":"2021-08-20T00:00:00Z","permalink":"/post/notices/","title":"Using Notices"},{"content":"Este artigo oferece um exemplo básico de uma tradução em Português. O restante conteúdo não foi traduzido.\nArtigo original: https://www.newsun.cloud/post/markdown-syntax/\nThis article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.\nHeadings The following HTML \u0026lt;h1\u0026gt;—\u0026lt;h6\u0026gt; elements represent six levels of section headings. \u0026lt;h1\u0026gt; is the highest section level while \u0026lt;h6\u0026gt; is the lowest.\nH1 H2 H3 H4 H5 H6 Paragraph Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.\nItatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.\nImages Local image, alt text as caption The following image is located within the Hugo site. Because it has alt text but no title text, the caption is generated by the alt text.\nRemote image, specified caption The following image is loaded from a remote URL. The alt text is the same (for screen readers and in cases when the image doesn\u0026rsquo;t load) but because a separate title is provided, the title is used for the caption:\nImage with alt text and no caption Alt text is always recommended for SEO, accessibility and in cases when images don\u0026rsquo;t load. However, you don\u0026rsquo;t necessarily always want an image to have a caption. In that case, use a title with one space:\nBlockquotes The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations.\nBlockquote without attribution Tiam, ad mint andaepu dandae nostion secatur sequo quae. Note that you can use Markdown syntax within a blockquote.\nBlockquote with attribution Don\u0026rsquo;t communicate by sharing memory, share memory by communicating.\n— Rob Pike1\nTables Tables aren\u0026rsquo;t part of the core Markdown spec, but Hugo supports supports them out-of-the-box.\nName Age Bob 27 Alice 23 Inline Markdown within tables Italics Bold Code italics bold code Code Blocks Code block with backticks \u0026lt;!doctype html\u0026gt; \u0026lt;html lang=\u0026#34;en\u0026#34;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026#34;utf-8\u0026#34;\u0026gt; \u0026lt;title\u0026gt;Example HTML5 Document\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;Test\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;!-- this line is extraneous 2Error from server (Forbidden): deployments.apps is forbidden: User \u0026#34;chiptest\u0026#34; cannot create resource \u0026#34;deployments\u0026#34; in API group \u0026#34;apps\u0026#34; in the namespace \u0026#34;default\u0026#34; --\u0026gt; \u0026lt;/html\u0026gt; Code block indented with four spaces \u0026lt;!doctype html\u0026gt; \u0026lt;html lang=\u0026quot;en\u0026quot;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026quot;utf-8\u0026quot;\u0026gt; \u0026lt;title\u0026gt;Example HTML5 Document\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;Test\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; Code block with Hugo\u0026rsquo;s internal highlight shortcode \u0026lt;!doctype html\u0026gt; \u0026lt;html lang=\u0026#34;en\u0026#34;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026#34;utf-8\u0026#34;\u0026gt; \u0026lt;title\u0026gt;Example HTML5 Document\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;Test\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; List Types Ordered List First item Second item Third item Unordered List List item Another item And another item Nested list Fruit Apple Orange Banana Dairy Milk Cheese Other Elements — abbr, sub, sup, kbd, mark GIF is a bitmap image format.\nH2O\nXn + Yn = Zn\nPress CTRL+ALT+Delete to end the session.\nMost salamanders are nocturnal, and hunt for insects, worms, and other small creatures.\nThe above quote is excerpted from Rob Pike\u0026rsquo;s talk during Gopherfest, November 18, 2015.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"2019-03-11T00:00:00Z","permalink":"/post/markdown-syntax.pt/","title":"Guia de Sintaxe Markdown"},{"content":"This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.\nHeadings The following HTML \u0026lt;h1\u0026gt;—\u0026lt;h6\u0026gt; elements represent six levels of section headings. \u0026lt;h1\u0026gt; is the highest section level while \u0026lt;h6\u0026gt; is the lowest.\nH1 H2 H3 H4 H5 H6 Paragraph Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.\nItatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.\nImages Local image, alt text as caption The following image is located within the Hugo site. Because it has alt text but no title text, the caption is generated by the alt text.\nRemote image, specified caption The following image is loaded from a remote URL. The alt text is the same (for screen readers and in cases when the image doesn\u0026rsquo;t load) but because a separate title is provided, the title is used for the caption:\nImage with alt text and no caption Alt text is always recommended for SEO, accessibility and in cases when images don\u0026rsquo;t load. However, you don\u0026rsquo;t necessarily always want an image to have a caption. In that case, use a title with one space:\nBlockquotes The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations.\nBlockquote without attribution Tiam, ad mint andaepu dandae nostion secatur sequo quae. Note that you can use Markdown syntax within a blockquote.\nBlockquote with attribution Don\u0026rsquo;t communicate by sharing memory, share memory by communicating.\n— Rob Pike1\nTables Tables aren\u0026rsquo;t part of the core Markdown spec, but Hugo supports supports them out-of-the-box.\nName Age Bob 27 Alice 23 Inline Markdown within tables Italics Bold Code italics bold code Code Blocks Code block with backticks \u0026lt;!doctype html\u0026gt; \u0026lt;html lang=\u0026#34;en\u0026#34;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026#34;utf-8\u0026#34;\u0026gt; \u0026lt;title\u0026gt;Example HTML5 Document\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;Test\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;!-- this line is extraneous 2Error from server (Forbidden): deployments.apps is forbidden: User \u0026#34;chiptest\u0026#34; cannot create resource \u0026#34;deployments\u0026#34; in API group \u0026#34;apps\u0026#34; in the namespace \u0026#34;default\u0026#34; --\u0026gt; \u0026lt;/html\u0026gt; Code block indented with four spaces \u0026lt;!doctype html\u0026gt; \u0026lt;html lang=\u0026quot;en\u0026quot;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026quot;utf-8\u0026quot;\u0026gt; \u0026lt;title\u0026gt;Example HTML5 Document\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;Test\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; Code block with Hugo\u0026rsquo;s internal highlight shortcode \u0026lt;!doctype html\u0026gt; \u0026lt;html lang=\u0026#34;en\u0026#34;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026#34;utf-8\u0026#34;\u0026gt; \u0026lt;title\u0026gt;Example HTML5 Document\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;Test\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; List Types Ordered List First item Second item Third item Unordered List List item Another item And another item Nested list Fruit Apple Orange Banana Dairy Milk Cheese Other Elements — abbr, sub, sup, kbd, mark GIF is a bitmap image format.\nH2O\nXn + Yn = Zn\nPress CTRL+ALT+Delete to end the session.\nMost salamanders are nocturnal, and hunt for insects, worms, and other small creatures.\nThe above quote is excerpted from Rob Pike\u0026rsquo;s talk during Gopherfest, November 18, 2015.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"2019-03-11T00:00:00Z","permalink":"/post/markdown-syntax/","title":"Markdown Syntax Guide"},{"content":"Hugo ships with several Embedded Shortcodes for rich content, along with a Privacy Config and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.\nInstagram Simple Shortcode YouTube Privacy Enhanced Shortcode X Simple Shortcode Owl bet you\u0026#39;ll lose this staring contest 🦉 pic.twitter.com/eJh4f2zncC\n\u0026mdash; San Diego Zoo Wildlife Alliance (@sandiegozoo) October 26, 2021 See shortcode documentation for more details.\nVimeo Simple Shortcode ","date":"2019-03-10T00:00:00Z","permalink":"/post/rich-content/","title":"Rich Content"},{"content":"Lorem est tota propiore conpellat pectoribus de pectora summo.\nRedit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.\nExierant elisi ambit vivere dedere Duce pollice Eris modo Spargitque ferrea quos palude Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.\nComas hunc haec pietate fetum procerum dixit Post torum vates letum Tiresia Flumen querellas Arcanaque montibus omnes Quidem et Vagus elidunt The Van de Graaf Canon\nMane refeci capiebant unda mulcebat Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. Faces illo pepulere tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.\nIubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.\nEurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel mitis temploque vocatus, inque alis, oculos nomen non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides parte.\n","date":"2019-03-09T00:00:00Z","permalink":"/post/placeholder-text/","title":"Placeholder Text"},{"content":"Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.\nIn this example we will be using KaTeX\nCreate a partial under /layouts/partials/hooks/head-end.html Add these lines to the newly created partial: {{ if or .Params.math .Site.Params.math }} {{ partial \u0026#34;math.html\u0026#34; . }} {{ end }} To enable KaTeX globally set the parameter math to true in a project\u0026rsquo;s configuration To enable KaTeX on a per page basis include the parameter math: true in content files Note: Use the online reference of Supported TeX Functions\nExamples Block math: $$ \\varphi = 1+\\frac{1} {1+\\frac{1} {1+\\frac{1} {1+\\cdots} } } $$","date":"2019-03-08T00:00:00Z","permalink":"/post/math-typesetting/","title":"Math Typesetting"},{"content":"Emoji can be enabled in a Hugo project in a number of ways.\nThe emojify function can be called directly in templates or Inline Shortcodes.\nTo enable emoji globally, set enableEmoji to true in your site\u0026rsquo;s configuration and then you can type emoji shorthand codes directly in content files; e.g.\n🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:\nThe Emoji cheat sheet is a useful reference for emoji shorthand codes.\nN.B. The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.\n.emoji { font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; }","date":"2019-03-05T00:00:00Z","permalink":"/post/emoji-support/","title":"Emoji Support"}]