A simple Vue component to render GitHub Gist content by URL.
npm install gist-viewer-vuebash
npm install gist-viewer-vue
`
or
`bash
yarn add gist-viewer-vue
`
π οΈ Usage
$3
Register the package globally in your main.ts or main.js file:
`JavaScript
import { createApp } from "vue";
import App from "./App.vue";
import GistViewer from "gist-viewer-vue";
const app = createApp(App);
app.use(GistViewer); // Registers the plugin globally
app.mount("#app");
`
You can now use the component anywhere in your app.
$3
To use it in a specific component, import it locally:
`HTML
`
βοΈ Props
---
| Props | Type | Required | Default | Description |
| ------- | ------ | ----------- | -------- | ------- |
| gistUrl | string | β
| null | The URL of the GitHub Gist you want to display.
π Example
Here's an example of using the GistViewer component:
`HTML
My GitHub Gist
`
π¨ Customization
$3
This package uses Tailwind CSS for styling. You can customize the styles by modifying your Tailwind configuration or overriding the default styles.
π§ͺ Development & Contribution
We welcome contributions! Follow these steps to set up the package locally:
- Clone the repository:
`bash
git clone https://github.com/darshitdudhaiya/gist-viewer-vue.git
`
- Install dependencies:
`bash
npm install
`
- Run the development server:
`bash
npm run dev
`
π€ Contributing
We love contributions from the community! To contribute to this project, follow these guidelines:
$3
1. Fork the Repository: Click the "Fork" button on the repository page.
2. Clone Your Fork: Clone the repository to your local machine:
`bash
git clone https://github.com/your-username/gist-viewer-vue.git
`
3. Create a Branch: Create a new branch for your feature or fix:
`bash
git checkout -b my-feature-branch
`
4. Make Changes: Implement your changes in the codebase.
5. Commit Changes: Commit your changes with a clear and concise message
`bash
git commit -m "Add feature: XYZ"
`
6. Push Changes: Push your branch to your fork:
`bash
git push origin my-feature-branch
``