Giter Club home page Giter Club logo

Comments (6)

b4n avatar b4n commented on July 28, 2024

I see a few solutions for this, with various pros and cons:

  • Use protocol-relative URL. This is easy, just strip the http:.
    • pros: easy
    • cons: URL won't work on file://, e.g. when the user opens it locally. This might not be a big deal as nothing seems to generate the HTML by default.
  • Use absolute (or relative) paths, not URLs:
    • pros and cons: same as above, but additionally it's not obvious where one can find the image.
  • strip http://plugins.geany.org when generating the website:
    • pros: works everywhere
    • cons: needs to be added to the generation script
  • use https:// URLs:
    • pros: works everywhere
    • cons: requires HTTPS to work seamlessly for everyone.

from geany-plugins.

codebrainz avatar codebrainz commented on July 28, 2024

There's also the Markdown README file which had and still has broken image links. It works locally but whatever magic scripts on the server breaks all the images.

from geany-plugins.

eht16 avatar eht16 commented on July 28, 2024

@codebrainz I fixed the Markdown image issue yesterday manually by copying the images into the docroot. But I wasn't aware they are rsync'ed away every night when the pages are recreated.
So I added a hack in geany/plugins.geany.org@8aca6a5 to copy them again after they got deleted. Not nice but will do for the moment.

@dmaphy needs to help with this.

from geany-plugins.

eht16 avatar eht16 commented on July 28, 2024

For the main issue, for now I chose some variant of option 1 from @b4n 's great list. Thanks for that.

I added another hack to the website generation scripts to replace http://plugins.geany.org/ by //plugins.geany.org/ which seems to work (geany/plugins.geany.org@75804ae).
So the HTTP protocol is removed at the website generation step. While this is hacky, at least I could keep proper and working image URLs in the Addons' README which isn't the most important thing but nice to have in case a user reads the plain file and manually open the image URL in a browser.

Ideally, at some point we will be able to just use SSL everywhere.

from geany-plugins.

codebrainz avatar codebrainz commented on July 28, 2024

It's too bad we couldn't just use Markdown for the plugin READMEs, then they would show up properly on Github and we could use one of the many JavaScript Markdown processors for viewing on the website. We could keep all the images under source control where they need to be anyway for local installation and the links to Github ought to be stable enough (edit: err, I guess the relative links would only work on Github and locally, maybe not from the GP website).

from geany-plugins.

eht16 avatar eht16 commented on July 28, 2024

I don't think we are that tied to ReST for the plugin READMEs.
I don't know about Javascript Markdown processors but I guess it's possible to use them also for the G-P website. We just need to improve the website generation scripts to alternatively work with Markdown READMEs. Maybe @dmaphy wants to work on this.

from geany-plugins.

Related Issues (20)

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.