Code Monkey home page Code Monkey logo

Comments (9)

seanmcbreen avatar seanmcbreen commented on May 17, 2024

Looking at this a little more. The format for the URL must be:
https://github.com/user/repository/raw/branch/filename

With that format GitHub will redirect to the tokenized CDN link. As a working example...
https://github.com/Microsoft/vscode-MDTools/raw/master/images/Commands.gif
https://github.com/Microsoft/vscode-MDTools/raw/master/LICENSE.md

We seam to use:
return "https://raw.githubusercontent.com/${ match[1] }/${ match[2] }/master"

With the updated regex that will result in and this will 404 with no token etc.
https://raw.githubusercontent.com/Microsoft/vscode-MDTools/master

When we really want is to prefix links with:
https://github.com/Microsoft/vscode-MDTools/raw/master

This should be true for all content types e.g. LICENSE as well.

from vscode-vsce.

seanmcbreen avatar seanmcbreen commented on May 17, 2024

The link in the gallery for licence is however working.

from vscode-vsce.

seanmcbreen avatar seanmcbreen commented on May 17, 2024

I still can't see this working - if I look in the package the MD is still the same.

I also got some additional options - if we detect relative links to files in the project then we can use a mapping format to let the gallery load them (from the extensions sub-folder). I manually hacked my VSIX as follows....

    <Asset Type="images/SpellDemo1.gif" Path="extension/images/SpellDemo1.gif" Addressable="true" />
    <Asset Type="images/SpellDemo2.gif" Path="extension/images/SpellDemo2.gif" Addressable="true" />
    <Asset Type="images/SpellDemo3.gif" Path="extension/images/SpellDemo3.gif" Addressable="true" />

This lets you address the files with a link like htis for testing:
https://seanmcbreen.gallery.vsassets.io/_apis/public/gallery/publisher/seanmcbreen/extension/Spell/latest/assetbyname/images/SpellDemo1.gif

the Gallery is actually not working as expected here but I did want to share the syntax.

You can also get to the RAW source MD file with a link like this which could help for debug:
https://seanmcbreen.gallery.vsassets.io/_apis/public/gallery/publisher/seanmcbreen/extension/Spell/latest/assetbyname/Microsoft.VisualStudio.Services.Content.Details

from vscode-vsce.

joaomoreno avatar joaomoreno commented on May 17, 2024

@seanmcbreen give it another try

from vscode-vsce.

seanmcbreen avatar seanmcbreen commented on May 17, 2024

Unfortunately no luck on either MDTools or Spell-Check. Both published but the readme images did not work. In the VSIC there were no asset mapping tags and in the source Readme.

from vscode-vsce.

seanmcbreen avatar seanmcbreen commented on May 17, 2024

Oops my bad I did not first update to 0.7.1.

I was successful w/ https://app.market.visualstudio.com/items/seanmcbreen.MDTools

I did need to massage a few errors I had. I will now try spell..

from vscode-vsce.

joaomoreno avatar joaomoreno commented on May 17, 2024

👍

from vscode-vsce.

seanmcbreen avatar seanmcbreen commented on May 17, 2024

It's early but you so go get yourself a beer :)

https://app.market.visualstudio.com/items/seanmcbreen.Spell

from vscode-vsce.

joaomoreno avatar joaomoreno commented on May 17, 2024

Nah, we're having something better:

image

from vscode-vsce.

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.