Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Jason A. Donenfeld | a4f8e77474 | |
Jason A. Donenfeld | 8edce3cb1e |
19
README.md
19
README.md
|
@ -155,25 +155,6 @@ Note that the `internal-*` paths must match that of `app.cfg`. This makes use of
|
|||
plugins = python27
|
||||
module = floatapp:app
|
||||
|
||||
## Optional: Server-side Rendering
|
||||
|
||||
Some webpages may desire to optionally render pages server side when special query strings are attached, so that GoogleBot may index pages. PhotoFloat supports the [AJAX crawl specification](https://developers.google.com/webmasters/ajax-crawling/).
|
||||
|
||||
location / {
|
||||
location = / {
|
||||
include uwsgi_params;
|
||||
uwsgi_param HTTP_X_SE_ORIGINAL_URL $scheme://$host$request_uri;
|
||||
if ($args ~* _escaped_fragment_=) {
|
||||
uwsgi_pass unix:/var/run/uwsgi-apps/server-execute-phantom.socket;
|
||||
}
|
||||
}
|
||||
index index.html;
|
||||
root /var/www/htdocs/photos.jasondonenfeld.com;
|
||||
}
|
||||
|
||||
This makes use of the [Server Execute Phantom project](http://git.zx2c4.com/server-execute-phantom/about/).
|
||||
|
||||
|
||||
## Optional: Deployment Makefiles
|
||||
|
||||
Both the scanner and the webpage have a `make deploy` target, and the scanner has a `make scan` target, to automatically deploy assets to a remote server and run the scanner. For use, customize `deployment-config.mk` in the root of the project, and carefully read the `Makefile`s to learn what's happening.
|
||||
|
|
|
@ -145,6 +145,8 @@ class Photo(object):
|
|||
exif = {}
|
||||
for tag, value in info.items():
|
||||
decoded = TAGS.get(tag, tag)
|
||||
if (isinstance(value, tuple) or isinstance(value, list)) and (isinstance(decoded, str) or isinstance(decoded, unicode)) and decoded.startswith("DateTime") and len(value) >= 1:
|
||||
value = value[0]
|
||||
if isinstance(value, str) or isinstance(value, unicode):
|
||||
value = value.strip().partition("\x00")[0]
|
||||
if (isinstance(decoded, str) or isinstance(decoded, unicode)) and decoded.startswith("DateTime"):
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="fragment" content="!" />
|
||||
<meta name="medium" content="image" />
|
||||
<title>Photos</title>
|
||||
<link href="css/styles.min.css" rel="stylesheet" type="text/css" />
|
||||
|
|
|
@ -267,10 +267,6 @@ $(document).ready(function() {
|
|||
$(window).hashchange(function() {
|
||||
$("#loading").show();
|
||||
$("link[rel=image_src]").remove();
|
||||
if (location.search.indexOf("?_escaped_fragment_=") === 0) {
|
||||
location.hash = location.search.substring(20);
|
||||
location.search = "";
|
||||
}
|
||||
photoFloat.parseHash(location.hash, hashParsed, die);
|
||||
});
|
||||
$(window).hashchange();
|
||||
|
|
Loading…
Reference in New Issue