diff --git a/.gitignore b/.gitignore index 0ea0392..bad9162 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,15 @@ # Node modules **/node_modules/** -# Build files -docs-shared/lib/ -packages/*/lib/ - # Vuepress Cache **/.vuepress/.cache/** # Vuepress Temp **/.vuepress/.temp/** # Vuepress Output -#dist/ +**/.vuepress/dist/ # npm config .npmrc -# Typescript build info -*.tsbuildinfo - -# Coverage Files -coverage/ - # macOS .DS_Store diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3737648 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +# Node modules +**/node_modules/** + +# Vuepress Cache +**/.vuepress/.cache/** +# Vuepress Temp +**/.vuepress/.temp/** +# Vuepress Output +**/.vuepress/dist/ diff --git a/package.json b/package.json index c4e7fdb..4da21d3 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,16 @@ "docs:build": "vuepress build src", "docs:clean-dev": "vuepress dev src --clean-cache", "docs:dev": "vuepress dev src", + "docs:lint": "prettier --check --write src", "docs:update-package": "npx vp-update" }, "packageManager": "pnpm@8.11.0", + "prettier": { + "singleQuote": false + }, + "dependencies": { + "prettier": "^3.1.0" + }, "devDependencies": { "@vuepress/bundler-vite": "2.0.0-rc.0", "@vuepress/client": "2.0.0-rc.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 883c62b..1c8dac5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +dependencies: + prettier: + specifier: ^3.1.0 + version: 3.1.0 + devDependencies: '@vuepress/bundler-vite': specifier: 2.0.0-rc.0 @@ -4778,6 +4783,12 @@ packages: source-map-js: 1.0.2 dev: true + /prettier@3.1.0: + resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + engines: {node: '>=14'} + hasBin: true + dev: false + /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} diff --git a/src/.vuepress/navbar/en.ts b/src/.vuepress/navbar/en.ts index 69879b7..b0dd002 100644 --- a/src/.vuepress/navbar/en.ts +++ b/src/.vuepress/navbar/en.ts @@ -1,25 +1,25 @@ -import {navbar} from "vuepress-theme-hope"; +import { navbar } from "vuepress-theme-hope"; export const enNavbar = navbar([ - "/", - "/guide/", - "/tutorial/", - { - text: "Reference", - icon: "lightbulb", - prefix: "/reference/", - children: ["test", - "resources", - "documents", - "development_log" - ], - }, - { - text: "More", - icon: "lightbulb", - prefix: "/more/", - children: [ - "collaborative_projects", 'license', 'thanks', "contact", "use_cases" - ], - }, + "/", + "/guide/", + "/tutorial/", + { + text: "Reference", + icon: "lightbulb", + prefix: "/reference/", + children: ["test", "resources", "documents", "development_log"], + }, + { + text: "More", + icon: "lightbulb", + prefix: "/more/", + children: [ + "collaborative_projects", + "license", + "thanks", + "contact", + "use_cases", + ], + }, ]); diff --git a/src/.vuepress/navbar/zh.ts b/src/.vuepress/navbar/zh.ts index fcb7364..b96ae00 100644 --- a/src/.vuepress/navbar/zh.ts +++ b/src/.vuepress/navbar/zh.ts @@ -1,24 +1,25 @@ -import {navbar} from "vuepress-theme-hope"; +import { navbar } from "vuepress-theme-hope"; export const zhNavbar = navbar([ - "/zh/", - "/zh/guide/", - "/zh/tutorial/", - { - text: "参考", - icon: "lightbulb", - prefix: "/zh/reference/", - children: ["test", - "resources", - "documents", "development_log" - ], - }, - { - text: "了解更多", - icon: "laptop-code", - prefix: "/zh/more/", - children: [ - "collaborative_projects", 'license', 'thanks', "contact", "use_cases" - ], - }, + "/zh/", + "/zh/guide/", + "/zh/tutorial/", + { + text: "参考", + icon: "lightbulb", + prefix: "/zh/reference/", + children: ["test", "resources", "documents", "development_log"], + }, + { + text: "了解更多", + icon: "laptop-code", + prefix: "/zh/more/", + children: [ + "collaborative_projects", + "license", + "thanks", + "contact", + "use_cases", + ], + }, ]); diff --git a/src/.vuepress/sidebar/en.ts b/src/.vuepress/sidebar/en.ts index 03d3eb9..f92cd93 100644 --- a/src/.vuepress/sidebar/en.ts +++ b/src/.vuepress/sidebar/en.ts @@ -1,27 +1,28 @@ -import {sidebar} from "vuepress-theme-hope"; +import { sidebar } from "vuepress-theme-hope"; export const enSidebar = sidebar({ - "/": [ - "", - "tutorial/", - { - text: "Docs", - icon: "book", - prefix: "guide/", - children: "structure", - }, { - text: "Reference", - icon: "laptop-code", - prefix: "reference/", - link: "reference/", - children: "structure", - }, - { - text: "More", - icon: "laptop-code", - prefix: "more/", - link: "more/", - children: "structure", - }, - ], + "/": [ + "", + "tutorial/", + { + text: "Docs", + icon: "book", + prefix: "guide/", + children: "structure", + }, + { + text: "Reference", + icon: "laptop-code", + prefix: "reference/", + link: "reference/", + children: "structure", + }, + { + text: "More", + icon: "laptop-code", + prefix: "more/", + link: "more/", + children: "structure", + }, + ], }); diff --git a/src/.vuepress/sidebar/zh.ts b/src/.vuepress/sidebar/zh.ts index 637b7bc..09ff58b 100644 --- a/src/.vuepress/sidebar/zh.ts +++ b/src/.vuepress/sidebar/zh.ts @@ -1,27 +1,28 @@ -import {sidebar} from "vuepress-theme-hope"; +import { sidebar } from "vuepress-theme-hope"; export const zhSidebar = sidebar({ - "/zh/": [ - "", - "tutorial/", - { - text: "指南", - icon: "book", - prefix: "guide/", - children: "structure", - }, { - text: "参考", - icon: "laptop-code", - prefix: "reference/", - link: "reference/", - children: "structure", - }, - { - text: "了解更多", - icon: "laptop-code", - prefix: "more/", - link: "more/", - children: "structure", - }, - ], + "/zh/": [ + "", + "tutorial/", + { + text: "指南", + icon: "book", + prefix: "guide/", + children: "structure", + }, + { + text: "参考", + icon: "laptop-code", + prefix: "reference/", + link: "reference/", + children: "structure", + }, + { + text: "了解更多", + icon: "laptop-code", + prefix: "more/", + link: "more/", + children: "structure", + }, + ], }); diff --git a/src/.vuepress/styles/index.scss b/src/.vuepress/styles/index.scss index d4fe869..0af66c4 100644 --- a/src/.vuepress/styles/index.scss +++ b/src/.vuepress/styles/index.scss @@ -1,9 +1,10 @@ .vp-hero-info-wrapper { - width:100vw; + width: 100vw; background: url(/assets/image/bg.svg) center/cover no-repeat; } + @media (min-width: 768px) { - .vp-hero-info-wrapper { - height:100vh - } + .vp-hero-info-wrapper { + height: 100vh; + } } diff --git a/src/guide/install/install_zlmediakit_using_vcpkg.md b/src/guide/install/install_zlmediakit_using_vcpkg.md index 0df2985..56feaa4 100644 --- a/src/guide/install/install_zlmediakit_using_vcpkg.md +++ b/src/guide/install/install_zlmediakit_using_vcpkg.md @@ -2,11 +2,13 @@ title: Installing zlmediakit with vcpkg --- -# Introduction -vcpkg is a cross-platform SDK package management tool, similar to yum/apt on Linux and Homebrew on macOS. It supports multiple platforms such as Linux, macOS, and Windows, making it a powerful tool for C/C++ developers to manage dependencies. +## Introduction + +vcpkg is a cross-platform SDK package management tool, similar to yum/apt on Linux and Homebrew on macOS. It supports multiple platforms such as Linux, macOS, and Windows, making it a powerful tool for C/C++ developers to manage dependencies. Currently, zlmediakit has been added to vcpkg on August 8, 2023. Users can conveniently install zlmediakit C SDK and MediaServer executable program using vcpkg, resolving various compilation dependency-related issues. The inclusion of zlmediakit in vcpkg has received extensive support from [@JackBoosY](https://github.com/JackBoosY), and we express our sincere gratitude for that! -# Installation Guide +## Installation Guide + ## 1. Install vcpkg Taking Linux platform as an example: @@ -20,8 +22,6 @@ git clone https://github.com/microsoft/vcpkg > For specific instructions on different platforms, please refer to the [official documentation](https://github.com/microsoft/vcpkg/blob/master/README.md). - - ## 2. Install zlmediakit - Install dependencies first @@ -30,8 +30,6 @@ git clone https://github.com/microsoft/vcpkg sudo apt-get install pkg-config ``` - - - Install zlmediakit with default features ```bash @@ -39,24 +37,18 @@ git clone https://github.com/microsoft/vcpkg ./vcpkg/vcpkg install zlmediakit ``` - - - Install zlmediakit with all features (including webrtc datachannel) ```bash ./vcpkg/vcpkg install zlmediakit\[core,mp4,openssl,webrtc,sctp\] ``` - - - Install zlmediakit with minimum features ```bash ./vcpkg/vcpkg install zlmediakit\[core\] ``` - - - Uninstall zlmediakit ```bash @@ -64,8 +56,8 @@ git clone https://github.com/microsoft/vcpkg ``` - Installation path -![](/images/install_zlmediakit_using_vcpkg_1.png) -> The MediaServer process depends on config.ini, default.pem, www, and other related files, which can be copied from the source code. + ![](/images/install_zlmediakit_using_vcpkg_1.png) + > The MediaServer process depends on config.ini, default.pem, www, and other related files, which can be copied from the source code. ## 3. Install different versions @@ -75,8 +67,6 @@ git clone https://github.com/microsoft/vcpkg ./vcpkg/vcpkg help triplet ``` - - - Example for Linux ```bash @@ -111,6 +101,5 @@ git clone https://github.com/microsoft/vcpkg # Then install the dynamic library version ./vcpkg/vcpkg install zlmediakit\[core,mp4,openssl,webrtc,sctp\]:x64-linux-dynamic ``` -![install_zlmediakit_using_vcpkg_2](/images/install_zlmediakit_using_vcpkg_2.png) - + ![install_zlmediakit_using_vcpkg_2](/images/install_zlmediakit_using_vcpkg_2.png)