Skip to content

How to: named locations from _data/... #49

@jlconlin

Description

@jlconlin

First of all, nice plugin! I really like it.

I have a data file with a few commonly used locations like:

# _data/places.yml
- title: "Office"
  location:
    latitude: ...
    longitude: ...
- title: "Home"
  location:
    latitude: ...
    longitude: ...

Instead of putting coordinates into my front matter, I would like to use these named locations like such:

_posts/2022-05-23-Named-Locations.md:

---
title: Post with named location
location: "Office"
---
Here is where I worked today:
{% google_map src="_data/places.yml" title={{ page.location }} %}

When I do that now, just get a map with markers for both my office and my home.

I suspect this is already possible, I'm just not sure how to apply the correct incantation to make it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions