Giter Club home page Giter Club logo

griffin's Introduction

griffin logo

The Elixir framework for the static web.

Build Status Hex.pm Hex Docs License Total Download Last Updated

Griffin

⚠️ Griffin is in alpha stage, under active development and is subject to major changes as it evolves from community feedback and improvements. Expect rough edges and parts that don't work. Griffin will have a 1.0.0 release when it's considered stable.

Griffin is a framework for building static sites inspired by 11ty, Hugo and others. It's purposely made to feel familiar to Elixir and Phoenix users.

Getting started

Install the latest version of Griffin by following the latest instructions on the hex.pm documentation page

griffin's People

Contributors

goncalotomas avatar lcmen avatar entone avatar

Stargazers

Hugo Pereira avatar Ondřej Nývlt avatar  avatar Jeremie Flandrin avatar  avatar Mathieu avatar Camilo avatar Ceyhun Kerti avatar Antonio avatar Jeremiah Campbell avatar Roman Heinrich avatar Dylan Lederle-Ensign avatar Chase Pursley avatar Niclas F. Sturm avatar Daniel Sam avatar Jonas Templestein avatar Colin Burr avatar Mihai Eugen Miuta avatar Sergiy Pash avatar Nelson avatar tyoc213 avatar Mathew Garland avatar

Watchers

Jeremiah Campbell avatar Daniel Sam avatar  avatar  avatar

griffin's Issues

How would you create a homepage with a list of posts?

I'm trying to make a site where there's a home page that is a list of posts and then the show page for the individual posts. From reading through the docs I assumed it would look like

  collections: %{
    posts: %{
      permalink: "/",
      list_layout: "home",
      show_layout: "show"
    }
  }

but then in the home.html.eex layout there is no @collection_values assigns. I might be missing something obvious here but so far I'm just confused.

Allow permalinks in Collections

Originally reported in #12.
Users should be able to set permalinks for their collections. Previously we were assuming the collection name would be the "permalink", but a typical use case would be to display a collection in the home page.

Add support for file and (sub-)folder data files

Currently we only support a global data folder that is read before parsing content files.

Let's assume that a Griffin project has the following simplified structure

.
├── config
│   └── config.exs
├── lib
│   └── layouts
│       └── base.html.eex
├── src
│   ├── blog.json
│   ├── blog.md
│   ├── blog
│   │   ├── 2019-04-06-why-one-monitor-just-isnt-enough.md
│   │   ├── 2020-04-06-two-monitors-is-good-but-three-is-better.md
│   │   └── 2021-04-06-i-broke-my-desk-using-six-monitors-a-short-story.md
│   ├──  index.json
│   └── index.md
├── mix.exs
└── mix.lock

Enabling file specific data would be to read the configuration in index.json and allowing the index.md template to read the configuration. Furthermore, the configuration applies to subfolders as well, meaning that aside from blog.md, all of the 3 blog entry templates would also have access to the configuration listed in blog.json

This is a significant configuration change, so we should do it before we start caring about backwards compatibility.

Rework the installer to use `esbuild` and `tailwind`

The current installer ships with a very rough first template that we need to rework. The new version will include a landing page, a global data folder, and will bundle properly configured tailwind and esbuild packages.

Since this change will only impact new projects generated by the framework, this doesn't necessarily need to be released with 0.3.0

Allow configuration files to have formats other than `.exs`

Currently we can only read configuration file from .exs files that use Code.eval_file/1. Users coming into Griffin might want to use JSON and YAML instead.

With a small refactor, it should be pretty easy to allow multiple formats for configuration files. This will also be useful for file and directory level data.

Prepare docs for first real public release

Currently the documentation pages in guides need some work. The pages for the Data Cascade and Collections are incomplete and the sections grouping the pages need some rethinking.

Allow permalinks to use string interpolation

Currently permalinks override the default behaviour and allow writing to a custom path.

We can extend this further by allowing permalink to use string interpolation:

---
permalink: "my-custom-path/#{DateTime.from_iso8601(date).year}-#{title}"
---

Allowing permalinks to use interpolation will be needed to implement pagination, since rendering many pages from the same template should allow for customizable paths too.

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.