Revert "Deploy website - based on e4dceb38ef43734f267725d69df0492506ff7011"
This reverts commit e673e9c85f
.
25
LICENSE
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
BSD 2-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2022, SmallMain
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
56
README.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Cocos Creator Service Pack
|
||||||
|
|
||||||
|
Cocos Creator Service Pack 是一个开源的 Cocos Creator 引擎**非官方服务包**,提供开箱即用的符合引擎设计的增强特性、问题修复与优化。
|
||||||
|
|
||||||
|
<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=6 orderedList=false} -->
|
||||||
|
|
||||||
|
<!-- code_chunk_output -->
|
||||||
|
|
||||||
|
- [Cocos Creator Service Pack](#cocos-creator-service-pack)
|
||||||
|
- [简介](#简介)
|
||||||
|
- [改动内容](#改动内容)
|
||||||
|
- [如何使用](#如何使用)
|
||||||
|
- [实现原理](#实现原理)
|
||||||
|
- [更新日志](#更新日志)
|
||||||
|
- [贡献指南](#贡献指南)
|
||||||
|
|
||||||
|
<!-- /code_chunk_output -->
|
||||||
|
|
||||||
|
## 简介
|
||||||
|
|
||||||
|
Windows XP 于 2014 年 4 月停止官方维护,之后 Harkaz 发布了一个非官方服务包 Service Pack 4(SP4)。[Link](https://www.softpedia.com/get/Others/Signatures-Updates/Windows-XP-SP4-Unofficial.shtml)
|
||||||
|
|
||||||
|
如此地相似,Cocos 于 2021 年 2 月预告将于 2023 年停止 2.x 版本的维护更新,遂也取名为 Service Pack(SP)。[Link](https://forum.cocos.org/t/topic/106026)
|
||||||
|
|
||||||
|
我们主要收集在论坛中呼声最高的特性并尝试将其以适合引擎的方式实现,以及修复已知问题和优化。
|
||||||
|
|
||||||
|
虽然服务包新增的一些特性在 Cocos Creator 3.5 版本中甚至依然还大部分缺失,但因为它的开发并未停滞(还有希望),并且 3.x 的引擎架构还不断在迭代(不稳定),我们暂时只维护 2.x 版本的服务包。
|
||||||
|
|
||||||
|
## 改动内容
|
||||||
|
|
||||||
|
以下是服务包对引擎的改动:
|
||||||
|
|
||||||
|
- 阿斯顿
|
||||||
|
|
||||||
|
## 如何使用
|
||||||
|
|
||||||
|
待补充。
|
||||||
|
|
||||||
|
## 实现原理
|
||||||
|
|
||||||
|
每个修复与新增特性的原理都会进行公示,我们没做过完善的测试,但是尽量保持改动的透明。
|
||||||
|
|
||||||
|
## 更新日志
|
||||||
|
|
||||||
|
待补充。
|
||||||
|
|
||||||
|
## 贡献指南
|
||||||
|
|
||||||
|
非常欢迎您能和我们一起来完善,所有的一切都通过 Github 进行:
|
||||||
|
|
||||||
|
- 如果您有问题或者好的想法,欢迎创建 `Issues` 。
|
||||||
|
- 如果您有新的代码提交,欢迎创建 `Pull requests`。
|
||||||
|
|
||||||
|
原则上我们接受任何新增与修改,但是**任何修改都必须兼容引擎原有的特性**,并且**不允许删除引擎原有的特性**。
|
||||||
|
|
||||||
|
在开发新特性时,请站在引擎的角度思考该如何设计。
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[140],{5745:function(s){s.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4706],{2762:function(c){c.exports=JSON.parse('[{"label":"facebook","permalink":"/cocos-service-pack/blog/tags/facebook","count":1},{"label":"hello","permalink":"/cocos-service-pack/blog/tags/hello","count":2},{"label":"docusaurus","permalink":"/cocos-service-pack/blog/tags/docusaurus","count":4},{"label":"hola","permalink":"/cocos-service-pack/blog/tags/hola","count":1}]')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5955],{1030:function(e){e.exports=JSON.parse('{"permalink":"/cocos-service-pack/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":4,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3201],{7861:function(s){s.exports=JSON.parse('{"label":"docusaurus","permalink":"/cocos-service-pack/blog/tags/docusaurus","allTagsPath":"/cocos-service-pack/blog/tags","count":4}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6156],{6741:function(e){e.exports=JSON.parse('{"permalink":"/cocos-service-pack/blog/tags/hello","page":1,"postsPerPage":10,"totalPages":1,"totalCount":2,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5631],{2748:function(s){s.exports=JSON.parse('{"title":"Tutorial - Extras","slug":"/category/tutorial---extras","permalink":"/cocos-service-pack/docs/category/tutorial---extras","navigation":{"previous":{"title":"Congratulations!","permalink":"/cocos-service-pack/docs/tutorial-basics/congratulations"},"next":{"title":"Manage Docs Versions","permalink":"/cocos-service-pack/docs/tutorial-extras/manage-docs-versions"}}}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3274],{9610:function(o){o.exports=JSON.parse('{"permalink":"/cocos-service-pack/blog/tags/facebook","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6963],{1042:function(e){e.exports=JSON.parse('{"title":"Tutorial - Basics","description":"5 minutes to learn the most important Docusaurus concepts.","slug":"/category/tutorial---basics","permalink":"/cocos-service-pack/docs/category/tutorial---basics","navigation":{"previous":{"title":"Tutorial Intro","permalink":"/cocos-service-pack/docs/intro"},"next":{"title":"Create a Page","permalink":"/cocos-service-pack/docs/tutorial-basics/create-a-page"}}}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7103],{6147:function(c){c.exports=JSON.parse('{"label":"facebook","permalink":"/cocos-service-pack/blog/tags/facebook","allTagsPath":"/cocos-service-pack/blog/tags","count":1}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6966],{3769:function(s){s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2087],{2531:function(s){s.exports=JSON.parse('{"label":"hola","permalink":"/cocos-service-pack/blog/tags/hola","allTagsPath":"/cocos-service-pack/blog/tags","count":1}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2535],{5641:function(o){o.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"Welcome","permalink":"/cocos-service-pack/blog/welcome"},{"title":"MDX Blog Post","permalink":"/cocos-service-pack/blog/mdx-blog-post"},{"title":"Long Blog Post","permalink":"/cocos-service-pack/blog/long-blog-post"},{"title":"First Blog Post","permalink":"/cocos-service-pack/blog/first-blog-post"}]}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[948],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return f}});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),g=s(r),f=o,m=g["".concat(c,".").concat(f)]||g[f]||p[f]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=g;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var s=2;s<a;s++)i[s]=r[s];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},3352:function(e,t,r){r.r(t),r.d(t,{assets:function(){return u},contentTitle:function(){return c},default:function(){return f},frontMatter:function(){return l},metadata:function(){return s},toc:function(){return p}});var n=r(7462),o=r(3366),a=(r(7294),r(3905)),i=["components"],l={slug:"long-blog-post",title:"Long Blog Post",authors:"endi",tags:["hello","docusaurus"]},c=void 0,s={permalink:"/cocos-service-pack/blog/long-blog-post",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/2019-05-29-long-blog-post.md",source:"@site/blog/2019-05-29-long-blog-post.md",title:"Long Blog Post",description:"This is the summary of a very long blog post,",date:"2019-05-29T00:00:00.000Z",formattedDate:"May 29, 2019",tags:[{label:"hello",permalink:"/cocos-service-pack/blog/tags/hello"},{label:"docusaurus",permalink:"/cocos-service-pack/blog/tags/docusaurus"}],readingTime:2.05,truncated:!0,authors:[{name:"Endilie Yacop Sucipto",title:"Maintainer of Docusaurus",url:"https://github.com/endiliey",imageURL:"https://github.com/endiliey.png",key:"endi"}],frontMatter:{slug:"long-blog-post",title:"Long Blog Post",authors:"endi",tags:["hello","docusaurus"]},prevItem:{title:"MDX Blog Post",permalink:"/cocos-service-pack/blog/mdx-blog-post"},nextItem:{title:"First Blog Post",permalink:"/cocos-service-pack/blog/first-blog-post"}},u={authorsImageUrls:[void 0]},p=[],g={toc:p};function f(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This is the summary of a very long blog post,"),(0,a.kt)("p",null,"Use a ",(0,a.kt)("inlineCode",{parentName:"p"},"\x3c!--")," ",(0,a.kt)("inlineCode",{parentName:"p"},"truncate")," ",(0,a.kt)("inlineCode",{parentName:"p"},"--\x3e")," comment to limit blog post size in the list view."))}f.isMDXComponent=!0}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8663],{3607:function(s){s.exports=JSON.parse('{"permalink":"/cocos-service-pack/blog/tags/docusaurus","page":1,"postsPerPage":10,"totalPages":1,"totalCount":4,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9003],{3905:function(e,t,r){r.d(t,{Zo:function(){return l},kt:function(){return g}});var o=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=o.createContext({}),c=function(e){var t=o.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,s=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),m=c(r),g=n,f=m["".concat(s,".").concat(g)]||m[g]||p[g]||a;return r?o.createElement(f,i(i({ref:t},l),{},{components:r})):o.createElement(f,i({ref:t},l))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u.mdxType="string"==typeof e?e:n,i[1]=u;for(var c=2;c<a;c++)i[c]=r[c];return o.createElement.apply(null,i)}return o.createElement.apply(null,r)}m.displayName="MDXCreateElement"},8856:function(e,t,r){r.r(t),r.d(t,{assets:function(){return l},contentTitle:function(){return s},default:function(){return g},frontMatter:function(){return u},metadata:function(){return c},toc:function(){return p}});var o=r(7462),n=r(3366),a=(r(7294),r(3905)),i=["components"],u={slug:"first-blog-post",title:"First Blog Post",authors:{name:"Gao Wei",title:"Docusaurus Core Team",url:"https://github.com/wgao19",image_url:"https://github.com/wgao19.png"},tags:["hola","docusaurus"]},s=void 0,c={permalink:"/cocos-service-pack/blog/first-blog-post",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/2019-05-28-first-blog-post.md",source:"@site/blog/2019-05-28-first-blog-post.md",title:"First Blog Post",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet",date:"2019-05-28T00:00:00.000Z",formattedDate:"May 28, 2019",tags:[{label:"hola",permalink:"/cocos-service-pack/blog/tags/hola"},{label:"docusaurus",permalink:"/cocos-service-pack/blog/tags/docusaurus"}],readingTime:.12,truncated:!1,authors:[{name:"Gao Wei",title:"Docusaurus Core Team",url:"https://github.com/wgao19",image_url:"https://github.com/wgao19.png",imageURL:"https://github.com/wgao19.png"}],frontMatter:{slug:"first-blog-post",title:"First Blog Post",authors:{name:"Gao Wei",title:"Docusaurus Core Team",url:"https://github.com/wgao19",image_url:"https://github.com/wgao19.png",imageURL:"https://github.com/wgao19.png"},tags:["hola","docusaurus"]},prevItem:{title:"Long Blog Post",permalink:"/cocos-service-pack/blog/long-blog-post"}},l={authorsImageUrls:[void 0]},p=[],m={toc:p};function g(e){var t=e.components,r=(0,n.Z)(e,i);return(0,a.kt)("wrapper",(0,o.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet"))}g.isMDXComponent=!0}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[53],{1109:function(a){a.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Tutorial Intro","href":"/cocos-service-pack/docs/intro","docId":"intro"},{"type":"category","label":"Tutorial - Basics","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Create a Page","href":"/cocos-service-pack/docs/tutorial-basics/create-a-page","docId":"tutorial-basics/create-a-page"},{"type":"link","label":"Create a Document","href":"/cocos-service-pack/docs/tutorial-basics/create-a-document","docId":"tutorial-basics/create-a-document"},{"type":"link","label":"Create a Blog Post","href":"/cocos-service-pack/docs/tutorial-basics/create-a-blog-post","docId":"tutorial-basics/create-a-blog-post"},{"type":"link","label":"Markdown Features","href":"/cocos-service-pack/docs/tutorial-basics/markdown-features","docId":"tutorial-basics/markdown-features"},{"type":"link","label":"Deploy your site","href":"/cocos-service-pack/docs/tutorial-basics/deploy-your-site","docId":"tutorial-basics/deploy-your-site"},{"type":"link","label":"Congratulations!","href":"/cocos-service-pack/docs/tutorial-basics/congratulations","docId":"tutorial-basics/congratulations"}],"href":"/cocos-service-pack/docs/category/tutorial---basics"},{"type":"category","label":"Tutorial - Extras","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Manage Docs Versions","href":"/cocos-service-pack/docs/tutorial-extras/manage-docs-versions","docId":"tutorial-extras/manage-docs-versions"},{"type":"link","label":"Translate your site","href":"/cocos-service-pack/docs/tutorial-extras/translate-your-site","docId":"tutorial-extras/translate-your-site"}],"href":"/cocos-service-pack/docs/category/tutorial---extras"}]},"docs":{"intro":{"id":"intro","title":"Tutorial Intro","description":"Let\'s discover Docusaurus in less than 5 minutes.","sidebar":"tutorialSidebar"},"tutorial-basics/congratulations":{"id":"tutorial-basics/congratulations","title":"Congratulations!","description":"You have just learned the basics of Docusaurus and made some changes to the initial template.","sidebar":"tutorialSidebar"},"tutorial-basics/create-a-blog-post":{"id":"tutorial-basics/create-a-blog-post","title":"Create a Blog Post","description":"Docusaurus creates a page for each blog post, but also a blog index page, a tag system, an RSS feed...","sidebar":"tutorialSidebar"},"tutorial-basics/create-a-document":{"id":"tutorial-basics/create-a-document","title":"Create a Document","description":"Documents are groups of pages connected through:","sidebar":"tutorialSidebar"},"tutorial-basics/create-a-page":{"id":"tutorial-basics/create-a-page","title":"Create a Page","description":"Add Markdown or React files to src/pages to create a standalone page:","sidebar":"tutorialSidebar"},"tutorial-basics/deploy-your-site":{"id":"tutorial-basics/deploy-your-site","title":"Deploy your site","description":"Docusaurus is a static-site-generator (also called Jamstack).","sidebar":"tutorialSidebar"},"tutorial-basics/markdown-features":{"id":"tutorial-basics/markdown-features","title":"Markdown Features","description":"Docusaurus supports Markdown and a few additional features.","sidebar":"tutorialSidebar"},"tutorial-extras/manage-docs-versions":{"id":"tutorial-extras/manage-docs-versions","title":"Manage Docs Versions","description":"Docusaurus can manage multiple versions of your docs.","sidebar":"tutorialSidebar"},"tutorial-extras/translate-your-site":{"id":"tutorial-extras/translate-your-site","title":"Translate your site","description":"Let\'s translate docs/intro.md to French.","sidebar":"tutorialSidebar"}}}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3842],{168:function(s){s.exports=JSON.parse('{"label":"hello","permalink":"/cocos-service-pack/blog/tags/hello","allTagsPath":"/cocos-service-pack/blog/tags","count":2}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9749],{900:function(o){o.exports=JSON.parse('{"permalink":"/cocos-service-pack/blog/tags/hola","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
|
|
@ -1 +0,0 @@
|
|||||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2362],{3905:function(e,t,r){r.d(t,{Zo:function(){return l},kt:function(){return g}});var o=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=o.createContext({}),c=function(e){var t=o.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,s=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),m=c(r),g=n,f=m["".concat(s,".").concat(g)]||m[g]||p[g]||a;return r?o.createElement(f,i(i({ref:t},l),{},{components:r})):o.createElement(f,i({ref:t},l))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u.mdxType="string"==typeof e?e:n,i[1]=u;for(var c=2;c<a;c++)i[c]=r[c];return o.createElement.apply(null,i)}return o.createElement.apply(null,r)}m.displayName="MDXCreateElement"},1947:function(e,t,r){r.r(t),r.d(t,{assets:function(){return l},contentTitle:function(){return s},default:function(){return g},frontMatter:function(){return u},metadata:function(){return c},toc:function(){return p}});var o=r(7462),n=r(3366),a=(r(7294),r(3905)),i=["components"],u={slug:"first-blog-post",title:"First Blog Post",authors:{name:"Gao Wei",title:"Docusaurus Core Team",url:"https://github.com/wgao19",image_url:"https://github.com/wgao19.png"},tags:["hola","docusaurus"]},s=void 0,c={permalink:"/cocos-service-pack/blog/first-blog-post",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/2019-05-28-first-blog-post.md",source:"@site/blog/2019-05-28-first-blog-post.md",title:"First Blog Post",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet",date:"2019-05-28T00:00:00.000Z",formattedDate:"May 28, 2019",tags:[{label:"hola",permalink:"/cocos-service-pack/blog/tags/hola"},{label:"docusaurus",permalink:"/cocos-service-pack/blog/tags/docusaurus"}],readingTime:.12,truncated:!1,authors:[{name:"Gao Wei",title:"Docusaurus Core Team",url:"https://github.com/wgao19",image_url:"https://github.com/wgao19.png",imageURL:"https://github.com/wgao19.png"}],frontMatter:{slug:"first-blog-post",title:"First Blog Post",authors:{name:"Gao Wei",title:"Docusaurus Core Team",url:"https://github.com/wgao19",image_url:"https://github.com/wgao19.png",imageURL:"https://github.com/wgao19.png"},tags:["hola","docusaurus"]},prevItem:{title:"Long Blog Post",permalink:"/cocos-service-pack/blog/long-blog-post"}},l={authorsImageUrls:[void 0]},p=[],m={toc:p};function g(e){var t=e.components,r=(0,n.Z)(e,i);return(0,a.kt)("wrapper",(0,o.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet"))}g.isMDXComponent=!0}}]);
|
|
20
docs-src/.gitignore
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Dependencies
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# Production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.docusaurus
|
||||||
|
.cache-loader
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
41
docs-src/README.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Website
|
||||||
|
|
||||||
|
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
### Local Development
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yarn build
|
||||||
|
```
|
||||||
|
|
||||||
|
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||||
|
|
||||||
|
### Deployment
|
||||||
|
|
||||||
|
Using SSH:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ USE_SSH=true yarn deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
Not using SSH:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
3
docs-src/babel.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||||
|
};
|
12
docs-src/blog/2019-05-28-first-blog-post.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
slug: first-blog-post
|
||||||
|
title: First Blog Post
|
||||||
|
authors:
|
||||||
|
name: Gao Wei
|
||||||
|
title: Docusaurus Core Team
|
||||||
|
url: https://github.com/wgao19
|
||||||
|
image_url: https://github.com/wgao19.png
|
||||||
|
tags: [hola, docusaurus]
|
||||||
|
---
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
44
docs-src/blog/2019-05-29-long-blog-post.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
slug: long-blog-post
|
||||||
|
title: Long Blog Post
|
||||||
|
authors: endi
|
||||||
|
tags: [hello, docusaurus]
|
||||||
|
---
|
||||||
|
|
||||||
|
This is the summary of a very long blog post,
|
||||||
|
|
||||||
|
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
|
||||||
|
|
||||||
|
<!--truncate-->
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
20
docs-src/blog/2021-08-01-mdx-blog-post.mdx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
slug: mdx-blog-post
|
||||||
|
title: MDX Blog Post
|
||||||
|
authors: [slorber]
|
||||||
|
tags: [docusaurus]
|
||||||
|
---
|
||||||
|
|
||||||
|
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
Use the power of React to create interactive blog posts.
|
||||||
|
|
||||||
|
```js
|
||||||
|
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
||||||
|
```
|
||||||
|
|
||||||
|
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
||||||
|
|
||||||
|
:::
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
25
docs-src/blog/2021-08-26-welcome/index.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
slug: welcome
|
||||||
|
title: Welcome
|
||||||
|
authors: [slorber, yangshun]
|
||||||
|
tags: [facebook, hello, docusaurus]
|
||||||
|
---
|
||||||
|
|
||||||
|
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
|
||||||
|
|
||||||
|
Simply add Markdown files (or folders) to the `blog` directory.
|
||||||
|
|
||||||
|
Regular blog authors can be added to `authors.yml`.
|
||||||
|
|
||||||
|
The blog post date can be extracted from filenames, such as:
|
||||||
|
|
||||||
|
- `2019-05-30-welcome.md`
|
||||||
|
- `2019-05-30-welcome/index.md`
|
||||||
|
|
||||||
|
A blog post folder can be convenient to co-locate blog post images:
|
||||||
|
|
||||||
|
![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
|
||||||
|
|
||||||
|
The blog supports tags as well!
|
||||||
|
|
||||||
|
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
|
17
docs-src/blog/authors.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
endi:
|
||||||
|
name: Endilie Yacop Sucipto
|
||||||
|
title: Maintainer of Docusaurus
|
||||||
|
url: https://github.com/endiliey
|
||||||
|
image_url: https://github.com/endiliey.png
|
||||||
|
|
||||||
|
yangshun:
|
||||||
|
name: Yangshun Tay
|
||||||
|
title: Front End Engineer @ Facebook
|
||||||
|
url: https://github.com/yangshun
|
||||||
|
image_url: https://github.com/yangshun.png
|
||||||
|
|
||||||
|
slorber:
|
||||||
|
name: Sébastien Lorber
|
||||||
|
title: Docusaurus maintainer
|
||||||
|
url: https://sebastienlorber.com
|
||||||
|
image_url: https://github.com/slorber.png
|
47
docs-src/docs/intro.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
# Tutorial Intro
|
||||||
|
|
||||||
|
Let's discover **Docusaurus in less than 5 minutes**.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Get started by **creating a new site**.
|
||||||
|
|
||||||
|
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
|
||||||
|
|
||||||
|
### What you'll need
|
||||||
|
|
||||||
|
- [Node.js](https://nodejs.org/en/download/) version 14 or above:
|
||||||
|
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||||
|
|
||||||
|
## Generate a new site
|
||||||
|
|
||||||
|
Generate a new Docusaurus site using the **classic template**.
|
||||||
|
|
||||||
|
The classic template will automatically be added to your project after you run the command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm init docusaurus@latest my-website classic
|
||||||
|
```
|
||||||
|
|
||||||
|
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
|
||||||
|
|
||||||
|
The command also installs all necessary dependencies you need to run Docusaurus.
|
||||||
|
|
||||||
|
## Start your site
|
||||||
|
|
||||||
|
Run the development server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd my-website
|
||||||
|
npm run start
|
||||||
|
```
|
||||||
|
|
||||||
|
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
|
||||||
|
|
||||||
|
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
|
||||||
|
|
||||||
|
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
|
8
docs-src/docs/tutorial-basics/_category_.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"label": "Tutorial - Basics",
|
||||||
|
"position": 2,
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index",
|
||||||
|
"description": "5 minutes to learn the most important Docusaurus concepts."
|
||||||
|
}
|
||||||
|
}
|
21
docs-src/docs/tutorial-basics/congratulations.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 6
|
||||||
|
---
|
||||||
|
|
||||||
|
# Congratulations!
|
||||||
|
|
||||||
|
You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
|
||||||
|
|
||||||
|
Docusaurus has **much more to offer**!
|
||||||
|
|
||||||
|
Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
|
||||||
|
|
||||||
|
Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
|
||||||
|
|
||||||
|
## What's next?
|
||||||
|
|
||||||
|
- Read the [official documentation](https://docusaurus.io/).
|
||||||
|
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
|
||||||
|
- Add a [search bar](https://docusaurus.io/docs/search)
|
||||||
|
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
|
||||||
|
- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
|
34
docs-src/docs/tutorial-basics/create-a-blog-post.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
# Create a Blog Post
|
||||||
|
|
||||||
|
Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
|
||||||
|
|
||||||
|
## Create your first Post
|
||||||
|
|
||||||
|
Create a file at `blog/2021-02-28-greetings.md`:
|
||||||
|
|
||||||
|
```md title="blog/2021-02-28-greetings.md"
|
||||||
|
---
|
||||||
|
slug: greetings
|
||||||
|
title: Greetings!
|
||||||
|
authors:
|
||||||
|
- name: Joel Marcey
|
||||||
|
title: Co-creator of Docusaurus 1
|
||||||
|
url: https://github.com/JoelMarcey
|
||||||
|
image_url: https://github.com/JoelMarcey.png
|
||||||
|
- name: Sébastien Lorber
|
||||||
|
title: Docusaurus maintainer
|
||||||
|
url: https://sebastienlorber.com
|
||||||
|
image_url: https://github.com/slorber.png
|
||||||
|
tags: [greetings]
|
||||||
|
---
|
||||||
|
|
||||||
|
Congratulations, you have made your first post!
|
||||||
|
|
||||||
|
Feel free to play around and edit this post as much you like.
|
||||||
|
```
|
||||||
|
|
||||||
|
A new blog post is now available at `http://localhost:3000/blog/greetings`.
|
55
docs-src/docs/tutorial-basics/create-a-document.md
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Create a Document
|
||||||
|
|
||||||
|
Documents are **groups of pages** connected through:
|
||||||
|
|
||||||
|
- a **sidebar**
|
||||||
|
- **previous/next navigation**
|
||||||
|
- **versioning**
|
||||||
|
|
||||||
|
## Create your first Doc
|
||||||
|
|
||||||
|
Create a markdown file at `docs/hello.md`:
|
||||||
|
|
||||||
|
```md title="docs/hello.md"
|
||||||
|
# Hello
|
||||||
|
|
||||||
|
This is my **first Docusaurus document**!
|
||||||
|
```
|
||||||
|
|
||||||
|
A new document is now available at `http://localhost:3000/docs/hello`.
|
||||||
|
|
||||||
|
## Configure the Sidebar
|
||||||
|
|
||||||
|
Docusaurus automatically **creates a sidebar** from the `docs` folder.
|
||||||
|
|
||||||
|
Add metadata to customize the sidebar label and position:
|
||||||
|
|
||||||
|
```md title="docs/hello.md" {1-4}
|
||||||
|
---
|
||||||
|
sidebar_label: 'Hi!'
|
||||||
|
sidebar_position: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
# Hello
|
||||||
|
|
||||||
|
This is my **first Docusaurus document**!
|
||||||
|
```
|
||||||
|
|
||||||
|
It is also possible to create your sidebar explicitly in `sidebars.js`:
|
||||||
|
|
||||||
|
```js title="sidebars.js"
|
||||||
|
module.exports = {
|
||||||
|
tutorialSidebar: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
label: 'Tutorial',
|
||||||
|
// highlight-next-line
|
||||||
|
items: ['hello'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
```
|
43
docs-src/docs/tutorial-basics/create-a-page.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
# Create a Page
|
||||||
|
|
||||||
|
Add **Markdown or React** files to `src/pages` to create a **standalone page**:
|
||||||
|
|
||||||
|
- `src/pages/index.js` -> `localhost:3000/`
|
||||||
|
- `src/pages/foo.md` -> `localhost:3000/foo`
|
||||||
|
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
|
||||||
|
|
||||||
|
## Create your first React Page
|
||||||
|
|
||||||
|
Create a file at `src/pages/my-react-page.js`:
|
||||||
|
|
||||||
|
```jsx title="src/pages/my-react-page.js"
|
||||||
|
import React from 'react';
|
||||||
|
import Layout from '@theme/Layout';
|
||||||
|
|
||||||
|
export default function MyReactPage() {
|
||||||
|
return (
|
||||||
|
<Layout>
|
||||||
|
<h1>My React page</h1>
|
||||||
|
<p>This is a React page</p>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
A new page is now available at `http://localhost:3000/my-react-page`.
|
||||||
|
|
||||||
|
## Create your first Markdown Page
|
||||||
|
|
||||||
|
Create a file at `src/pages/my-markdown-page.md`:
|
||||||
|
|
||||||
|
```mdx title="src/pages/my-markdown-page.md"
|
||||||
|
# My Markdown page
|
||||||
|
|
||||||
|
This is a Markdown page
|
||||||
|
```
|
||||||
|
|
||||||
|
A new page is now available at `http://localhost:3000/my-markdown-page`.
|
31
docs-src/docs/tutorial-basics/deploy-your-site.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 5
|
||||||
|
---
|
||||||
|
|
||||||
|
# Deploy your site
|
||||||
|
|
||||||
|
Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**).
|
||||||
|
|
||||||
|
It builds your site as simple **static HTML, JavaScript and CSS files**.
|
||||||
|
|
||||||
|
## Build your site
|
||||||
|
|
||||||
|
Build your site **for production**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
The static files are generated in the `build` folder.
|
||||||
|
|
||||||
|
## Deploy your site
|
||||||
|
|
||||||
|
Test your production build locally:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
The `build` folder is now served at `http://localhost:3000/`.
|
||||||
|
|
||||||
|
You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).
|
146
docs-src/docs/tutorial-basics/markdown-features.mdx
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 4
|
||||||
|
---
|
||||||
|
|
||||||
|
# Markdown Features
|
||||||
|
|
||||||
|
Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**.
|
||||||
|
|
||||||
|
## Front Matter
|
||||||
|
|
||||||
|
Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
|
||||||
|
|
||||||
|
```text title="my-doc.md"
|
||||||
|
// highlight-start
|
||||||
|
---
|
||||||
|
id: my-doc-id
|
||||||
|
title: My document title
|
||||||
|
description: My document description
|
||||||
|
slug: /my-custom-url
|
||||||
|
---
|
||||||
|
// highlight-end
|
||||||
|
|
||||||
|
## Markdown heading
|
||||||
|
|
||||||
|
Markdown text with [links](./hello.md)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
Regular Markdown links are supported, using url paths or relative file paths.
|
||||||
|
|
||||||
|
```md
|
||||||
|
Let's see how to [Create a page](/create-a-page).
|
||||||
|
```
|
||||||
|
|
||||||
|
```md
|
||||||
|
Let's see how to [Create a page](./create-a-page.md).
|
||||||
|
```
|
||||||
|
|
||||||
|
**Result:** Let's see how to [Create a page](./create-a-page.md).
|
||||||
|
|
||||||
|
## Images
|
||||||
|
|
||||||
|
Regular Markdown images are supported.
|
||||||
|
|
||||||
|
You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`):
|
||||||
|
|
||||||
|
```md
|
||||||
|
![Docusaurus logo](/img/docusaurus.png)
|
||||||
|
```
|
||||||
|
|
||||||
|
![Docusaurus logo](/img/docusaurus.png)
|
||||||
|
|
||||||
|
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
||||||
|
|
||||||
|
## Code Blocks
|
||||||
|
|
||||||
|
Markdown code blocks are supported with Syntax highlighting.
|
||||||
|
|
||||||
|
```jsx title="src/components/HelloDocusaurus.js"
|
||||||
|
function HelloDocusaurus() {
|
||||||
|
return (
|
||||||
|
<h1>Hello, Docusaurus!</h1>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```jsx title="src/components/HelloDocusaurus.js"
|
||||||
|
function HelloDocusaurus() {
|
||||||
|
return <h1>Hello, Docusaurus!</h1>;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Admonitions
|
||||||
|
|
||||||
|
Docusaurus has a special syntax to create admonitions and callouts:
|
||||||
|
|
||||||
|
:::tip My tip
|
||||||
|
|
||||||
|
Use this awesome feature option
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::danger Take care
|
||||||
|
|
||||||
|
This action is dangerous
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::tip My tip
|
||||||
|
|
||||||
|
Use this awesome feature option
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::danger Take care
|
||||||
|
|
||||||
|
This action is dangerous
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
## MDX and React Components
|
||||||
|
|
||||||
|
[MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**:
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
export const Highlight = ({children, color}) => (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
backgroundColor: color,
|
||||||
|
borderRadius: '20px',
|
||||||
|
color: '#fff',
|
||||||
|
padding: '10px',
|
||||||
|
cursor: 'pointer',
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
alert(`You clicked the color ${color} with label ${children}`)
|
||||||
|
}}>
|
||||||
|
{children}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
|
||||||
|
|
||||||
|
This is <Highlight color="#1877F2">Facebook blue</Highlight> !
|
||||||
|
```
|
||||||
|
|
||||||
|
export const Highlight = ({children, color}) => (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
backgroundColor: color,
|
||||||
|
borderRadius: '20px',
|
||||||
|
color: '#fff',
|
||||||
|
padding: '10px',
|
||||||
|
cursor: 'pointer',
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
alert(`You clicked the color ${color} with label ${children}`);
|
||||||
|
}}>
|
||||||
|
{children}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
|
||||||
|
|
||||||
|
This is <Highlight color="#1877F2">Facebook blue</Highlight> !
|
7
docs-src/docs/tutorial-extras/_category_.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"label": "Tutorial - Extras",
|
||||||
|
"position": 3,
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index"
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
55
docs-src/docs/tutorial-extras/manage-docs-versions.md
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
# Manage Docs Versions
|
||||||
|
|
||||||
|
Docusaurus can manage multiple versions of your docs.
|
||||||
|
|
||||||
|
## Create a docs version
|
||||||
|
|
||||||
|
Release a version 1.0 of your project:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run docusaurus docs:version 1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created.
|
||||||
|
|
||||||
|
Your docs now have 2 versions:
|
||||||
|
|
||||||
|
- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs
|
||||||
|
- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs**
|
||||||
|
|
||||||
|
## Add a Version Dropdown
|
||||||
|
|
||||||
|
To navigate seamlessly across versions, add a version dropdown.
|
||||||
|
|
||||||
|
Modify the `docusaurus.config.js` file:
|
||||||
|
|
||||||
|
```js title="docusaurus.config.js"
|
||||||
|
module.exports = {
|
||||||
|
themeConfig: {
|
||||||
|
navbar: {
|
||||||
|
items: [
|
||||||
|
// highlight-start
|
||||||
|
{
|
||||||
|
type: 'docsVersionDropdown',
|
||||||
|
},
|
||||||
|
// highlight-end
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
The docs version dropdown appears in your navbar:
|
||||||
|
|
||||||
|
![Docs Version Dropdown](./img/docsVersionDropdown.png)
|
||||||
|
|
||||||
|
## Update an existing version
|
||||||
|
|
||||||
|
It is possible to edit versioned docs in their respective folder:
|
||||||
|
|
||||||
|
- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`
|
||||||
|
- `docs/hello.md` updates `http://localhost:3000/docs/next/hello`
|
88
docs-src/docs/tutorial-extras/translate-your-site.md
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Translate your site
|
||||||
|
|
||||||
|
Let's translate `docs/intro.md` to French.
|
||||||
|
|
||||||
|
## Configure i18n
|
||||||
|
|
||||||
|
Modify `docusaurus.config.js` to add support for the `fr` locale:
|
||||||
|
|
||||||
|
```js title="docusaurus.config.js"
|
||||||
|
module.exports = {
|
||||||
|
i18n: {
|
||||||
|
defaultLocale: 'en',
|
||||||
|
locales: ['en', 'fr'],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## Translate a doc
|
||||||
|
|
||||||
|
Copy the `docs/intro.md` file to the `i18n/fr` folder:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/
|
||||||
|
|
||||||
|
cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French.
|
||||||
|
|
||||||
|
## Start your localized site
|
||||||
|
|
||||||
|
Start your site on the French locale:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run start -- --locale fr
|
||||||
|
```
|
||||||
|
|
||||||
|
Your localized site is accessible at `http://localhost:3000/fr/` and the `Getting Started` page is translated.
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
|
||||||
|
In development, you can only use one locale at a same time.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Add a Locale Dropdown
|
||||||
|
|
||||||
|
To navigate seamlessly across languages, add a locale dropdown.
|
||||||
|
|
||||||
|
Modify the `docusaurus.config.js` file:
|
||||||
|
|
||||||
|
```js title="docusaurus.config.js"
|
||||||
|
module.exports = {
|
||||||
|
themeConfig: {
|
||||||
|
navbar: {
|
||||||
|
items: [
|
||||||
|
// highlight-start
|
||||||
|
{
|
||||||
|
type: 'localeDropdown',
|
||||||
|
},
|
||||||
|
// highlight-end
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
The locale dropdown now appears in your navbar:
|
||||||
|
|
||||||
|
![Locale Dropdown](./img/localeDropdown.png)
|
||||||
|
|
||||||
|
## Build your localized site
|
||||||
|
|
||||||
|
Build your site for a specific locale:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build -- --locale fr
|
||||||
|
```
|
||||||
|
|
||||||
|
Or build your site to include all the locales at once:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
133
docs-src/docusaurus.config.js
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Note: type annotations allow type checking and IDEs autocompletion
|
||||||
|
|
||||||
|
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||||
|
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||||
|
|
||||||
|
/** @type {import('@docusaurus/types').Config} */
|
||||||
|
const config = {
|
||||||
|
title: 'My Site',
|
||||||
|
tagline: 'Dinosaurs are cool',
|
||||||
|
url: 'https://smallmain.github.io/cocos-service-pack/',
|
||||||
|
baseUrl: '/',
|
||||||
|
onBrokenLinks: 'throw',
|
||||||
|
onBrokenMarkdownLinks: 'warn',
|
||||||
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
|
// GitHub pages deployment config.
|
||||||
|
// If you aren't using GitHub pages, you don't need these.
|
||||||
|
organizationName: 'smallmain', // Usually your GitHub org/user name.
|
||||||
|
projectName: 'cocos-service-pack', // Usually your repo name.
|
||||||
|
deploymentBranch: 'master',
|
||||||
|
|
||||||
|
// Even if you don't use internalization, you can use this field to set useful
|
||||||
|
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||||
|
// to replace "en" with "zh-Hans".
|
||||||
|
i18n: {
|
||||||
|
defaultLocale: 'en',
|
||||||
|
locales: ['en'],
|
||||||
|
},
|
||||||
|
|
||||||
|
presets: [
|
||||||
|
[
|
||||||
|
'classic',
|
||||||
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||||
|
({
|
||||||
|
docs: {
|
||||||
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
|
// Please change this to your repo.
|
||||||
|
// Remove this to remove the "edit this page" links.
|
||||||
|
editUrl:
|
||||||
|
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||||
|
},
|
||||||
|
blog: {
|
||||||
|
showReadingTime: true,
|
||||||
|
// Please change this to your repo.
|
||||||
|
// Remove this to remove the "edit this page" links.
|
||||||
|
editUrl:
|
||||||
|
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||||
|
},
|
||||||
|
theme: {
|
||||||
|
customCss: require.resolve('./src/css/custom.css'),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
themeConfig:
|
||||||
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||||
|
({
|
||||||
|
navbar: {
|
||||||
|
title: 'My Site',
|
||||||
|
logo: {
|
||||||
|
alt: 'My Site Logo',
|
||||||
|
src: 'img/logo.svg',
|
||||||
|
},
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
type: 'doc',
|
||||||
|
docId: 'intro',
|
||||||
|
position: 'left',
|
||||||
|
label: 'Tutorial',
|
||||||
|
},
|
||||||
|
{ to: '/blog', label: 'Blog', position: 'left' },
|
||||||
|
{
|
||||||
|
href: 'https://github.com/facebook/docusaurus',
|
||||||
|
label: 'GitHub',
|
||||||
|
position: 'right',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
style: 'dark',
|
||||||
|
links: [
|
||||||
|
{
|
||||||
|
title: 'Docs',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
label: 'Tutorial',
|
||||||
|
to: '/docs/intro',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Community',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
label: 'Stack Overflow',
|
||||||
|
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Discord',
|
||||||
|
href: 'https://discordapp.com/invite/docusaurus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Twitter',
|
||||||
|
href: 'https://twitter.com/docusaurus',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'More',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
label: 'Blog',
|
||||||
|
to: '/blog',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'GitHub',
|
||||||
|
href: 'https://github.com/facebook/docusaurus',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
||||||
|
},
|
||||||
|
prism: {
|
||||||
|
theme: lightCodeTheme,
|
||||||
|
darkTheme: darkCodeTheme,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
21964
docs-src/package-lock.json
generated
Normal file
43
docs-src/package.json
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "docs",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"docusaurus": "docusaurus",
|
||||||
|
"start": "docusaurus start",
|
||||||
|
"build": "docusaurus build",
|
||||||
|
"swizzle": "docusaurus swizzle",
|
||||||
|
"deploy": "docusaurus deploy",
|
||||||
|
"clear": "docusaurus clear",
|
||||||
|
"serve": "docusaurus serve",
|
||||||
|
"write-translations": "docusaurus write-translations",
|
||||||
|
"write-heading-ids": "docusaurus write-heading-ids",
|
||||||
|
"typecheck": "tsc"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@docusaurus/core": "2.0.0-beta.20",
|
||||||
|
"@docusaurus/preset-classic": "2.0.0-beta.20",
|
||||||
|
"@mdx-js/react": "^1.6.22",
|
||||||
|
"clsx": "^1.1.1",
|
||||||
|
"prism-react-renderer": "^1.3.1",
|
||||||
|
"react": "^17.0.2",
|
||||||
|
"react-dom": "^17.0.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@docusaurus/module-type-aliases": "2.0.0-beta.20",
|
||||||
|
"@tsconfig/docusaurus": "^1.0.5",
|
||||||
|
"typescript": "^4.6.4"
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.5%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
31
docs-src/sidebars.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* Creating a sidebar enables you to:
|
||||||
|
- create an ordered group of docs
|
||||||
|
- render a sidebar for each doc of that group
|
||||||
|
- provide next/previous navigation
|
||||||
|
|
||||||
|
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||||
|
|
||||||
|
Create as many sidebars as you want.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||||
|
const sidebars = {
|
||||||
|
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||||
|
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||||
|
|
||||||
|
// But you can create a sidebar manually
|
||||||
|
/*
|
||||||
|
tutorialSidebar: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
label: 'Tutorial',
|
||||||
|
items: ['hello'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = sidebars;
|
70
docs-src/src/components/HomepageFeatures/index.tsx
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import clsx from 'clsx';
|
||||||
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
|
type FeatureItem = {
|
||||||
|
title: string;
|
||||||
|
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
|
||||||
|
description: JSX.Element;
|
||||||
|
};
|
||||||
|
|
||||||
|
const FeatureList: FeatureItem[] = [
|
||||||
|
{
|
||||||
|
title: 'Easy to Use',
|
||||||
|
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
|
||||||
|
description: (
|
||||||
|
<>
|
||||||
|
Docusaurus was designed from the ground up to be easily installed and
|
||||||
|
used to get your website up and running quickly.
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Focus on What Matters',
|
||||||
|
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
|
||||||
|
description: (
|
||||||
|
<>
|
||||||
|
Docusaurus lets you focus on your docs, and we'll do the chores. Go
|
||||||
|
ahead and move your docs into the <code>docs</code> directory.
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Powered by React',
|
||||||
|
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
|
||||||
|
description: (
|
||||||
|
<>
|
||||||
|
Extend or customize your website layout by reusing React. Docusaurus can
|
||||||
|
be extended while reusing the same header and footer.
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
function Feature({title, Svg, description}: FeatureItem) {
|
||||||
|
return (
|
||||||
|
<div className={clsx('col col--4')}>
|
||||||
|
<div className="text--center">
|
||||||
|
<Svg className={styles.featureSvg} role="img" />
|
||||||
|
</div>
|
||||||
|
<div className="text--center padding-horiz--md">
|
||||||
|
<h3>{title}</h3>
|
||||||
|
<p>{description}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function HomepageFeatures(): JSX.Element {
|
||||||
|
return (
|
||||||
|
<section className={styles.features}>
|
||||||
|
<div className="container">
|
||||||
|
<div className="row">
|
||||||
|
{FeatureList.map((props, idx) => (
|
||||||
|
<Feature key={idx} {...props} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
}
|
11
docs-src/src/components/HomepageFeatures/styles.module.css
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.features {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2rem 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featureSvg {
|
||||||
|
height: 200px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
30
docs-src/src/css/custom.css
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* Any CSS included here will be global. The classic template
|
||||||
|
* bundles Infima by default. Infima is a CSS framework designed to
|
||||||
|
* work well for content-centric websites.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* You can override the default Infima variables here. */
|
||||||
|
:root {
|
||||||
|
--ifm-color-primary: #2e8555;
|
||||||
|
--ifm-color-primary-dark: #29784c;
|
||||||
|
--ifm-color-primary-darker: #277148;
|
||||||
|
--ifm-color-primary-darkest: #205d3b;
|
||||||
|
--ifm-color-primary-light: #33925d;
|
||||||
|
--ifm-color-primary-lighter: #359962;
|
||||||
|
--ifm-color-primary-lightest: #3cad6e;
|
||||||
|
--ifm-code-font-size: 95%;
|
||||||
|
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||||
|
[data-theme='dark'] {
|
||||||
|
--ifm-color-primary: #25c2a0;
|
||||||
|
--ifm-color-primary-dark: #21af90;
|
||||||
|
--ifm-color-primary-darker: #1fa588;
|
||||||
|
--ifm-color-primary-darkest: #1a8870;
|
||||||
|
--ifm-color-primary-light: #29d5b0;
|
||||||
|
--ifm-color-primary-lighter: #32d8b4;
|
||||||
|
--ifm-color-primary-lightest: #4fddbf;
|
||||||
|
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
23
docs-src/src/pages/index.module.css
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||||
|
* and scoped locally.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.heroBanner {
|
||||||
|
padding: 4rem 0;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 996px) {
|
||||||
|
.heroBanner {
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
40
docs-src/src/pages/index.tsx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import clsx from 'clsx';
|
||||||
|
import Layout from '@theme/Layout';
|
||||||
|
import Link from '@docusaurus/Link';
|
||||||
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
|
import styles from './index.module.css';
|
||||||
|
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||||
|
|
||||||
|
function HomepageHeader() {
|
||||||
|
const {siteConfig} = useDocusaurusContext();
|
||||||
|
return (
|
||||||
|
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||||
|
<div className="container">
|
||||||
|
<h1 className="hero__title">{siteConfig.title}</h1>
|
||||||
|
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||||
|
<div className={styles.buttons}>
|
||||||
|
<Link
|
||||||
|
className="button button--secondary button--lg"
|
||||||
|
to="/docs/intro">
|
||||||
|
Docusaurus Tutorial - 5min ⏱️
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Home(): JSX.Element {
|
||||||
|
const {siteConfig} = useDocusaurusContext();
|
||||||
|
return (
|
||||||
|
<Layout
|
||||||
|
title={`Hello from ${siteConfig.title}`}
|
||||||
|
description="Description will go into a meta tag in <head />">
|
||||||
|
<HomepageHeader />
|
||||||
|
<main>
|
||||||
|
<HomepageFeatures />
|
||||||
|
</main>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
7
docs-src/src/pages/markdown-page.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: Markdown page example
|
||||||
|
---
|
||||||
|
|
||||||
|
# Markdown page example
|
||||||
|
|
||||||
|
You don't need React to write simple standalone pages.
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
7
docs-src/tsconfig.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
// This file is not used in compilation. It is here just for a nice editor experience.
|
||||||
|
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "."
|
||||||
|
}
|
||||||
|
}
|
0
docs/.nojekyll
Normal file
18
docs/404.html
Normal file
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 27 KiB |
1
docs/assets/js/031793e1.dd492146.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1633],{2511:function(a){a.exports=JSON.parse('{"label":"facebook","permalink":"/blog/tags/facebook","allTagsPath":"/blog/tags","count":1}')}}]);
|
1
docs/assets/js/096bfee4.4523c092.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7178],{5010:function(o){o.exports=JSON.parse('{"permalink":"/blog/tags/facebook","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
|