瀏覽代碼

Add social `sharing` setting to `config.toml`

George Cushen 9 年之前
父節點
當前提交
703a6af3b2
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 3 0
      exampleSite/config.toml
  2. 1 1
      layouts/partials/share.html

+ 3 - 0
exampleSite/config.toml

@@ -26,6 +26,9 @@ googleAnalytics = ""
   # Enable global LaTeX math rendering? If false, you can enable it locally on a per page basis.
   # Enable global LaTeX math rendering? If false, you can enable it locally on a per page basis.
   math = false
   math = false
 
 
+  # Enable native social sharing buttons?
+  sharing = true
+
   # Link custom CSS and JS assets (relative to /static/css and /static/js respectively)
   # Link custom CSS and JS assets (relative to /static/css and /static/js respectively)
   custom_css = []
   custom_css = []
   custom_js  = []
   custom_js  = []

+ 1 - 1
layouts/partials/share.html

@@ -1,4 +1,4 @@
-{{ if not .Site.Params.disable_sharing }}
+{{ if .Site.Params.sharing }}
 <div class="share-box">
 <div class="share-box">
     <ul class="share">
     <ul class="share">
         <li>
         <li>