Add site.prefix config
authorZhong Jianxin <azuwis@gmail.com>
Thu, 12 May 2016 03:30:17 +0000 (11:30 +0800)
committerZhong Jianxin <azuwis@gmail.com>
Tue, 24 May 2016 06:04:37 +0000 (14:04 +0800)
_config.yml
_layouts/default.html

index 117a7e98e97880766e57e3b530fce2b0895de10f..9d9185e06a38bf94601ee8f7bde962b5307827d3 100644 (file)
@@ -4,6 +4,8 @@ title: 'Welcome to the LEDE project'
 
 exclude: [ 'Gemfile', 'Gemfile.lock', 'Rakefile', 'README' ]
 
+prefix: '/'
+
 asciidoctor:
   attributes:
     - idseparator=_
index 2ce1039a0f3a8e7f1840d68ce4154a6a09a64658..a5d4f190e5c4f7a6ac6721188b2729527053dd43 100644 (file)
     <meta name="author" content="Your name goes here"/>
     <meta name="copyright" content="Maybe consider a Creative Commons license"/>
 
-    <link rel="stylesheet" href="{{page.root}}css/foundation.css"/>
-    <link rel="stylesheet" href="{{page.root}}css/font-awesome.css"/>
-    <link rel="stylesheet" href="{{page.root}}css/coderay.css"/>
-    <link rel="stylesheet" href="{{page.root}}css/asciidoctor.css"/>
-    <script src="{{page.root}}js/vendor/modernizr.js"></script>
-    <script src="{{page.root}}js/toc.js"></script>
+    <link rel="stylesheet" href="{{site.prefix}}css/foundation.css"/>
+    <link rel="stylesheet" href="{{site.prefix}}css/font-awesome.css"/>
+    <link rel="stylesheet" href="{{site.prefix}}css/coderay.css"/>
+    <link rel="stylesheet" href="{{site.prefix}}css/asciidoctor.css"/>
+    <script src="{{site.prefix}}js/vendor/modernizr.js"></script>
+    <script src="{{site.prefix}}js/toc.js"></script>
 </head>
 <body>
 
@@ -31,7 +31,7 @@
         <!-- Title Area -->
         <li class="name">
             <h1>
-                <a href="{{page.root}}">
+                <a href="{{site.prefix}}">
                     {{page.title}}
                 </a>
             </h1>
     </div>
 </footer>
 
-<script src="{{page.root}}js/vendor/jquery.js"></script>
-<script src="{{page.root}}js/foundation.min.js"></script>
+<script src="{{site.prefix}}js/vendor/jquery.js"></script>
+<script src="{{site.prefix}}js/foundation.min.js"></script>
 <script>
     $(document).foundation();
 </script>
-<script src="{{page.root}}js/vendor/jquery.js"></script>
-<script src="{{page.root}}js/foundation/foundation.js"></script>
+<script src="{{site.prefix}}js/vendor/jquery.js"></script>
+<script src="{{site.prefix}}js/foundation/foundation.js"></script>
 <script>
     $(document).foundation();