Giter Club home page Giter Club logo

staple's Introduction

Static Page Lightweight Enhancer

Latest Stable Version License

Quick Install

composer require maslosoft/staple

Documentation

Full Staple Documentation

Instead of generating static pages

There are numerous tools to generate static pages from source in markdown files etc. Those need to be called after each modification.

This project simply render any markdown, or other type of file, and wraps it with layout. It is extensible, so other file types can be added, or removed.

staple's People

Contributors

pmaselkowski avatar

Watchers

 avatar James Cloos avatar  avatar

staple's Issues

Contact form feedback

Contact form should send back feedback to sender, ie:

Reply-to: <site-email>
Subject: Re: <entered-subject-or-default>
Message: 
<header>
Thank you for contacting <site-name>!
This confirms we have received your message. 
Original messages send by You:
<message>
<footer>

Tags should be processed after PHP parse

Description:
When adding page to _content, sometimes title could be dependent on PHP variable. Currently tags are extracted before PHP execution.

Example:

<title><?= BRAND_NAME; ?> Products</title>

Expected page title:

Acme Products

Current:

<?= BRAND_NAME; ?> Products

Create page iterator

Should allow iterating by all navigable items, starting from some dir.

Proposed example usage:

foreach(new PageIterator(__DIR__) as $file => $url)
{
}

Create NavigableInterface

This interface should note that this item could be included in site navigation.

At the moment there is no specified methods for this.

Create navigation generator

It requires creating command line tool.

This should scan all content dir and build json file with navigation structure.

This should use #3

Create VirtualFileInterface

Renderers implementing VirtualFileInterface (or just VirtualInterface) should bypass file exists check.

Add NotFoundException.

Additionally surround all request handling block with try/catch and catch NotFoundException etc.

Create cascading data extractor

Currently data extractor works only for root folder.

It should scan folders from root up to the current view folder, and check for data.json, and merge them, ie:

root
   - data.json {title: bar, item: 1, x: 3}
   - some-folder
     - data.json {title: foo, item: 2} result => {title: foo, item: 2, x: 3}
     - another-folder
       - data.json {title: x} result => {title: x, item: 1, x: 3}

Add YML data extractor

Should work exacly like JSON data extractor, extept that on yml files. Should support cascading too #5

Move js assets to bower and bundle them

Remove bower assets from composer, as updating it is very slow.
Instead move assets to bower.json and bundle them with grunt.

Optionally bundle could be automatically included.

Create thumb renderer

This should generate thumbnails of images.

Should handle 'thumb.jpg' etc. extensions

This should implement VirtualFileinterface, see #1 .

Should take path of file with thumb and dimensions suffix, ie:

path/to/file.jpg => path/to/file.100x100.thumb.jpg

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.