Skip to content
  • Sponsor docsifyjs/docsify

  • Notifications You must be signed in to change notification settings
  • Fork 5.7k

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Head Style Tag didn't load #1783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
ersrohu opened this issue Mar 31, 2022 · 7 comments
Closed
1 task

Head Style Tag didn't load #1783

ersrohu opened this issue Mar 31, 2022 · 7 comments

Comments

@ersrohu
Copy link

ersrohu commented Mar 31, 2022

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)

@sy-records
Copy link
Member

I can't reproduce the problem you mentioned.

image

@ersrohu
Copy link
Author

ersrohu commented Mar 31, 2022

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:

@sy-records
Copy link
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

@ersrohu
Copy link
Author

ersrohu commented Mar 31, 2022

@sy-records Thank you very much!

@ersrohu
Copy link
Author

ersrohu commented Apr 1, 2022

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"] .

@sy-records
Copy link
Member

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

@ersrohu
Copy link
Author

ersrohu commented Apr 1, 2022

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?

@docsifyjs docsifyjs locked and limited conversation to collaborators Apr 1, 2022
@sy-records sy-records converted this issue into discussion #1784 Apr 1, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants