Giter VIP home page Giter VIP logo

githubcopy's Introduction

GitHub Copy Code Button

Introduction

GitHubCopy is a simple TypeScript program that generates Markdown code. Combined with the free service GitHub Pages, you can integrate a Copy code button or link directly into your Markdown files. The button/link is completely customizable because it's just a regular URL. No servers needed. No additional files needed. The only visible modification you need to add to your Markdown files is a little arrow. It would look like this:

class Animal extends Dog;

Copy code

More content...

Here would be a JS Script tag.

Usage

You can use the GitHubCopy generator in every JavaScript environment, either as a module or as a function as the TS source or as compiled JS. For more infos about the generator, read the JSDoc comments in the TS source code.

To integrate the code into your Markdown file, just paste the [result].markdown at the end of your markdown file, and then you just have to link to your GitHub Page with the link provided by the script ([result].urls[x].url).

Creating a GitHub Page is pretty easy:

  • Go to your repository page.
  • Click on the settings tab.
  • Scroll to the GitHub Pages section
  • Select a branch that you want to publish
  • Click on save
  • (Optional) Enter your domain to use your own instead of a GitHub.io subdomain

Example/Demonstration

See demo.md.

Planned Updates

I might add a web interface soon. Currently you have to use a JS Console, but it can be ported for web because it's written in TS.

Special Thanks

Special thanks to my Insomnia. This project was created at 3am on a thursday because I couln't sleep so I spent my time coding this while watching Tofu-chan (the only thing thats keeping me sâne pleέ śƎήĎ ђξҐſ)

githubcopy's People

Contributors

lxhom avatar

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.