e53 Cyberspace Blog Homepage Thing
Based on Deno and Lume.
Getting Started
- Make sure you have Deno installed.
- Clone this Repository
git clone https://github.com/lumeland/base-blog.git my-blog-name
- Edit
_data/site.yml
. Specifically have a look at_config.js
to see if you want to configure any option differently. See the Lume documentation site. - Run Lume with
deno task serve
.
Implementation Notes
about.md
shows how to add a content page.posts/
has the blog posts but really they can live in any directory. Theposts/_data.yml
file adds the value fortype
andlayout
fields to all posts.- The
menu
field adds any page to the top level site navigation. For example, this is in use onindex.njk
andabout.md
. You can configure the order withmenu.order
and the text withmenu.title
. css
files are processed withpostcss
plugin. The imported styles are in_includes/css
img
folder is copied as is, (keeping the same directory structure).- The blog post feed template is in
feed.xml.njk
andfeed.tmpl.js
. - This example uses four layouts stored in
_includes/layouts/
:base.njk
: the top level HTML structurehome.njk
: the home page template (wrapped intobase.njk
)post.njk
: the blog post template (wrapped intobase.njk
)tag.njk
: the tag page template (wrapped intobase.njk
)
_includes/templates/postlist.njk
is a Nunjucks a reusable template used to display a list of all the posts.index.njk
has an example of how to use it.admin/
has the NetlifyCMS configuration so you can edit or create new posts using a friendly CMS.
Deployment
GitHub Pages
- Get your own Lume blog on Github Pages
- Open the file
.github/workflows/build.yml
and edit the--location
option with the url of the site, for example--location=https://username.github.io/repo/
- Enable Github Pages and select the branch
gh-pages
as source. - See a live demo