Skip to content

VitePress 基础

代码高亮

js
export default { // Highlighted
  data () {
    return {
      msg: `Highlighted!
      This line isn't highlighted,
      but this and the next 2 are.`,
      motd: 'VitePress is awesome',
      lorem: 'ipsum'
    }
  }
}

代码块聚焦

js
export default {
  data() {
    return {
      msg: "Focused!", 
    };
  },
};

代码块中的颜色差异

js
export default {
  data () {
    return {
      msg: 'Removed'
      msg: 'Added'
    }
  }
}
js
export default {
  data() {
    return {
      msg: "Error", 
      msg: "Warning", 
    };
  },
};

自定义容器

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

点我查看代码
js
console.log("Hello, VitePress!");

表格

TablesAreCool
col 3 isright-aligned$1600
col 2 iscentered$12
zebra stripesare neat$1

GitHub 风格的警报

更新时间:2024 年

哈哈

强调用户在快速浏览文档时也不应忽略的重要信息。

TIP

有助于用户更顺利达成目标的建议性信息。

IMPORTANT

对用户达成目标至关重要的信息。

WARNING

因为可能存在风险,所以需要用户立即关注的关键内容。

CAUTION

行为可能带来的负面影响。

使用 vue 组件

js
<script setup>
import { ref } from 'vue'

const count = ref(0)
</script>

The count is: {{ count }}

<button :class="$style.button" @click="count++">Increment</button>

<style module>
.button {
  color: red;
  font-weight: bold;
}
</style>

The count is: 0

徽章

后端技术栈

Spring  Spring Boot  MySQL  MariaDB  PostgreSQL  Oracle  Microsoft SQL Server  Redis  MongoDB  RabbitMQ  Solr  ElasticSearch  Logstash  Kibana  Kafka  Consul  Tomcat  JUnit5  Liquibase  Maven  Gradle  Spring Security  Hibernate  JSON  JWT  Java  Python  Android  Go  GraphQL 

前端技术栈

Vue3  TypeScript  Ant Design  Node.js  Vite  Webpack  NPM  Axios  ESLint  jQuery  BootStrap  ECharts  JavaScript  HTML5  CSS3  Tailwind CSS  Less 

DevOps

Git  GitHub  Gitee  gitlab  GitHub Actions  Jenkins  SonarQube  Docker  Harbor  Kubernetes  CentOS  Ubuntu 

运维技术栈

阿里云  Nginx  VMware  Prometheus  Grafana  Ansible  Lua 

测试技术栈

Postman  JMeter 

开发工具

Intellij IDEA  Eclipse  WebStorm  PyCharm  Android Studio  VSCode 

其他

Markdown  WordPress  GitHub Pages  Adobe Photoshop 

Check out the documentation for the full list of markdown extensions.