Skip to content

[Feature] - Migrating to a new snippet storage system #87

Closed
@technoph1le

Description

@technoph1le

What feature would you like to see?

Hi everyone!

After some discussions with our contributors and maintainers, we’ve decided to move to a new snippet storage system to keep up with our growing collection of snippets.

The Problem

Our current setup of storing snippets in a JSON file is starting to cause a few problems:

  1. For Contributors: Adding snippets line by line in a JSON file is tedious (see issue [Feature] - Add snippets in markdown instead Json.  #59). We had plans to make this easier with DevTools (see Adding devtools to make it easier to create snippets #39), but even with that, the JSON format itself feels limiting.
  2. For Maintainers: Reviewing snippets has become harder as the number of snippets grows.

Our proposed solution

We’re planning to switch to a Markdown-based system. Here’s what the new structure would look like:

/snippets
  |- language
       |- category
         |- snippet1.md
         |- snippet2.md

language and category will be folders and each snippet will be in its own Markdown file.

Here’s the snippet format:

---
title: Name of the snippet
description: A short explanation of what the snippet does
tags: tag1, tag2, tag3
author: your-github-username
---

```lang
// Your code here
```

New Field: contributors

There's planned to be a new field, called contributors. This field is for recognizing anyone who improves or refines a snippet in the future. The original author will still get credit, but contributors will also be listed so everyone gets the recognition they deserve.

Read more in CONTRIBUTING.md file.

Thoughts

We believe that this system will be easier for both parties, contributors and maintainers to add, edit and review snippets.

We’d love to hear your feedback on this plan! If you’ve got suggestions or ideas, feel free to share them here. We’ll keep this issue updated as we work through the migration. 🚀

Thanks for being part of this journey and helping improve QuickSnip!

Generated by ChatGPT

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions