65
submitted 11 months ago* (last edited 11 months ago) by Ategon@programming.dev to c/meta@programming.dev

The instance has now been upgraded up to 0.19.1 from 0.18.5

Due to some authentication changes you will need to log in again and set up 2fa again if you had it previously enabled (since the 2fa process changed to prevent people locking themselves out)

Code Highlighting

If you make code blocks using the three backticks method the code in it will automatically be highlighted based on the detected language (in lemmy-ui aka the site)

Surrounding in 1 backtick lets you do it inline

E.g.

`console.log("hello world")` becomes console.log("hello world")

```
console.log("hello world")
```

Becomes

console.log("hello world")

The blocks will be light if youre on the light theme and dark if youre on the dark theme

Instance Blocking

This is for lemmy-ui, alt frontends may not have support yet or may be done a different way

Go to your profile settings by hitting your name, then settings in the top right

There should be a blocks section you can switch to. Go to the instances part of that and search for the instance you want to block

Blocking an instance will prevent you from seeing posts from that instance

Scaled sort

When you go to choose a sort while browsing posts you should see an option called scaled. This is hot but takes into account the active users to boost communities that need it. (E.g. a community with 20 active users will be shown more than a community with 10000)

Remote following

You can follow a community while browsing it from the site of another instance. To do this just hit subscribe for the community while not logged in on that other instance and it'll bring up a pop-up where you can enter your instance you want to subscribe from

Https://github.com/LemmyNet/lemmy-ui/pull/1875#issuecomment-1727790414

you are viewing a single comment's thread
view the rest of the comments
[-] Andy@programming.dev 10 points 11 months ago

Woohoo! You didn't even mention: code blocks no longer mangle ampersands and less-than symbols!

  • Is there any way to force it to be recognized as a specific programming language?
  • What library does it use? I'd like to see which langs are supported.
  • Might it become possible to have it use our system/browser-preferred mono font?

Anyway it looks great and is a much appreciated feature, thank you!

[-] Ategon@programming.dev 8 points 11 months ago* (last edited 11 months ago)

1 -> yep, to make it a certain language put that language after the first three backticks. For inline you can do it using curly braces after the second backtick with a dot and then the language in it

```abnf
x=4
```

x=4

`x=4`{.haskell}

x=4{.haskell}

`x=4`{.js}

x=4{.js}

2-> https://www.npmjs.com/package/markdown-it-highlightjs is the specific one but its basically just a wrapper around highlightjs

3 -> ~~unknown, I didnt mess around with that when implementing them and I dont think it supports it.~~ edit: can probably be added manually by messing around with css. Ill do a pull request after my exams

[-] Andy@programming.dev 2 points 11 months ago

I had a look and it can be set by setting font-family inside the .hljs block within the theme (e.g. atom-one-dark.css).

[-] Ategon@programming.dev 3 points 11 months ago* (last edited 11 months ago)

Yeah setting that to monospace so browser determines it. Should just be two lines, one for each theme

Pull request maybe coming late tomorrow and then it'll probably be in 0.19.2

[-] Andy@programming.dev 2 points 10 months ago

Honestly that sounds good to me, but not everyone configures their own preferred fonts, so it may not be a crowd pleaser. It's not too bad for me to just override the style on my side.

[-] Andy@programming.dev 1 points 11 months ago
this post was submitted on 22 Dec 2023
65 points (100.0% liked)

Programming.dev Meta

2365 readers
2 users here now

Welcome to the Programming.Dev meta community!

This is a community for discussing things about programming.dev itself. Things like announcements, site help posts, site questions, etc. are all welcome here.

Links

Credits

founded 1 year ago
MODERATORS