GithubHelp home page GithubHelp logo

Comments (7)

calumk avatar calumk commented on May 13, 2024 1

Opened an issue docsifyjs/docsify#1711

from docsify-tabs.

jhildenbiddle avatar jhildenbiddle commented on May 13, 2024

Hi @oeway --

Happy to help, but I don't see a changelog link on either the real or working example you provided above.

It's worth mentioning that the URL you're using for the changelog is incorrect (it return a 404 error). The correct URLs includes the extension:

window.$docsify = {
  alias: {
    '/changelog':
      'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
  },
};

from docsify-tabs.

oeway avatar oeway commented on May 13, 2024

Hi @jhildenbiddle Thank you!
Sorry for the confusion, it was just for illustration. For the real example, see here for the configuration, and here is the rendered version which isn't working. I have a working version here which loads the markdown from a relative path.

from docsify-tabs.

jhildenbiddle avatar jhildenbiddle commented on May 13, 2024

@oeway --

One thing I noticed is that raw.githubusercontent.com sets Content-Type to text/plain; charset=utf-8 in the response for markdown files while other hosts (like imjoy.io) set that value to text/markdown. I'm not sure if this is the issue, but testing is easy enough by using a host the sets the Content-Type header appropriately for your alias. Fortunately, jsDelivr already hosts your repo's content (since it hosts all GitHub content) and sets Content-Type to text/markdown; charset=utf-8.

https://cdn.jsdelivr.net/gh/imjoy-team/ImJoy/docs/api.md

Let me know if that solves the issue. If not, then we'll determine nexts steps.

from docsify-tabs.

oeway avatar oeway commented on May 13, 2024

Hi @jhildenbiddle Thanks a lot for figuring out the difference, I just tested by using the jsdelivr url (great tip! BTW), and it doesn't seem to work, I still go the same result

from docsify-tabs.

jhildenbiddle avatar jhildenbiddle commented on May 13, 2024

Hi @oeway --

Been a while, but I'm (finally) getting around to unresolved GitHub issues. Apologies for the delay.

The issue appears to be related to loading content from another domain and not specifically with the use of an alias. To verify, try creating an alias to a markdown file that contains a tab set on the same domain as your index.html. You will see that tabs are rendered as expected.

This is a docsify-related issue that cannot be resolved by docsify-tabs (or any other plugin). My recommendation is to create an issue in the docsify repo so that it can be addressed properly. I am happy to continue the investigation there once the issue has been created.

Thanks!

from docsify-tabs.

oeway avatar oeway commented on May 13, 2024

@calumk Thanks!

from docsify-tabs.

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.