feat(shortcode): add mapbox shortcode (#190)

* feat(shortcode): add mapbox shortcode

* docs: split shortcodes into built-in shortcodes and extended shortcodes

* docs(shortcodes): add docs for mapbox shortcode

* docs(shortcodes): fix an error in shortcodes docs
This commit is contained in:
Dillon
2020-03-21 16:59:23 +08:00
committed by GitHub
parent a9850f7df3
commit aed8734d83
52 changed files with 1713 additions and 726 deletions

View File

@@ -20,6 +20,14 @@ featuredImagePreview: ""
toc: true
autoCollapseToc: false
math: false
mapbox:
accessToken: ""
lightStyle: ""
darkStyle: ""
navigation: true
geolocate: true
scale: true
fullscreen: true
lightgallery: true
linkToMarkdown: true
share:
@@ -67,14 +75,14 @@ cd my_website
另外, 也可以直接把这个主题克隆到 `themes` 目录:
```bash
git clone -b master https://github.com/dillonzq/LoveIt.git themes/LoveIt
git clone https://github.com/dillonzq/LoveIt.git themes/LoveIt
```
或者, 初始化你的项目目录为 git 仓库, 并且把主题仓库作为你的网站目录的子模块:
```bash
git init
git submodule -b master add https://github.com/dillonzq/LoveIt.git themes/LoveIt
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
```
### 2.3 基础配置 {#basic-configuration}
@@ -322,6 +330,22 @@ hugo
copyTex = true
# KaTeX 插件 mhchem
mhchem = true
# {{< version 0.2.0 new small >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} 配置
[params.mapbox]
# Mapbox GL JS 的 access token
accessToken = ""
# 浅色主题的地图样式
lightStyle = "mapbox://styles/mapbox/light-v9"
# 深色主题的地图样式
darkStyle = "mapbox://styles/mapbox/dark-v9"
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
navigation = true
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
geolocate = true
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
scale = true
# 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
fullscreen = true
# 文章页面的分享信息设置
[params.share]
enable = true
@@ -461,6 +485,9 @@ hugo
# {{< link "https://echarts.apache.org/" "echarts" >}}@4.6.0
echartsJS = ''
echartsMacaronsJS = ''
# {{< version 0.2.0 new small >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.8.1
mapboxGLCSS = ''
mapboxGLJS = ''
# {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2
gitalkCSS = ''
gitalkJS = ''