Giter VIP home page Giter VIP logo

pinaclj's People

Contributors

dirv avatar gurvesh avatar mateuadsuara avatar ukutaht avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pinaclj's Issues

Link

Hi,

I noticed while reading your blog that the footer says 'This site is proudly generated by Pinaclj.' On the homepage Pinaclj links to this repo but on the individual post pages it links to 'http://www.pinalj.com/'. Just thought I'd point it out :)

Some words need i18n

=> There are some words: “tag”, "category”, “uncategorized” that should be internationalized. This will require configuration.
=> “tag” and “category” will be part of URLs
=> “uncategorized” is created when setting :title in build-group-page

Easier publishing

In order to publish a page the user must write a timestamp in a the ISO_INSTANT format: 2014-10-31T10:05:00Z

Here are my ideas to make it easier:

  • parse the timestamp more leniently handling all of these: 2014-10-31, 31-10-2014, 31.10.2014 (rails like magic parsing)
  • provide a configuration to specify format
  • provide a cli publisher: pinaclj publish drafts/post.md. It would automatically add current date as a published-at header.

Function: all-groups

data-id="groups" data-type="category"
data-id="groups" data-type="tags"

should list out all values of categories and tags.

There could also be function aliases for "all-categories" and "all-tags" for those two particular use cases.

Task progress reporting

Tasks should be able to report back status of subtasks.

  • Multiple subtasks per tasks that are reported on separately.
  • Subtasks have a keyword id
  • A 'total' value and description text should be reported.
  • Increment command to increment progress.

Nested directory structure

User should be able to create directories in the markdown directory and the structure should be the same in the generated directory.

Moving and deleting pages

There should probably be a command to support this, and publication should error if it detects that a previously published page has been moved or deleted without using this command.

The reason for this is that pages linking to the moved page will need to be updated, and the current method of discovering updates only works for updated and new pages, not for deleted or moved pages.

Maybe there's a way this update mechanism can be changed to read its previous structure from the generated content.

Or the app needs to take control of the file system completely...

Multiple page templates per page type

I wonder if page types should have multiple page templates depending on their use.

For example, a post could have two templates: one for posts on a main page, and one for when they appear as related posts within other pages.

These might be post.html and post_related.html.

Authors might have a page to their own and also a page box for posts.

Another way to do this would be to specify the template parent type, so we might have post.html and post_post.html. Authors would have author.html and author_post.html.

Page types

Pages should have types. So far, the type will just determine the render template but could eventually determine default values for new post, the workflow that is applied, visibility etc.

type: post
type: author

Use the :template header to determine template to use

The :path is used to determine the template used. For generated list pages, this means setting path to "/index.md". For these generated pages it would be better to have a :template :index.html to do the same thing but avoiding the template resolution step.

:destination function gets called too many times

There are roughly 2.5x times as many calls to :destination as there should be. I think that's because page objects are regenerated within site when pages are divided. That should be cleaned up.

Build template selectors by selecting data-ids within template, not by all-keys

There's an all-keys function which is used to generate selectors that match each field in a page.

Pages can potentially have quite a large selection of headers, only a subset of which will be used. In addition, each page has a call to all-keys when the template is run.

If instead Pinaclj builds a list of selectors based on the template, it can store this off when the template is first run and then simply call it back for each page that uses it.

Handle exceptions from tasks

Tasks should have a top-level exception handler which outputs a fatal task result.

There should be an exception pretifier which only shows exceptions from the pinaclj namespace.

Files don't get completely overwritten when re-generating

Files should be re-created when being written, rather than opened and written to. I've noticed that the existing tail end of file contents will remain when a new version is written that's of shorter length than the original version.

Remove sample data from all elements with data-id

This should happen even if there's no value for a given id within the page structure.

Also, for page-lists, it's important that all child nodes are cleared before cloning, as we want to support theme pages having multiple list items for display purposes.

Exclude setting of attributes

next and prev only set the href attribute
category-link sets the href attribute and content.

I can see four uses cases:

  • No content used data-exclude="content"
  • No href used data-exclude="href"
  • Title used as content
  • Title formatted as content e.g. "Previous: %" where the format string can be set via a data attribute
    (Can this be done as a combination fo the first two, e.g. an a without a content and then a span without the href?)

It makes sense to put this exclusion functionality in the templates namespace itself, rather than on any individual transform function.

Post series / page breaks

Some of the posts I have on my blog are labelled part 1, part 2, part 3. It'd be great to have implicit support for this.

That way, for example, the main blog page would list only the first page in a series of articles.

This feature could also be thought of as page breaks. Inserting a break sequence into a post to break it up into multiple pages.

Abilitiy to access headers from index page

The index source page is where headers like blog-title might be set. Other pages should be able to access these and override them as appropriate.

Perhaps pages should have a parent link, with index being the root. This might be useful for categories too.

Use index.md when generating index.html

Currently index.html is built from a page generated simply from a pages list.
There are two approaches:
Easy approach: when generating index.html, find the page for index.md and append onto it rather than use a blank page.
Harder approach: modify page-list to act on all-pages context passed into template, and then generating index.html will "just work" if an index.md file is present.

Default format for published-at

Published-at is used in two ways:

  • for sorting and ordering, in which the Instant object is required
  • for display purposes, in which case a format can be supplied to determine the format

There is a default-format specified in the published-at transform but this is currently not used.

There should be a default format that gets applied if the transform is being called via Enlive. Right now I can't think of an elegant way to do this.

Remove HTML tag duplication between root pages

Is there a way that we can specify just one template file that includes `...'.

This could work for single (index/404) pages, and template files (post/author). Possibly by having some sort of template parent.

Function: if-exists

Delete an element in the tree if there is an empty or no value

<section data-id="if-exists" data-key="twitter">
   <img src="twitter.png" />
</section>

Endophile outputs error message to stdout

A couple of my Markdown posts have the text "<leader>" within <code> blocks.

When running Pinaclj, JLint (an Endophile dependency via Pegdown), outputs this to stdout:

line 1 column 8 - Error: <leader> is not recognized!
line 1 column 8 - Error: <leader> is not recognized!

My Markdown code uses &lt; and &gt; so I'm not sure what's going on here.

Relative URL handling

Let's say you have a style sheet at /style.css.
If you want your website to work locally, you need to fix the URLs to be relative depending on where your page lives. e.g. the link above should actually read ../../../../style.css.

So it'd be useful to relativize certain types of links, somehow.

Themes

User should be able write and use their own themes for the site. Should there be a theme directory which includes the templates and the stylesheets/javascripts?

`<title>` element doesn't work with `data-id`

<title data-id="title" /> doesn't seem to work with Enlive templating. I'm fairly sure using data-id with title is valid HTML5.

One way around this would be to always insert (or replace) the <title> head element with the :title value.

Link selectors should be generalized

Currently, templates knows about specific nested selectors, like page-list, latest, etc.

I think a better approach would be to only process selectors that are one "data-id" level deep, in other words the selector would have a but (parents (has-attr? :data-id))

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.