Anahkiasen / flatten

A package to flatten any website to plain HTML
336 stars 42 forks source link

Config to disable printing cache date comment #19

Closed dmyers closed 9 years ago

dmyers commented 10 years ago

What do you think about adding an option to disable the printing of the cache date comment that is appended to the page html?

Anahkiasen commented 10 years ago

What is the motivation ?

dmyers commented 10 years ago

Sorry for the delayed response. The reason is I have some plain text files I serve through flatten like a sitemap.xml and robots.txt while it doesn't do any harm I thought about using it with dynamically generating image sizes package I'm working on later and just thought it would be a nice option whether or not Flatten should touch the original content or not.

Anahkiasen commented 10 years ago

Ok sounds good, well if you want to do a PR of that I'm up for it, maybe something regex based that could also be disabled with a false value as pattern so people who don't care don't get the performance impact of the regex check.

dmyers commented 9 years ago

Yeah I think that is a great idea. I haven't had as much time as I hoped to add this, but I still really want the flexibility so I'm hoping to add it soon or if you are bored. :smile:

moorer2k commented 9 years ago

Personally I like the commenting system! I just changed some of the code to store it in a javascript variable in which I assign a timestamp for that cached page so that users can manually refresh, if they wish to update the page! For example: http://loldir.com/vacation/na .

It would actually be nice to be able to manipulate this field more easier! Great package, keep it up!

Anahkiasen commented 9 years ago

Done on develop, can use it through the 1.1.*@dev branch alias. See the timestamp option.

dmyers commented 9 years ago

Thanks!

moorer2k commented 9 years ago

Awesome, thank you for this!