Giter Club home page Giter Club logo

chrisruppel.com's People

Contributors

dependabot[bot] avatar mattgrill avatar rupl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mattgrill

chrisruppel.com's Issues

Add Photoswipe to galleries

My friends and family that read travel posts have frequently brought up that the photos can't be looked at individually like a standard gallery. Additionally the captions often get in the way. I can fix two problems at once by removing my current mechanism for captions and installing Photoswipe

I'll have to write some JS that scrapes the data out of my markup, but hopefully it will work with <picture> data as easily as simple <img>. If not, I'll add the low/high-def URLs to separate attributes that the gallery can read.

Double-override preposition in location data

Sometimes overriding location with a custom preposition makes the page title clearer. But when I include the location in other places (such as home/about pages, or the Links sidebar) then it makes no sense ("I was last seen from Lak Lake, Vietnam"). Adding the ability to double-override the preposition within the _include would make the wording flow best in all situations. I think I'd want it to work like this (assuming I have location.prep set to from:

{% include location.html location=page.location prep=in %}

Which would output Kalaw Trekking Day 1 from Kalaw, Myanmar in the page title but I was last seen in Kalaw, Myanmar on the home page.

Reduce travel list to saved articles when offline

Hot on the heels of #59, it would be cool to reduce the rather long travel list to show only the links a visitor has saved offline. I can make this easier on myself by using the URLs I was already embedding in each article, and comparing them to the cache entries:

<article class="teaser--title" data-url="/travel/bus-from-hanoi-to-laos/">

...will be a 🍰 to match a cache entry of chrisruppel-offline--/travel/bus-from-hanoi-to-laos/

From there, maybe I can offer a button to toggle all entries, or better yet, an explanation that says there are more links but until the network comes back, they won't work.

Fix problem with request.pathname in SW

I noticed I am getting errors on a piece of custom code I copied to supply the SW with a window.location substitute:

Uncaught TypeError: Cannot read property 'pathname' of null
    at service-worker.js:106

Make my CSP worthwhile and remove unsafe-eval/unsafe-inline

Time to code like a grown-up. To start things off:

  • Move my inline head JS into a file. Update SW to cache it so I can achieve the same perf benefits of inlining.
  • re-organize MapBox include, move the inline code into a file and move config into data-attributes on the map container.
  • Move Google Analytics into a file. The account number must still somehow come from the environment. Maybe another data-attr + ID on the script tag?

Donate button

This is more of an experiment than a serious attempt at revenue, but it would be interesting to allow Bitcoin donations for worthwhile content. A small CTA at the bottom of an article, maybe a suggested donation of $1 or something small.

Make a second tag-cloud for tech blog

From #25:

My tags are currently travel-specific and it strikes me as useful to have two clouds instead of combining them... I just can't imagine tagging a technical post with #snorkeling 😁

Provide search via external service

I saw on tantek.com that a few hidden inputs is all that is needed to do nice, focused Google searches on a website. The results are even rich snippets! Here's a sample URL that it would redirect a visitor to, provided they entered laos as the search term:

https://www.google.com/search?as_sitesearch=chrisruppel.com&tbs=sbd%3A1%2Ccdr%3A1%2Ccd_min%3A1%2F1%2F1970&q=laos&gws_rd=ssl)

The search box could be progressively enhanced with my travel.json file, providing auto-complete results below the box and letting them skip the Google page entirely if something compelling appears.

Keep calendar updated even on SW-cached pages

The HTML which defines my work availability calendar gets cached along with the rest of that URL as part of my SW. While the fast page load is nice, I need to make an additional request if the internet connection is present so that the calendar is always up to date. If there's no connection, the last-cached calendar is fine, but I'll display a warning saying the calendar is out of date.

Redirects

Eventually I'll need to redirect a URL. Perhaps I could generate a redirects.json within Jekyll then suck that up with Express. That way, the old URL(s) can live inside the document using the new URL.

Restore SVG icons

I broke them during #15 but didn't think it was important enough to prevent from shipping the fix for the photos.

Fix cross-origin issue for photospheres

I no longer leave the source directory (_img in this repo) in the Heroku slug to decrease its compiled size. All media has been migrated to S3 as of #15 β€”Β except I just now realized that photospheres had an issue that I previously overlooked.

Initially I thought it was the lack of site.img-host prefixed on the image path (attempted to fix with ff0239e), but that's not enough. When I redeployed, I saw a new error in Chrome, which is a years-old issue that I was unaware of:

photosphere.min.js:10 DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at https://chrisruppel-assets-eu1.s3.amazonaws.com/img/photosphere/koh-yao-noi-tour.jpg may not be loaded.(…)

Since I'd rather not fragment where images are stored, I need to fix this CORS issue to restore photospheres.

Image minification as postinstall

Minifying images as postinstall (during slug compilation) would drastically reduce downtime between releases and also 404s after new release boots.

At the moment, the blocker is that the compiled slug is too big when originals plus cuts are present. But maybe I could delete the source directory after the task successfully runs. If the minified images are the only copy then the slug should be smaller than it is now since it currently includes originals.

As I add more image cuts, their sizes are drastically smaller than the originals so the savings from minification will outweight the added size from extra cuts. In the next couple years I can't imagine adding more than 4 total anyway (orig, 640, 320, 32).

I'll probably hit the slug size limit as I keep adding photos, but this is a solution aimed at creating more stable deployments and fewer race conditions within the site.

Fix KML paths in maps

I was looking at an old entry and noticed the KML path was gone. It's definitely still loading the data because the waypoints are still there:

screenshot 2017-11-01 09 54 37

No console errors, so it might just be an issue with leaflet-omivore being out of date. The problem seems to apply to all maps with KML.

Generate common error pages

It's pretty lame to show Cannot GET /missing/path/ on 404s. I need classy error pages, or at least something on brand to avoid confusion.

Markup the travel lists with microformats

I did each individual trip entry, but I forgot to markup the travel lists with structured data. It should reuse the structure from trip.html... bonus points if I can actually reuse templates.

External link entries

Sometimes I want to publish tech-related links that I endorse. Optionally they could appear in the blog stream. My main difficulty at the moment would be isolating and reusing tags (specifically, the tech tags that don't yet exist until #27 is resolved)

πŸ”— Example: https://adactio.com/links/tags/serviceworker

Switch to CSS Grid

Time to give this a whirl. My header has gotten pretty disorganized as I bolted new sections on to the site in a piecemeal fashion. If a browser lacks support I'll give them the ol' one-column layout.

Add privacy preferences / policy

I'd like to create a simple set of options that allow visitors to control how the site behaves. Some of the preferences I'd provide:

  • Clearly display value of navigator.doNotTrack to the visitor with a link informing them that they can control the setting within their browser.
  • Opt-out of analytics on my site only (Matomo is already configured to respect browser DNT flag, but maybe others who don't know about DNT want to disable tracking as awareness increases)
  • Control auto-loading of embeds (Twitter, Youtube, Codepen)
  • Control auto-loading of content (Mapbox, Disqus)

I was thinking that pressing ? would open this dialog, but maybe a dedicated page at /privacy is better, including some policy about (lack of) data retention.

Move images to a CDN

They can't be part of the build process. In the long term they can't even be part of the codebase because it will make my Heroku slug size huge eventually.

SW: don't require images as part of Offline caching process

Currently I'm using the 101 of SW Cache, caches.addAll() to store the HTML and images that are to be viewed offline. While easy to implement, it has caused me problems related to CORS. My S3 bucket was misconfigured for a long time, and it didn't have a max-age while misconfigured.

The S3 stuff is better now, but the flakiness of my "Save Offline" button could be improved by making the images optional. Then the HTML response is the only hard dependency for offline viewing, which is often what people want anyway (my most frequently-saved articles have to do with visas and other travel stuff where the person might not have a good connection while saving the article).

Solution is to split the images off from the main "Save offline" routine, and add them in if possible in the background after the HTML saves. Hopefully I can add to a cache after creating it!

Use <picture> for gallery images

Not quite sure how yet, and I might have to go back and crop many photos since I was relying on background-size: [contain|cover] to display a lot of them. But I think if I add an explicit type to each gallery I can predict the sizes attr based on the other bits of yaml.

Contact form

Since my site is essentially static, I need to hook a contact form in somehow.

Fix SW Promises when offline

I have a lot of problems with uncaught exceptions in my Service Worker. The console just fills up with request-related errors when offline. They're not even errors really. The resources are truly not available and I don't expect them to be. But since it's expected I should be able to catch them and let the request fail "silently" by fixing the structure of my Promises. Here's a sample error log:

:3456/travel/list/ Failed to load resource: net::ERR_INTERNET_DISCONNECTED
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch
:3456/css/main.min.css Failed to load resource: net::ERR_INTERNET_DISCONNECTED
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch
:3456/css/fonts.min.css Failed to load resource: net::ERR_INTERNET_DISCONNECTED
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch
:3456/static/[email protected] Failed to load resource: net::ERR_INTERNET_DISCONNECTED
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch
:3456/js/main.min.js Failed to load resource: net::ERR_INTERNET_DISCONNECTED
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch

Site feedback

  • Add a link that opens a new issue here on GitHub with a title prefix or something.
  • Add a label for Feedback here on GitHub.

Auto-refresh travel list on re-visit

The travel list is cached by the SW, it would be cool to check travel.json and update the page on the initial revisit instead of prompting the person to refresh for new content. The next refresh will contain the latest stuff regardless.

Alternatively, when new page is fetched by SW it could put a little notification that advises the visitor of updated content.

Galleries should handle more than travel photos

Curently, a directory is hardcoded into _includes/gallery.html. It assumes the source image is in _img/travel. Different blog sections should have different directories of images.

  • Alter gallery to take a directory as an argument
  • Update gulp processes to handle other directories. This will probably involve reorganizing photos completely, including the existing S3 structure: _site/img/[SIZE]/[DIR]/[SOURCE]
  • Fix any existing blog posts.. I had to dump non-travel images into the _img/travel folder to get publishing quickly.

Here's a list of posts that need to be updated later on:

  • 2016-04-17-bustashape-vetenskapsfestivalen-gothenburg-2016
  • 2017-01-10-arduino-soil-moisture-sensor
  • 2017-01-12-lilypad-arduino-biking-jacket

Reorganize deploy so that site is built before slug is compiled

Goal is to eliminate Procfile or reduce it back down to the most basic command: node index.js

I think I have to re-order the buildpacks once again and do the $PATH altering that my Heroku support ticket advised. That way the Ruby is installed first, and when node runs it will both use node 4.x AND be able to do the Jekyll compile (since Ruby was installed first)

Then (if I finally resolve #15) the only command being run is starting Express and serving site.

Setup Disqus for tech blog

From #25:

My Disqus comments currently are hardcoded to be for Travel. Either figure out how to use two different Disqus groups or just combine them and change the group name to be generic.

Load More button errors when no content is left

This is an edge-case since rarely will a user get all the way down to the bottom, but when nothing is left, the button produces an error instead of becoming disabled as designed:

main.min.js:1 Uncaught TypeError: Failed to execute 'importNode' on 'Document': parameter 1 is not of type 'Node'.

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.