Skip to content

Head Style Tag didn't load #1783

Description

@ersrohu

Bug Report

I wanted to add some style to my document, then I input this to the index.html.

<head>
  <!--The above is omitted-->
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
  <style type="text/css">
    p {
      text-indent: 2em;
    }
  </style>

But it didn't make text indent.

What's the matter? Why?

I can't understand.

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: Windows 11

  • Node.js version: ?

  • npm/yarn version: ?

  • Browser version: MS Edge Current

  • Docsify version: Current

  • Docsify plugins: None

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

Activity

  1. sy-records commented on Mar 31, 2022

    @sy-records
    Member

    I can't reproduce the problem you mentioned.

    image

  2. ersrohu commented on Mar 31, 2022

    @ersrohu
    Author

    Oh... But here...

    image

    无标题

    So I have to use the 2 full-width spaces ( , &#x3000) to make indent.

    I think that it has produced by GitHub Pages, or because I'm in Chinese Mainland, then...

    Wait, I've put the index.html in the zh-cn folder, has it caused by this?

    You can look at these file and check the problems below:

  3. sy-records commented on Mar 31, 2022

    @sy-records
    Member

    You only added it in zh-cn/index.html, which is normal when using zh-cn as an entry.

    cd zh-cn/
    docsify serve .
    

    image

  4. ersrohu commented on Mar 31, 2022

    @ersrohu
    Author

    @sy-records Thank you very much!

  5. ersrohu commented on Apr 1, 2022

    @ersrohu
    Author

    But I want to let the /zh-cn/ become a child folder, not main folder, the main folder is en-us. Hmm, has this caused by "fallbackLanguages", its value is: ["en","zh-cn"] .

  6. sy-records commented on Apr 1, 2022

    @sy-records
    Member

    you should add it to /index.html and handle the style according to the language.

  7. ersrohu commented on Apr 1, 2022

    @ersrohu
    Author

    you should add it to /index.html and handle the style according to the language.

    It doesn't give attention to the /zh-cn/index.html, sure?

    How to do this? Add the "fallbackLanguages": ["en","zh-cn"]? Or, what code should I add?

    Or use below?

    I don't want the English text indents, I only want the Chinese text indents

    I don't want the English text indents, I only want the Chinese text indents

    I don't want the English text indents, I only want the Chinese text indents

    <style type="text/css>
    /* But this is not very good, because when I use below: */
    /*
    <p class="zh-cn">**内容**</p>
    */
    /* It won't render the markdown text. */
        p .zh-cn{
        text-indent: 2em; 
    }
    </style>

    So, what can I do?

  8. locked and limited conversation to collaborators on Apr 1, 2022
  9. converted this issue into a discussion #1784 on Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions