Giter Club home page Giter Club logo

gitja's Introduction

gitja

GitHub release (latest SemVer)

gitja generates pretty web pages from your git repositories using custom Jinja* HTML templates.

gitja complements your static site generator so that you can display your code however you want, in a style consistent with the rest of your website!

This was inspired by stagit, which generates content with a hard-coded style, so if you like that style and don't want to edit templates, you may prefer to use that.

*The templating engine is not Jinja per se, but ginger, an implementation of the Jinja language for Haskell. Please see their docs for any differences.

Getting Started

Currently installation is only possible via source:

git clone https://github.com/m-col/gitja
cd gitja
stack install

Documentation and a preview of the kind of pages gitja can generate is available here.

If you like skipping the manual, running gitja --template will create a base template and config in the current folder from which you can create your own.

Contributing

If you've come across a bug or have a question feel free to open an issue. Pull requests are also warmly welcome if you have any suggested improvements or fixes. Please format code with fourmolu's defaults, use hlint, and make sure test/test.sh is happy.

Meta

Development hosted @ https://github.com/m-col/gitja. Written by Matt Colligan and licensed MIT.

gitja's People

Contributors

m-col avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

gitja's Issues

License isn't easily available in templates

It would be nice if the path to the license file('s html output) and its content and type could be available in templates so that a dedicated license html file could be generated, or the license type could be listed in the repository's index page.

Filter duplicate repos from repo list

I was playing with concurrency and this caused a difficult to find bug (or, rather, it was pretty obvious when i realised, but it took me a while)

Pass arbitrary key-value metadata on per-repo basis for access in templates

The templates basically assume that the clone URL of each repo follows the same format i.e. it uses the host string, maybe some other fixed string, and the name of the repo, to generate the clone URL. This isn't flexible at all, and is only one example usage of passing arbitrary metadata.

Another example would be a way to specify a repo description in a way that doesn't require the non-git tracked .git/description file to be present. Instead, you can commit the description into your blog git repo (i.e. in the gitja config).

I'm sure there are other use cases.

Live instance?

Hi, awesome project!

Are there any live instances of gitja that I can see?

Idea: configure template scopes/paths using template folder structure

i.e.

templates/
    index.html
    repo/
        index.html
        commit/
            commit.html
        file/
            file.html

How to deal with output names for commit and file?

Alternative:

templates/
    index.html
    repo/
        index.html
        commit.html
        file.html

Where commit and file are generated per commit and file into commit/ and file/, but the rest are parsed once per repo or index scope?

Performance improvements

Performance is pretty terrible currently but can definitely be improved. Things to look at:

  • are lazy types used in all places where they could/should be? Some things may not be needed ever, e.g. if they are not used in templates (specifically thinking about bytestrings)
  • does the code generate any crazy hunks
  • are any unnecessary code paths being traversed all the time
  • getCommits can be improved
  • detect file changes in diffs for new commits and only re-render those files
  • fixupLists and the diff list logic could probably be improved too

gotta profile

Add to docs the "description" file

Mention that with bare repositories this is there by default and so they can use that file. For regular repositories it will check for "description" in the root folder, and if that is absent it will fall back to ".git/description"

Specify each template config option as alist

They should be named as individual scopes, clarified their disinctions in the docs, and each should be a list. Currently exactly one value is required for some of the options.

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.