BennyHallett / obelisk

Static Site Generator written in Elixir.
MIT License
393 stars 34 forks source link

Themes #5

Closed BennyHallett closed 9 years ago

BennyHallett commented 10 years ago

Should be able to easily switch themes for your site.

Might mean we need to create a theme directory and move the assets directory in there. Would still need an external images directory for post images.

- /themes
  - /theme_name
    - /assets/*
    - layout.(eex|haml)
  - /theme_two
    - /assets/*
    - layout.(eex|haml)

Themes should be able to be downloaded directly from Github.

Config might look like this for a local theme


---
theme: theme_name
  from: :local

And this for a github one


---
theme: theme_name
  from: :github
  repo: user/repo

Or some generic git repo


---
theme: theme_name
  from: :git
  repo: git://server/user/repo.git
dch commented 10 years ago

Good idea!

I am wondering if it might be possible to share, at least some part of, the structure used by hugo, and take advantage of some of the themes used there https://github.com/spf13/hugoThemes/ ?

I find with blog engines 90% of the usability hassle is getting a working theme together, and borrowing existing themes is the Best.

BennyHallett commented 10 years ago

Wow that's an awesome idea. Being able to share themes between blog engines would be a massive win.

I'll check out how hugos are structured and see how hard it would be to get that up and running.

slogsdon commented 10 years ago

Hugo's themes might be tricky to fully support as they rely on Go html templates.

Targeting platforms that use Liquid templates might be a bit easier. Jekyll is a big one that uses Liquid. There's been work on a Liquid-like template parser (fluid). It seems a bit outdated but could be brought up to speed with Elixir v1.0.0 and filters/missing Liquid features.

BennyHallett commented 9 years ago

I've implemented themes now. For now they still use the Eex templates so there's no compatibility with any other framework.

Check out the updated README.md if you're intereted.