madodig / wikijs-customization Goto Github PK
View Code? Open in Web Editor NEWWiki.js Customization Injection Code
License: GNU Affero General Public License v3.0
Wiki.js Customization Injection Code
License: GNU Affero General Public License v3.0
Look at the simple install locally hosted code. where exactly do you put the files you are referencing.
like
<style>
code/mad-wikijs-customization.css contents
</style>
where is the mad-wikijs-customization.css file stored?
Import fails
That being said, I started from a droplet on 2.4.something where it also didn't work, but then updated thinking I just had an unsupported old version.
First off this syntax is so odd, what's it supposed to be? I'm not sure if that's valid js in the first place:
And chrome seems to agree. Then again I can get it to work by just pasting the head script in directly into the head html injection field, the setup being as such right now (code copied to /code), as anything I try to save in the CSS injection field just disappears after a page reload:
<link rel="stylesheet" href="/code/mad-wikijs-customization.css">
<script>
var collapsibleMenu = true; //Enableordisablecollapsiblemenu
var slidingMenu = false; //Enableordisableslidingmenu
var hideDivider = true; //Enableordisable'Divider'elementinnavigation
var addSiteTitleNavigation = true; //AddlinktoSiteTitlenexttoSiteLogo
var removeBreadcrumbs = true; //Enableordisablebreadcrumbs
var removeTocCard = true; //Enableordisable'TableofContents'Card
var removeTagCard = true; //Enableordisable'Tags'Card
var removeHistoryCard = true; //Enableordisable'LastEditedBy'Card
var customizeVideoPlayer = true; //Enableordisablevideoplayercustomization
var removeBookmarkCard = true; //EnableordisableBookmark/Share/PrintCard
var sideColumnPosition = 'right'; //Sidecolumnposition.Options:'left'|'right'|false
var mouseLeftEdgeOpensMenu = true; //Whenmouseisclosetotheleftedge,revealsmenuifunpinned
const leftEdge = 2; //Distancefromtheleftedgeinpixelstotriggermenureveal
const COOKIE_NAME = "mad-nav-pinned"; //Nameofthecookie(usedformenupinstatus)
const COOKIE_DAYS = 365; //Cookievalidityindays
</script>
<script src="/code/mad-wikijs-customization.js"></script>
The odd thing is, it partially works. At least here's a list of things I can confirm working:
What does not work:
The latter two being the only two things I was really installing this for, which is pretty ironic.
I'm pretty sure I've got the syntax right, I've copied the accordion directly from the example to the markdown editor and saved, the nav bar being set up the same as the example too:
The only thing I get in the console as a warning is the following, which is probably unrelated:
vendor.js?1640560983:435 There is a button with the key "copy-to-clipboard" registered already.
Any ideas? Thanks.
I am trying to use the Font Awesome 5 icons for the Collapsible menu suffix. Is it possible, if so, how should it be implemented?
Hello sir/ma'am , i clone requark repo from GitHub, but I don't know which folder to use as wikijs main scripts, also i downloaded from their wiki paage, but i don't see any folder you mentioned and others important folder like others and here in your document mentioned, so where can i found the right script to use complete wikijs?
I'm just begginer and also search everything i can, I don't see any of this, can you explain or mention only wikijs without their non important file and folder from them? Please.
Thanks in advance.
Hi,
is there any specific reason why this wholesome and (IMO essential wiki feature) is not being upstreamed?
Aside from it being a obvious hack.
Hi, I am a new user of wiki.js, so I am not sure whether is something wrong or not.
I installed it as you said, I also used Linux and was like:
I also add code into the theme in the right place:
I don't know why you used _assets here, I tried both assets and _assets. But the results were same, I used the static navigation, but it is :
I am not sure are there anything wrong...
Please give me advice, thanks in advance!
First bix thanks for your work and sharing it.
Would it be possible to work with a second level deep? Would you like to share the code with some comments?
Second question:
List accordion doesn't work for me.
Here ist the html code:
Test
Test
Unfortunately nothing happens. Sure the problem is in front the keyboard.
Would also like to donate for your work.
Regards
Nick
Hello Madodig,
Thanks for your contribution. Very detailed steps.
I tried this. But for some reason the HTML & CSS injection is not working. What could I be doing wrong? Would you recommend how I can troubleshoot it?
Also, the CSS override entry is not getting saved persistently. It vanishes with every wiki.js restart
Thanks in advance.
Hi,
If you can guide on few things, I can contribute to add more than 10 headers.
Please let me know if this helps. Are there any short term work arounds?
Regards,
Arvind
One of the main drawbacks of the current version is that I can't paste images from the clipboard. This is a problem that has been solved in many other projects, but a lot of the systems out there today still don't allow pasting images directly from the clipboard. Do you know how much work it would be to implement this?
Maybe the wrong place to put this, but just wanted to say thanks for this code. I basically wouldn't have been able to use wikijs without it and had tried (and failed) to implement something much more crude. I appreciate your hard work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.