Change default config to use pathPrefix: "/" and then use --pathprefix="/eleventy-base-blog/
for GitHub deploy command. Requires Eleventy v0.2.11
This commit is contained in:
parent
c81bebd872
commit
6dcc240219
@ -44,8 +44,11 @@ module.exports = function(eleventyConfig) {
|
|||||||
"css"
|
"css"
|
||||||
],
|
],
|
||||||
|
|
||||||
// if your site lives in a subdirectory, change this
|
// If your site lives in a different subdirectory, change this.
|
||||||
pathPrefix: "/eleventy-base-blog/",
|
// Leading or trailing slashes are all normalized away, so don’t worry about it.
|
||||||
|
// If you don’t have a subdirectory, use "" or "/" (they do the same thing)
|
||||||
|
// This is only used for URLs (it does not affect your file structure)
|
||||||
|
pathPrefix: "/",
|
||||||
|
|
||||||
markdownTemplateEngine: "liquid",
|
markdownTemplateEngine: "liquid",
|
||||||
htmlTemplateEngine: "njk",
|
htmlTemplateEngine: "njk",
|
||||||
|
@ -3,7 +3,7 @@ node_js:
|
|||||||
- 8
|
- 8
|
||||||
before_script:
|
before_script:
|
||||||
- npm install @11ty/eleventy -g
|
- npm install @11ty/eleventy -g
|
||||||
script: eleventy
|
script: eleventy --pathprefix="/eleventy-base-blog/"
|
||||||
deploy:
|
deploy:
|
||||||
local-dir: _site
|
local-dir: _site
|
||||||
provider: pages
|
provider: pages
|
||||||
|
@ -59,4 +59,4 @@ DEBUG=* npx eleventy
|
|||||||
* `_includes/layouts/base.njk`: the top level HTML structure
|
* `_includes/layouts/base.njk`: the top level HTML structure
|
||||||
* `_includes/layouts/home.njk`: the home page template (wrapped into `base.njk`)
|
* `_includes/layouts/home.njk`: the home page template (wrapped into `base.njk`)
|
||||||
* `_includes/layouts/post.njk`: the blog post template (wrapped into `base.njk`)
|
* `_includes/layouts/post.njk`: the blog post template (wrapped into `base.njk`)
|
||||||
* `_includes/postlist.njk` is a Nunjucks macro and is a reusable component used to display a list of all the posts. `index.njk` has an example of how to use it.
|
* `_includes/postlist.njk` is a Nunjucks include and is a reusable component used to display a list of all the posts. `index.njk` has an example of how to use it.
|
@ -153,5 +153,8 @@ pre {
|
|||||||
/* Warning */
|
/* Warning */
|
||||||
.warning {
|
.warning {
|
||||||
background-color: #ffc;
|
background-color: #ffc;
|
||||||
padding: 0.375em 0.625em; /* 6px 10px /16 */
|
padding: 1em 0.625em; /* 16px 10px /16 */
|
||||||
|
}
|
||||||
|
.warning ol:only-child {
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
@ -5,7 +5,11 @@ navtitle: Home
|
|||||||
---
|
---
|
||||||
|
|
||||||
<div class="warning">
|
<div class="warning">
|
||||||
Now edit the <code>_data/metadata.json</code> with your blog’s information—and delete this message from <code>index.njk</code>.
|
<ol>
|
||||||
|
<li>Edit the <code>_data/metadata.json</code> with your blog’s information.</li>
|
||||||
|
<li>(Optional) Edit <code>.eleventy.js</code> with your configuration preferences.</li>
|
||||||
|
<li>Delete this message from <code>index.njk</code>.</li>
|
||||||
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% set postslist = collections.posts %}
|
{% set postslist = collections.posts %}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/11ty/eleventy-base-blog#readme",
|
"homepage": "https://github.com/11ty/eleventy-base-blog#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@11ty/eleventy": ">=0.2.10",
|
"@11ty/eleventy": ">=0.2.11",
|
||||||
"luxon": "^0.3.1",
|
"luxon": "^0.3.1",
|
||||||
"prismjs": "^1.10.0"
|
"prismjs": "^1.10.0"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user