Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jlconlin opened this issue May 25, 2022 · 0 comments
Open

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

jlconlin opened this issue May 25, 2022 · 0 comments

Comments

@jlconlin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant