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"
|
||||
],
|
||||
|
||||
// if your site lives in a subdirectory, change this
|
||||
pathPrefix: "/eleventy-base-blog/",
|
||||
// If your site lives in a different subdirectory, change this.
|
||||
// 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",
|
||||
htmlTemplateEngine: "njk",
|
||||
|
@ -3,7 +3,7 @@ node_js:
|
||||
- 8
|
||||
before_script:
|
||||
- npm install @11ty/eleventy -g
|
||||
script: eleventy
|
||||
script: eleventy --pathprefix="/eleventy-base-blog/"
|
||||
deploy:
|
||||
local-dir: _site
|
||||
provider: pages
|
||||
|
@ -59,4 +59,4 @@ DEBUG=* npx eleventy
|
||||
* `_includes/layouts/base.njk`: the top level HTML structure
|
||||
* `_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/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 {
|
||||
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">
|
||||
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>
|
||||
|
||||
{% set postslist = collections.posts %}
|
||||
|
@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/11ty/eleventy-base-blog#readme",
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": ">=0.2.10",
|
||||
"@11ty/eleventy": ">=0.2.11",
|
||||
"luxon": "^0.3.1",
|
||||
"prismjs": "^1.10.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user