1

I am using lastest version of wiki.js. I want write html page on code mode,the page include css js,I upload css js files to wiki.js but I can'nt load in css stylesheet in html page. if I paste in css page , that will be load.

so my question is how can I load css file in wiki.js html page?

can use css file in wiki.js code mode

1.I upload my css to http://14.29.194.205:3080/1.css

2.My html code like that enter image description here

3.when i refresh my page http://14.29.194.205:3080/

enter image description here

WXRLVY
  • 11
  • 3

1 Answers1

0

Yes, you can use CSS files in Wiki.js HTML pages. Here are the steps you can follow to load CSS files in Wiki.js:

Upload your CSS file to Wiki.js: Go to the "Files" section in the sidebar, click on "Upload file" and select your CSS file.

Copy the link to your CSS file: After uploading the CSS file, click on it to open it, then copy the link in the "URL" field.

Add a link to your CSS file in your HTML code:

<head>
  <link rel="stylesheet" href="https://your-wiki-js-url.com/files/your-css-file.css">
</head>

Replace "https://your-wiki-js-url.com" with the URL of your Wiki.js instance, and "your-css-file.css" with the name of your CSS file.

Save your HTML page: Save your HTML page and refresh it. Your CSS file should now be loaded. Note that you cannot use external CSS files in Wiki.js code mode. You can only use inline CSS styles. To use inline CSS styles, you can add a "style" attribute to your HTML tags, like this:

<div style="color: red; font-size: 18px;">This text is red and 18px</div>

I hope this helps! Let me know if you have any other questions.

  • thank you so much, I have use your way , but this question not be resolved.I have no more credit to top up my account, but I have supplemented some screenshots for my question. – WXRLVY Apr 23 '23 at 10:56