Comments (9)
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.
The link in the gallery for licence is however working.
from vscode-vsce.
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.
@seanmcbreen give it another try
from vscode-vsce.
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.
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.
👍
from vscode-vsce.
It's early but you so go get yourself a beer :)
https://app.market.visualstudio.com/items/seanmcbreen.Spell
from vscode-vsce.
Nah, we're having something better:
from vscode-vsce.
Related Issues (20)
- Packaging an ext in an npm workspace with a dependency fails in a strange way HOT 1
- M
- Login Segfaults HOT 3
- "INVALID URL" error for images with line break/irregular whitespace HOT 1
- Support extensions pulling README content from an alternate file HOT 7
- Reproducible builds HOT 1
- Unpublish specific version command
- Mend vulnerability in vsce HOT 2
- Enable vsce to call new VS MP API and publish both extension and signature archive files
- `dependencies: true` does not work at all HOT 4
- Support `--ignore-other-target-folders` HOT 2
- Retry on API request timeout HOT 2
- vsce 2.23.0 dropped support for yarn v2 pnp HOT 4
- vsce package is broken with npm workspaces HOT 20
- [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. HOT 2
- File .vsix too big HOT 3
- Full Semver Standard Support HOT 2
- vsce package ERROR HOT 4
- Vague ERROR Invalid URL HOT 2
- vsce 2.23.0 incorrectly reports missing entrypoints HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-vsce.