Coder Social home page Coder Social logo

Comments (5)

gitpitch avatar gitpitch commented on July 17, 2024 2

Just fyi, I've updated GitPitch to auto-translate all anchors within a slideshow to target _blank per suggestion. In fact the 1.x branch already did this but for some reason I pruned this code when releasing 2.x. Anyway, from now on regular Markdown link syntax is all you need.

from gitpitch.

gitpitch avatar gitpitch commented on July 17, 2024

There is a simple workaround to give you the behavior you want when people click on you links. You can replace implicit Markdown links in your PITCHME.md with HTML anchor syntax that uses a _blank target.

For example, based on the sample presentation you provided, replace this markdown in your PITCHME.md:

- https://github.com/terrywbrady/info

With this:

<a target="_blank" href="https://github.com/terrywbrady/info">- https://github.com/terrywbrady/info</a>

Note, this general approach is also mentioned in the HTML Slides page in the Wiki.

from gitpitch.

terrywbrady avatar terrywbrady commented on July 17, 2024

This works as you describe. I had presumed I would need to rewrite the whole slide with the HTML syntax. This works well. I have updated my presentations.

from gitpitch.

augnustin avatar augnustin commented on July 17, 2024

I don't consider the suggested workaround as acceptable. Changing a URL to a full <a> tag removes all the markdown readability.

I'd be in favor of having the following script executed in gitpitch:

Array.from(document.getElementByTagName('a')).forEach($link => {
  if ($link.hostname !== window.location.hostname) {
    $link.setAttribute('target', '_blank');
  }
});

And if you need more arguments, here are my reasons: https://augustin-riedinger.fr/en/resources/thoughts-on-target-blank/

from gitpitch.

augnustin avatar augnustin commented on July 17, 2024

Great! Thanks for taking feedback into consideration!

from gitpitch.

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.