Introducing blocks.programming.dev! This is a site to add small code snippets you make for sharing easily in threads in programming.dev if you need to do something like put the same code in multiple spots.

The site is running using software called opengist and is essentially an equivalent to gists in github. Repo for it is here https://github.com/thomiceli/opengist.

Snippets are accessible both in the web interface and using git if you prefer adding in code from your text editor and then pushing it.

You can find the site here: https://blocks.programming.dev.

  • OtterA
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    10 months ago

    Really cool! Could that code be rendered as markdown afterwards?

    I posted this in [email protected] some time ago about guides and megathreads going out of date.

    https://lemmy.ca/post/6390931

    This might be a good way to handle stuff like that, so you only have to edit in one place. Even if it doesn’t render, having a plaintext guide might be ok?

    • Ategon@programming.devOPM
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      10 months ago

      Not in lemmys current markdown system

      Can theoretically be parsed and embedded though but can’t control all frontends people use

      Only thing that works atm is linking to it

      We have another site more oriented towards images and text and then linking those at files.programming.dev but its limited to admins. e.g. of something on that http://files.programming.dev/u/9jsOS3.md