Skip to content

Conversation

THEBOSS0369
Copy link

I have added the Js interpreter in the _layouts/website/page.html and interpreter.js, so that i can add the interpreter in the original github. Also the server was not running, i have never worked with the plugins before, so i have just added the interpreter below the main content section in the page.html. Below are the ss of the code i added. Please check out the folder structure i don't know if i am on the right one or not.

plugin3
plugin 2

@THEBOSS0369
Copy link
Author

Hey @sumn2u ! Now the Interpreter will be working i moved the code from interpreter.js file to the main page.html file maybe it was not importing the code from the interpreter.js correctly, Also i don't know about why sidebar is hiding i didn't made any change that will affect the sidebar. If the sidebar is still not visible after this commit, then i will try removing the style from the JS Interpreter, maybe that is causing the issue.

@sumn2u
Copy link
Owner

sumn2u commented Aug 13, 2024

Hey @sumn2u ! Now the Interpreter will be working i moved the code from interpreter.js file to the main page.html file maybe it was not importing the code from the interpreter.js correctly, Also i don't know about why sidebar is hiding i didn't made any change that will affect the sidebar. If the sidebar is still not visible after this commit, then i will try removing the style from the JS Interpreter, maybe that is causing the issue.

Can you share me an example script that i can run inside the code editor?

Tried this one but it throws an error.

Screenshot 2024-08-12 at 10 45 18 PM

@THEBOSS0369
Copy link
Author

THEBOSS0369 commented Aug 13, 2024

It shouldn't be happening, but anyways this time i have written this code again, it must be working now i have added the same code in the learn js to try whether the interpreter is working or not. I have added in folder book/en/conditional-logic/if.html and i tried with the code you were trying plus the codes written in the book. These are the result. Also , please refresh the page if it still not works then it will work it.

Also, Please don't mind me replying this late I had to go to college so i wasn't able to reply.

code working 4
code working 1
code working 2
code working 3
code working 5

@sumn2u
Copy link
Owner

sumn2u commented Aug 13, 2024

Nice Work! However, there are some issues: It appears on every page, even on those where we only want to show text content, and it's currently placed at the bottom of every page. We might need to reconsider how and where we invoke it, allowing more flexibility in positioning it where necessary, rather than limiting it to the bottom.

@THEBOSS0369
Copy link
Author

THEBOSS0369 commented Aug 13, 2024

100 Percent Agree! I searched the whole directory in this repository but i wasn't able to find the code for the single page. The best way i think is we have to add it in every single page wherever we want it to and that can only be done in main learn-js repository but it won't save, it will go back to its original state.

Also what should i have to do now like earlier you said me to add the dependency of this commit in learn-js
"gitbook-plugin-theme-creative": "https://github.com/sumn2u/gitbook-plugin-theme-creative.git#b1e336b9527493233bbd7e95a815b00987137bdd"

i will have to change this #b1ee with the new commit i made, this one 70be18c7223625f512fcd580d182dfe85c79e48a and then npm install right?

@sumn2u
Copy link
Owner

sumn2u commented Aug 13, 2024

We could consider creating a library that can be invoked wherever needed. Let's explore this option. I'll develop a basic structure for you to build upon and will notify you once it's complete.

@THEBOSS0369
Copy link
Author

THEBOSS0369 commented Aug 13, 2024

Okay! Sounds Good 👌😁

@THEBOSS0369
Copy link
Author

One more thing , until then what will happen to this commit like it will get merged or closed till you create a library, i will try to contribute different code bases to develop my skills .
Also, can i connect with you on linkedin, like you seem to be in this field for years and i was finding a mentor to help me guide what's best for me , instead of me wasting time searching for what's good or not. It would just take few mins in a week i will just ask few questions and you can reply whenever you have time. You have been helping me whenever i'm getting stuck anywhere like a mentor.

@sumn2u
Copy link
Owner

sumn2u commented Aug 13, 2024

Here's a pull request that includes fixes: Link to PR. In this update, I’ve implemented a custom plugin for enhanced functionality, which can be found here: GitBook Ace Editor Plugin.

One more thing , until then what will happen to this commit like it will get merged or closed till you create a library, i will try to contribute different code bases to develop my skills .

If we are happy with the new solution, we can close this PR.

Also, can i connect with you on linkedin, like you seem to be in this field for years and i was finding a mentor to help me guide what's best for me , instead of me wasting time searching for what's good or not.

Sure.

@sumn2u
Copy link
Owner

sumn2u commented Aug 13, 2024

I applied the interpreter in exercises chapter.

https://learn-javascript-54q0wzfec-suman-kunwars-projects.vercel.app/en/exercises/

@sumn2u sumn2u closed this Aug 13, 2024
@THEBOSS0369
Copy link
Author

I applied the interpreter in exercises chapter.

https://learn-javascript-54q0wzfec-suman-kunwars-projects.vercel.app/en/exercises/

It looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants