Giter VIP home page Giter VIP logo

statocles's People

Contributors

djerius avatar ferki avatar jberger avatar kentfredric avatar kiwiroy avatar lindleyw avatar manwar avatar mohawk2 avatar perlancar avatar tadegenban avatar vlet avatar wbazant 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  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  avatar  avatar  avatar  avatar

statocles's Issues

Blog commands

  • List the available apps. Since apps are referred to by their name in the Site, we'll need a way to list what those names are.
  • The blog should be able to create new posts, opening $EDITOR. Defaults to the current date, but allows overriding the date.

Document the Template abstraction

Statocles::Template is not documented

Go through and ensure that all attributes and methods are documented as well, because why not?

Create site command

A command to create a site. Should take the site class, create the site.yml, directories, and other things like git repositories.

Invalid default used

Invalid default '' for Statocles::Site->index - not a coderef or code-convertible object at C:/strawberry5162/perl/site/lib/Method/Generate/Accessor.pm line 57.
Compilation failed in require at t/site.t line 3.

Site navigation

Site objects should have some kind of navigation data structure that the layout.tmpl can use.

Get theme from share dir

::default -> dist_dir( 'Statocles', 'theme', 'default' );

Maybe in the future we can do something like:

Statocles-Theme-Mine::name -> dist_dir( 'Statocles::Theme::Mine', 'theme', 'name' )

But I don't think that's as big of a deal.

Git branch writes warning to stdout

When we switch branches, Git::Repository writes to STDOUT.

Also, if we're already on the deploy branch, we don't need to switch branches.

Refactor Page into a Role

Page should be a role to refactor the common bits of ::Page and ::Page::List. The role should probably be named Statocles::Role::Page. Or maybe Statocles::Page is the role, and Statocles::Page::Document is the single-document Page.

Naming things is hard.

Blog index tag restriction

The blog index page should be allowed to restrict to a certain set of tags, so that a "private" tag results in a private part of the blog, accessible only through the direct URL.

Presentation Gallery app

Call it a "Deck" app?

It should be able to translate the YAML into a format appropriate for one of the JS presentation systems.

The one I've been using is React.js, so maybe it should simply be called Statocles::App::Presentation::React

I really really want to be able to simply move between JS presentation systems though... Or at least build Deck.js slide shows using markdown...

Pure Perl

This entire app should be bundled in the git repo and work out of the box with a core Perl (for example, Strawberry Perl).

It is also editable without using Perl to generate the site, but it should be easy to get set up for generating the site.

Static Content App

We need an app that simply does static content, js, css, images, etc...

Event-driven updates / Statocles daemon

The "preview server" function will need some kind of way to regenerate the static pages when the underlying source file changes. Since we're doing pure-perl, this can't use libnotify.

Beam::Emitter is a good option here, but presently the relations between the models and views do not allow for a good flow from File to Document to Page. Files may contain multiple Documents, which means that new Documents could be created, and old Documents could be deleted, necessarily changing the number of Pages that exist.

Apps may have to take charge of this, by attaching themselves to Files, keeping track of the documents and pages that are a result of the file. But the site would then also have to keep track of all the pages and apply any new pages / remove any deleted pages.

Encapsulation is key here.

Not having to regenerate the entire site if one thing changes is another key here.

Markdown page app

We need an app that does simply Markdown pages.

It should probably handle the same YAML format that the Blog does (i.e. the default Statocles::Document).

Use Path::Tiny

I think it removes the need for all the File:: modules I'm currently using.

Command-line Interface

We need a command that can:

  • build the site. Should only update that which has changed.
  • deploy the site.

All site commands should be one word. The future app commands can be multiple words, the first word being the name of the app.

Page edit links in default theme

There should be links in the footer to edit this page, if there's an easy way to do it.

For Github, this URL is like: https://github.com/<user>/<repo>/edit/<branch>/<document_path>

If the user specifies everything up to <document_path>, this should work.

Site title

The site should have a title that is available from the layout template.

The default theme templates should be flexible enough to handle a lot of different needs.

Pre-date Blog Posts

Pre-dated blog posts will not appear on the site until the date. Deploy will not add these pre-dated blog posts until the wallclock date is greater than or equal to the post date.

Move to Mojo

If the internals are built on-top of Mojo::, we get:

  1. Mojo::EventEmitter (needed for #1)
  2. Mojo::Template (fixing #17)
  3. Mojo::Log
  4. Mojo::Base (though our own base is more feature-rich... maybe we keep ours?)

Humph. We get the template language and we'll use the event emitter and probably the logger (though for that we need to inherit from Mojo::Base).

How about we just start with the template and see where that takes us...

Theme should use Store

The Theme should use Store to find/load its files. Store is the abstraction for dealing with the filesystem (or the database, or whatever persistence).

Better Template Language

Mojolicious and Dancer both have their own template language. I'd really like to avoid that, but I'd also really like a pure-Perl template language that doesn't suck.

Pre-set some git variables

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'cpan@fremen.(none)') at t/site/git.t line 76.

Blog tags

Pages should be able to have tags, and there should be paginated lists of tags.

Blog RSS/Atom

Each list page (all posts, tag posts) should have a corresponding RSS feed.

Statocles::Site::Git

A basic, generic, git-based deployment.

For Github Pages specific features, we will make a Statocles::Site::Github.

Allow -m option to deploy for Git commit message

The Git site should do better commit messages that include what has changed since the last build.

Two scenarios:

  1. Deploy to the same branch as build
  2. Deploy to a different branch as build

If it's the same branch, look for the last deploy by finding a "Statocles-Deploy" tag in a commit and include the commit spec from then to now.

If it's a different branch, look for the last build commit from the last Statocles-Deploy tag, then concatenate the commit messages, including the commit spec from then to now.

We really only need to know the last build-side commit. If there's a "Statocles-Build-Commit" tag, we know it's a Statocles deploy commit.

Blog continuation mark

Nobody uses the horizontal rule (or at least, they shouldn't), so break the content up into two parts based on "---". Make a "read more..." link that goes directly to the --- break point.

Main Documentation

The main Statocles.pm should be a command runner, but also the entry point for documentation to describe the core concepts.

There may be more details guides/tutorials later, but a quick overview should be included in the main document.

File::Find order issue

#   Failed test at t/store.t line 74.
# Compared $data->[0]{"path"}
#    got : '/2014/05/22/(regex)[name].file.yml'
# expect : '/2014/04/23/slug.yml'
# Looks like you failed 1 test of 1.

Should probably use a bag()

Windows dir separator issues

#   Failed test at t/app/blog.t line 70.
# Compared $data->[0]{"document"}{"path"}
#    got : '/2014/04/23/slug.yml'
# expect : '\2014\04\23\slug.yml'
# Looks like you failed 1 test of 1.

    #   Failed test at t/theme.t line 60.
    # Compared $data->{"site"}{"layout"}{"path"}
    #    got : 'C:\strawberry5162\cpan\build\Statocles-0.004-Hllo7P\t\share\theme/site/layout.tmpl'
    # expect : 'C:\strawberry5162\cpan\build\Statocles-0.004-Hllo7P\t\share\theme\site\layout.tmpl'

    #   Failed test at t/theme.t line 61.
    # Compared $data->{"path"}
    #    got : 'C:\strawberry5162\cpan\build\Statocles-0.004-Hllo7P\t\share\theme/blog/post.tmpl'
    # expect : 'C:\strawberry5162\cpan\build\Statocles-0.004-Hllo7P\t\share\theme\blog\post.tmpl'
    # Looks like you failed 2 tests of 2.

#   Failed test 'absolute directory'
#   at t/theme.t line 62.

    #   Failed test at t/theme.t line 72.
    # Compared $data->{"site"}{"layout"}{"path"}
    #    got : 'theme/site/layout.tmpl'
    # expect : 'theme\site\layout.tmpl'

    #   Failed test at t/theme.t line 73.
    # Compared $data->{"path"}
    #    got : 'theme/blog/post.tmpl'
    # expect : 'theme\blog\post.tmpl'
    # Looks like you failed 2 tests of 2.

#   Failed test 'relative directory'
#   at t/theme.t line 76.

    #   Failed test at t/theme.t line 83.
    #                   'C:\strawberry5162\cpan\build\Statocles-0.004-Hllo7P\share\theme\default'
    #     doesn't match '(?^:theme\default$)'
    # Looks like you failed 1 test of 1.

#   Failed test 'default Statocles theme'
#   at t/theme.t line 84.
# Looks like you failed 3 tests of 3.

Add Statocles::Help::Setup

Until we get a proper "create" command (which may, itself, be insufficient to describe the Beam::Wire configuration file being used), create a Setup guide.

Bundle the app into the source directory

The command-line app should be able to bundle the app into the current directory. Should include all prereqs, which is where our pure-Perl requirement comes in. Put the command-line script itself into the current directory, and the libs into the lib/ directory. The script will need to add a "use lib" line, of course.

Use UTF-8 Everywhere

We need to be able to handle UTF-8. Look up how to do it. Every file read and write needs to be UTF-8.

Documents should be able to override their class

At the moment, the Statocles::Document is the only possible document class, but in the future I imagine that other Document classes will come in.

Obviously, we'll wait until we actually need one, but we'll leave this ticket open until we do.

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.