Code Monkey home page Code Monkey logo

theme-simple-blog's Introduction

Simple Blog

Lume theme to create a simple blog.

  • It supports tags and post authors.
  • RSS (Atom and JSON).
  • Sitemap and SEO features.
  • Instant search engine.

Install as a remote theme

The fastest and easiest way to use this theme is by importing it as a remote module. It allows to create a blog in seconds and update it at any time just by changing the version number in the import URL. Just add the following code to your _config.ts file:

import lume from "lume/mod.ts";
import blog from "https://deno.land/x/[email protected]/mod.ts";

const site = lume();

site.use(blog());

export default site;

You can see an example in the demo folder. To customize it copy the _data.yml file in your blog root folder and edit it with your data. The posts must be saved in the posts folder. For example posts/my-first-posts.md`.

Use it as a base template

To use this theme as a base template for a more customized blog, clone this repo and edit the _config.ts file. The source files are in the src folder. And you can remove the /demo folder.

theme-simple-blog's People

Contributors

angelside avatar jrson83 avatar manueldeprada avatar mmyoji avatar mskian avatar oscarotero avatar perroboc avatar wangbinyq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

theme-simple-blog's Issues

Instructions on using variables.css might need an extra step?

I attempted to re-create the most basic example, initializing using deno run -Ar https://deno.land/x/lume/init.ts.

And then modifying _config.ts according to the instructions included in the instructions.md post. However, it seems that local _includes/css/variables.css is ignored unless you also create local styles.css and @importthe variables after css/ds.css. Perhaps I am doing something wrong?

Incorrect date displayed from `date` metadata in post file

I have the following in ~/workspace/my-blog/posts/whoami.md:

---                                                                                                                                     
title: /usr/bin/whoami                                                                                                                  
date: 2023-01-05
author: Noah                                                                                                                            
---

When viewing the generated post, I get this:
image

Notice how the date is January 4th, 2023, although the date is specified as 2023-01-05.

When viewing my local datetime, I get January 5th:

~ $ date
Thu Jan  5 04:10:43 PM PST 2023

Syntax highlighting no longer works with upgrade to 0.5.1

Thank you for creating a cute nice template.

There is a problem with version update.

The following is my _config.ts file. (see whole code if you need)

import lume from "lume/mod.ts";
import blog from "https://deno.land/x/[email protected]/mod.ts";
import date from "lume/plugins/date.ts";
import codeHighlight from "lume/plugins/code_highlight.ts";
import ja from "npm:date-fns/locale/ja/index.js";

const site = lume({
    src: "src",
    dest: "_site",
    server: {
      open: true,
    },
});

site
  .use(blog())
  .remoteFile(
    "_includes/css/code.css",
    // カラーテーマは https://github.com/highlightjs/highlight.js/tree/main/src/styles から好きなものを選ぼう
    "https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/github-dark.min.css"
  )
  .use(codeHighlight())
  .use(date({
    locales: { ja },
  }));

export default site;

The above code works correctly. However, if the version of lume_theme_simple_blog is upgraded to v0.5.1 or higher, the syntax highlighting added by remoteFile does not work.

cannot use template due to `postcss-nesting`

 deno task lume
Task lume echo "import 'lume/cli.ts'" | deno run --unstable -A -
Loading config file file:///home/scarf/repo/blog/_config.ts

Warning Implicitly using latest version (v0.7.0) for https://deno.land/x/lume_theme_simple_blog/mod.ts

TypeError: Could not find npm package 'postcss-nesting' matching 11.2.1. Try retrieving the latest npm package information by running with --reload
    at async createSite (https://deno.land/x/[email protected]/cli/run.ts:50:17)
    at async build (https://deno.land/x/[email protected]/cli/build.ts:28:16)
    at async Command.execute (https://deno.land/x/[email protected]/command/command.ts:1794:7)
    at async Command.parseCommand (https://deno.land/x/[email protected]/command/command.ts:1639:14)
    at async (https://deno.land/x/[email protected]/cli.ts:158:3)

i think there's problem resolving package postcss-nesting in the template.

Pagefind issue when installing as remote theme.

Hi - I really love lume and the simplicity of this template!

I followed the instructions for Install as remote theme and hit the following the error when running deno task serve:

Task serve deno task lume -s
Task lume echo "import 'lume/cli.ts'" | deno run --unstable -A - "-s"
Loading config file file:///REPO_DIR/_config.ts


🔥 /readme/ /README.md
🔥 /feed.json https://deno.land/x/[email protected]/src/feed.tmpl.js
🔥 /404.html https://deno.land/x/[email protected]/src/404.md
🔥 /styles.css https://deno.land/x/[email protected]/src/styles.css
🔥 /feed.xml https://deno.land/x/[email protected]/src/feed.xml.njk
🔥 / https://deno.land/x/[email protected]/src/index.njk
🔥 /sitemap.xml (generated)
🔥 /robots.txt (generated)
🔥 /favicon.png https://deno.land/x/[email protected]/src/favicon.png
🔥 /fonts/epilogue-bold.woff2 https://deno.land/x/[email protected]/src/fonts/epilogue-bold.woff2
🔥 /fonts/inter-italic.woff2 https://deno.land/x/[email protected]/src/fonts/inter-italic.woff2
🔥 /fonts/inter.woff2 https://deno.land/x/[email protected]/src/fonts/inter.woff2

Using binary file at /Users/gregtroszak/development/gregtroszak.me/_bin/pagefind
Error: Pagefind exited with code 127



47,85,115,101,114,115,47,103,114,101,103,116,114,111,115,122,97,107,47,100,101,118,101,108,111,112,109,101,110,116,47,103,114,101,103,116,114,111,115,122,97,107,46,109,101,47,95,98,105,110,47,112,97,103,101,102,105,110,100,58,32,108,105,110,101,32,49,58,32,51,48,58,32,99,11
1,109,109,97,110,100,32,110,111,116,32,102,111,117,110,100,10,47,85,115,101,114,115,47,103,114,101,103,116,114,111,115,122,97,107,47,100,101,118,101,108,111,112,109,101,110,116,47,103,114,101,103,116,114,111,115,122,97,107,46,109,101,47,95,98,105,110,47,112,97,103,101,102,1
05,110,100,58,32,108,105,110,101,32,50,58,32,50,50,58,32,99,111,109,109,97,110,100,32,110,111,116,32,102,111,117,110,100,10,47,85,115,101,114,115,47,103,114,101,103,116,114,111,115,122,97,107,47,100,101,118,101,108,111,112,109,101,110,116,47,103,114,101,103,116,114,111,115,
122,97,107,46,109,101,47,95,98,105,110,47,112,97,103,101,102,105,110,100,58,32,108,105,110,101,32,51,58,32,50,50,58,32,99,111,109,109,97,110,100,32,110,111,116,32,102,111,117,110,100,10,47,85,115,101,114,115,47,103,114,101,103,116,114,111,115,122,97,107,47,100,101,118,101,1
08,111,112,109,101,110,116,47,103,114,101,103,116,114,111,115,122,97,107,46,109,101,47,95,98,105,110,47,112,97,103,101,102,105,110,100,58,32,108,105,110,101,32,52,58,32,50,56,58,32,99,111,109,109,97,110,100,32,110,111,116,32,102,111,117,110,100,10,47,85,115,101,114,115,47,1
03,114,101,103,116,114,111,115,122,97,107,47,100,101,118,101,108,111,112,109,101,110,116,47,103,114,101,103,116,114,111,115,122,97,107,46,109,101,47,95,98,105,110,47,112,97,103,101,102,105,110,100,58,32,108,105,110,101,32,53,58,32,51,50,58,32,99,111,109,109,97,110,100,32,11
0,111,116,32,102,111,117,110,100,10

    at (https://deno.land/x/[email protected]/plugins/pagefind.ts:185:15)
    at async Events.dispatchEvent (https://deno.land/x/[email protected]/core/events.ts:49:11)
    at async Site.build (https://deno.land/x/[email protected]/core/site.ts:527:5)
    at async build (https://deno.land/x/[email protected]/cli/build.ts:36:3)
    at async Command.execute (https://deno.land/x/[email protected]/command/command.ts:1794:7)
    at async Command.parseCommand (https://deno.land/x/[email protected]/command/command.ts:1639:14)
    at async (https://deno.land/x/[email protected]/cli.ts:158:3)

This appears to be an issue with pagefind? But figured I'd report here since this is where I hit it. Feel free to close if there's nothing you can do about it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.