Giter VIP home page Giter VIP logo

hugo-leaflet's Introduction

πŸ‘¨πŸ»β€πŸ’» Alessandro Travi (@altrdev)


hugo-leaflet's People

Contributors

altrdev avatar joelheaps avatar lbausch avatar lukelr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hugo-leaflet's Issues

Parse failed: template: unexpected "<" | Parse failed: template: bad character U+002D '-'

Hugo Version: hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio

Created a template to use as a single page to display a map with markers for a website I am designing, and finding this repository was a god send. But, when I entered the shortcode to create a map into my template, I received the error:

parse failed: template: map.html:29: unexpected "<"

The shortcode was the standard: {{< leaflet-map mapHeight="500px" mapWidth="100%" mapLat="27.66995" mapLon="85.43249" >}} as provided in the README.md as an example. The output from the error is referring to the two <> at the beginning and end of the shortcode directly within the two {{ }}, in other words from {{< ... >}}.

So I remove them, and then receive the next error.

parse failed: template: map.html:29: bad character U+002D '-'

I am assuming that the use of the < > is intended to escape the -, but does not appear to be doing so. I was wondering if this comes from a change in the hugo template syntax, or if there is someway to prevent receiving this error and get the things working.

Cheers.

Assets

Copy the assets folder over

I donΒ΄t see any assets folder within this project?

Leaflet about/copyright section overlays the whole embeded map

Using the sample

{{< leaflet-map mapHeight="500px" mapWidth="100%" mapLat="27.66995" mapLon="85.43249" >}}

renders like this:

image

The problem seems to be that the normal bottom right about leaflet/copyright section overlays the whole map. I can hover over the urls at the very top left corner (about 1px is visible)

Any way to fix this?

Elevation script returning TypeError: undefined "_container"

The map itself shows up fine, but the track does not. My console is showing the following issue:

Uncaught TypeError: Cannot read properties of undefined (reading '_container')
    at i._addToChartDiv (leaflet.elevation.js:628:38)
    at i.addTo (leaflet.elevation.js:182:18)
    at drawTrack (leaflet.hugo.js:62:56)

I have tried for a few weeks now to nail it down but I just don't have the JS abilities to debug it. I'm almost certain I'm doing something stupid here but cannot figure it out.

Anybody else come across this?

can't use the shortcode in my .md file

Hi,

I try to use your library (thanks a lot fo your work) but I wasn't able to move forward the first explications.

  • Font Awesome icons is in my project,
  • I downloaded the zip, placed the shortcodes files in theme>layouts>shortcodes,
  • the JS files in theme>assets>js,
  • the images in my-project>assets>images
  • and the min.css file in my-project>public>css
  • I added {{ partial "leaflet-loader" . }} in the html page of my project i wanted to work on
  • and in my {{ if .HasShortcode "leaflet-map" }} {{ partial "leaflet-loader" . }} {{ end }}

but when I pasted {{< leaflet-map mapHeight="500px" mapWidth="100%" mapLat="27.66995" mapLon="85.43249" >}} in my .md content file I have this error in my console: failed to unmarshal YAML: yaml: line 7: could not find expected ':'

I guess I'm doing something wrong but I can't find what... It's the first time I use Hugo and Leaflet and now I'm quite lost :)
Can you help me please ?

Fails to load locally required JS

Attempting to get this library to render a map and so far it has not worked out. This might be an issue that is specific to the hugo theme that I am incorporating. It facilitates postcss.js, which could be preventing the library from loading.

First off, I am unsure whether the library's files should be placed within the theme or within the site itself. You mentioned modifying the partial head.html, but did not clarify if we are to modify and save it to site/layouts/partials or whether we are to save it to site/themes/ourtheme/layouts/partials. The same for the css, imgs, and js. Do they belong in the theme or in the site, and do the js files need to be placed in /assets/js or in /static/js?

I have tried both ways and all at once, and the best that I receive is an error output that resembles "leaflet.elevation.{{$HASH}}.js cannot be loaded".

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.