fairpoints / www

fairpoints.org
Other
3 stars 2 forks source link

feat: show teaches elements #23

Closed dwinston closed 2 years ago

dwinston commented 2 years ago

To parse the elements of a list of unstructured things (like the "teaches" list, which is just strings), the Go templating language that Hugo uses interprets a plain dot {{ . }} as the element. Whereas when list elements are structured, as with "author", you do things like {{ .name }} to get at the attributes of each structured element of the list.

What I also added here was the use of a template function to interpret the teaches element as a markdown string. This is nice in this case because it will create links out of the "http://..." parts. Although, it looks like it messes up when a comma follows a last slash in a url, so I put brackets around a few urls to make them display properly.

netlify[bot] commented 2 years ago

Deploy Preview for fairpoints ready!

Name Link
Latest commit 2d70e23168d437127170cb903718060105a77f52
Latest deploy log https://app.netlify.com/sites/fairpoints/deploys/6259c6fe5eb7550008beb366
Deploy Preview https://deploy-preview-23--fairpoints.netlify.app/fairpoints_resources
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.