GithubHelp home page GithubHelp logo

Highlight JS about ditto HOT 10 CLOSED

chutsu avatar chutsu commented on July 28, 2024
Highlight JS

from ditto.

Comments (10)

chutsu avatar chutsu commented on July 28, 2024

I didn't actually think people were really using it, I removed it recently I could add it back in if you want?

from ditto.

Orcomp avatar Orcomp commented on July 28, 2024

Yes please. Or make it optional. This would be very useful for me. Thanks

from ditto.

ConnorAtherton avatar ConnorAtherton commented on July 28, 2024

@chutsu We should use bower to include external dependencies like marked and highlightjs. That would make this process super quick.

from ditto.

chutsu avatar chutsu commented on July 28, 2024

@ConnorAtherton How would that work? Can I do a dynamic include in the HTML file? I'm not sure how a package manager could help solve this problem.

We would ideally want to make this project free from using as much tools as possible, because requiring the user to install npm and then bower would lose ditto's light weight appeal. For now if it is a matter of including Highlight.js or not, we could just write a simple shell script to delete the line.

What do you think?

from ditto.

chutsu avatar chutsu commented on July 28, 2024

I had another thought, if the usage of bower is purely for development purposes I'm open to it. But I would like to hide that from a end-user point view.

from ditto.

ConnorAtherton avatar ConnorAtherton commented on July 28, 2024

The user wouldn't have to install anything. It would all be minified and concatenated into a file that they drop into their page and it just works ™️.

We would use bower just to keep track of what files are included in the project instead of having hardcoded copied versions. You could even take it even further and generate 2 versions; one with external plugins and one without.

from ditto.

chutsu avatar chutsu commented on July 28, 2024

Ok, lgtm lets go for it then :)

from ditto.

chutsu avatar chutsu commented on July 28, 2024

@Orcomp, hi just wanted you to know that I have added code highlighting back. If you want to enable it please use the latest version or version 0.12. You can turn on code highlighting in the index.html file, via:

ditto.highlight_code = true;

Thanks, let me know if you found any more issues.

from ditto.

Orcomp avatar Orcomp commented on July 28, 2024

Thanks it works great but I had to make a change to the index.html file:

Before:

<!-- DITTO -->
<link rel="stylesheet" href="//chutsu.github.io/ditto/ver/latest/ditto.css">
<script src="js/ditto.js"></script>

After

<!-- DITTO -->
<link rel="stylesheet" href="//chutsu.github.io/ditto/ver/latest/ditto.css">
<script src="//chutsu.github.io/ditto/ver/latest/ditto.js"></script>

from ditto.

chutsu avatar chutsu commented on July 28, 2024

That was intentional, I think you might have grabbed the wrong index.html. The index.html at the root of the repo is only for development purposes, I was assuming the user would use the install script described in the README.md. :)

from ditto.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.