jazzhistorydatabase / jhdb-cms

Content management system for jazzhistorydatabase.com
3 stars 0 forks source link

Replace dropbox links in handlebars output with relative paths #94

Closed matticoli closed 4 years ago

matticoli commented 4 years ago

Dropbox can not be used as a CDN or we'll hit the bandwith cap on the account very quickly

Static file will be uploaded to Published folder in dropbox, which syncs to nginx root dir on server. A subfolder should be created for the page, with handlebars output saved to index.php and all media files copied in adjacent (and re-linked accordingly)

dropbox links can be parsed to filepaths using regexed and id:fileid syntax, and subsequently copied directly to destination folder via dropbox api (instead of downloaded and reuploaded with index.php)

js header include should also be substituted for php include (maybe hardcode both includes as template strings in handlebars code and pass them in depending on if it's a preview or publish req? https://stackoverflow.com/questions/35227324/can-i-search-get-file-by-using-file-id-in-dropbox-v2-api

drnek commented 4 years ago

can we remove the contributor name from the filename / dropbox link to the file? this may not be ideal. google indexes this and it adds noise to all of our filenames. maybe a contributor ID# instead of a long name in the file link

matticoli commented 4 years ago

can we remove the contributor name from the filename / dropbox link to the file? this may not be ideal. google indexes this and it adds noise to all of our filenames. maybe a contributor ID# instead of a long name in the file link

Web-ready image filenames will probably be based on the dropbox unique id of the original image file, so we'd get something along the lines of ./0ru1jdqr4-tn.jpg as the output filename

drnek commented 4 years ago

Any way we can add something meaningful to the filenames? Google cares

drnek commented 4 years ago

Ideally it would be the caption with dashes instead of spaces etc

matticoli commented 4 years ago

I think hyphenating the caption would be reasonable, is that for the purposes of Google indexing the images themselves?

drnek commented 4 years ago

yes google indexes it and makes our pages more relevant for search results. the images also show up on google and drive traffic to the site. SEO needs to be a big part of site structure. images need names that are relevant, ideally the caption hyphenated. more SEO stuff to follow in new issues I'll add shortly, like alt text.. link text. etc..