前言
搭建步骤
- 以管理员的身份打开cmd

| |
| powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" |
| |
| |
| SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin |
| |
| |
| choco install hugo -confirm |
| |
| |
| hugo version |
| |
| |
| hugo new site hugo |
| |
| |
| cd <YOUR Bolg Root Dir> |
| git clone https://github.com/flysnow-org/maupassant-hugo themes/maupassant |
| |
| |
| |
| hugo server |
| |

| hugo new post/filename.md |
| |
| |
| draft: true |
| |
| |
| |
| --- |
| title: "Hugo+manpassant搭建博客" |
| author: "作者" |
| description : "描述信息" |
| date: 2021-12-04T10:57:09+08:00 |
| lastmod: 2021-12-05 |
| draft: false |
| tags: |
| - Hugo |
| - Markdown |
| categories: |
| - 博客搭建 |
| keywords: |
| - Hugo |
| next: /chnq/github-pages-blog |
| prev: /chnq/automated-deployments |
| --- |
| |
| |
| |
| baseURL = "https://chnq.github.io" |
| languageCode = "zh-CN" |
| title = "chnq" |
| theme = "maupassant" |
| |
| paginate = 10 |
| |
| summaryLength = 70 |
| [author] |
| name = "chnq" |
| |
| [[params.links]] |
| title = "c03的博客" |
| name = "c03的博客" |
| url = "https://www.cnblogs.com/chniny/" |
| |
| [[params.ads]] |
| title = "【2019双12】ALL IN CLoud 低至1折" |
| url = "https://www.aliyun.com/minisite/goods?userCode=jdg9oj97&share_source=copy_link" |
| img = "https://img.alicdn.com/tfs/TB1_rYHo7P2gK0jSZPxXXacQpXa-690-388.jpg" |
| |
| [params.cc] |
| name = "知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议" |
| link = "https://creativecommons.org/licenses/by-nc-nd/4.0/" |
| |
| [menu] |
| [[menu.main]] |
| identifier = "tags" |
| name = "标签" |
| url = "/tags/" |
| weight = 2 |
| [[menu.main]] |
| identifier = "categories" |
| name = "分类" |
| url = "/categories/" |
| weight = 3 |
| [[menu.main]] |
| identifier = "archives" |
| name = "归档" |
| url = "/archives/" |
| weight = 4 |
| |
| |
| |
| |
| |
| --- |
| title: "标签" |
| description: "标签页面" |
| type: "tags" |
| --- |
| |
| --- |
| title: "分类" |
| description: "分类页面" |
| type: "categories" |
| --- |
| |
| --- |
| title: "归档" |
| description: "归档页面" |
| type: "archives" |
| --- |
| |
| |
| |
| |
| --- |
| title: "搜索" |
| description: "搜索页面" |
| type: "search" |
| --- |
| |
| |
部署
- 在github新建一个仓库,格式为
账户名.github.io
| # 进入本地博客文件夹根目录,编译文章 |
| hugo |
| |
| # 进入public目录,初始化仓库 |
| git init |
| |
| # 初始化本地仓库后时master分支,需切换为与github上相同的main分支 |
| git branch -M main |
| |
| # 将所有内容添加到git |
| git add . |
| |
| # 暂存文件时,报错:warning: LF will be replaced by CRLF in ** |
| git config core.autocrlf false |
| |
| # 提交到git本地 |
| git commit -m "博客初始化" |
| |
| # 关联到远程git |
| git remote add origin git@github.com:chnq/chnq.github.io.git |
| |
| # 推送到远程git |
| git push -u origin master |
| |
编写文章
| |
| |
|  |
| |
点击查看详情
| <dependencies> |
| <dependency> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-starter</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-starter-test</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-starter-web</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-maven-plugin</artifactId> |
| <configuration> |
| <excludes> |
| <exclude> |
| <groupId>org.projectlombok</groupId> |
| <artifactId>lombok</artifactId> |
| </exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| server: |
| port: 8080 |
| |
| spring: |
| application: |
| name: mybatisdemo |
| datasource: |
| type: com.alibaba.druid.pool.DruidDataSource |
| driver-class-name: com.mysql.cj.jdbc.Driver |
| url: jdbc:mysql://192.168.0.102:3306/mybatisdemo?characterEncoding=utf-8&serverTimezone=UTC |
| username: root |
| password: 123456 |
| mvc: |
| view: |
| suffix: ".html" |
| |
| mybatis: |
| configuration: |
| map-underscore-to-camel-case: true |
| mapperLocations: classpath:mapper/*.xml |
| |
| logging: |
| level: |
| com: |
| chnq: |
| mybatisdomo: debug |
| import org.mybatis.spring.annotation.MapperScan; |
| import org.springframework.boot.SpringApplication; |
| import org.springframework.boot.autoconfigure.SpringBootApplication; |
| |
| @SpringBootApplication |
| @MapperScan("com.chnq.mybatisdemo.mapper") |
| public class MybatisDemoApplication { |
| |
| public static void main(String[] args) { |
| SpringApplication.run(MybatisDemoApplication.class, args); |
| } |
| |
| } |
| |
| let a: number; |
| a = 123; |
| |
| let b: String = 'hello'; |
| |
| let c = false; |
| |
| |
| function sum(a: number, b: number): number{ |
| return a + b; |
| } |
| |
| html, body, #app{ |
| height: 100%; |
| margin: 0; |
| padding: 0; |
| } |
| <table border="1"> |
| <tr> |
| <td>row 1, cell 1</td> |
| <td>row 1, cell 2</td> |
| </tr> |
| <tr> |
| <td>row 2, cell 1</td> |
| <td>row 2, cell 2</td> |
| </tr> |
| </table> |
一支穿云箭,千军万马来相见;
bug
- [标签、分页、归档]这三个子菜单存在问题,在博客根目录
config.toml
中配置如下属性,参考
| [taxonomies] |
| tag = "tags" |
| category = "categories" |
| archives = "archives" |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术