Notifications
Sign Up Sign In
Meta

Sefaria linking is now installed

+11
−0

This is a test to see if the Sefaria linking works. @ArtOfCode says just make things that look like references. So I suppose Genesis 1:1 should give me the first Pasuk of the Torah. Let's see...

Why should this post be closed?

8 comments

Avot 4:1 . Shulchan Aruch Orach Chaim 261:1 Isaac Moses about 1 month ago

It looks to me like the linking is done each time, on the client side. So if the person reading the post has that Javascript blocked, then they don't get the links. Not really a big issue, but might be worth keeping in mind. aCVn about 1 month ago

@aCVn That is true, but (a) writing our own code to do this would be a lot of work, (b) there are plenty of other features that are helpful-but-not-critical, like preview, character count in comments, etc. that are dependent on having Javascript enabled. Anyone who makes the choice to disable Javascript will have to deal with the limited features. manassehkatz about 1 month ago

What about Bereishit 1:1 ? Aliza about 1 month ago

@Aliza Works just fine. Just about everything works. Pretty amazing. manassehkatz about 1 month ago

Show 3 more comments

2 answers

+12
−0

In more detail: yes, this site now has the Sefaria linker plugin installed. It's a JavaScript plugin, so you need JavaScript enabled for this site for it to work for you. We don't do anything malicious, promise!

Each time you load a page, the linker will look for things in posts that look like scripture references, and if it finds any, will add a link to them that pops up an embedded version of the text on Sefaria with a Read More link to go to the full thing. This is also why you'll also see a short delay before these links are added sometimes.

This also means that pages on this site should gradually start to be listed on Sefaria as having linked to specific bits of scripture.


Since it's not always clear exactly what text will generate a link to Sefaria and what won't, there's also a second new button (the Torah scroll icon). While you're writing a post, you can select some text that you think might be a reference and click the button - it will bring up a list of suggestions that will generate Sefaria links, and clicking on one will replace your selected text with that reference.

9 comments

Not just "scripture", which typically refers to the Tanakh (Bible), as in the example in my post, but also the Mishnah (example in Isaac's comment), Gemara (like Bava Metzia 8a that I'm in a class on Sunday mornings) and Halachic writings (example in Isaac's comment). manassehkatz about 1 month ago

You're the most responsive Q&A platform dev team I've ever seen, by far! Isaac Moses about 1 month ago

This is so cool! Also, @IsaacMoses - good to have your further examples. This strikes me as pretty wonderful. :) David about 1 month ago

Bravo! Many thanks! msh210 about 1 month ago

"This also means that pages on this site should gradually start to be listed on Sefaria as having linked to specific bits of scripture." I didn't know Sefaria has such a feature. Will it really work even though these are JS-based links? msh210 about 1 month ago

Show 4 more comments
+6
−0

A previous draft here had an experiment. After digging through the code for the Linker I can confidently say that a complete answer to the question of "what can I link to" is "anything on Sefaria," but you have to be careful how you write it out. Here is the actual code for the Linker; if you scroll down or search the document for "var bookTitles" you'll see a full list of every variation on the text name that you can use. Or if you're not insane like me you can look at the documentation on GitHub.

Of course, our ever-helpful overlords here have implemented a "suggest reference" button. With that, all you have to do is select some text in your post, click the button, and it'll look for similarly-worded sources which you might've meant.

6 comments

Mishneh Torah, Foreign Worship and Customs of the Nations 3:5 as a test. It works but requires the full title string. manassehkatz about 1 month ago

As far as the edit preview, I think that would be a bit of a problem. I took a quick look at the Sefaria API docs earlier, and I am pretty sure there is a way we can force a fresh analysis of the page, which should work with the Preview. However, doing that on every character would be a bit impractical. Two options: 1 - Only do this if there is a monitored delay (e.g., no typing for 10 seconds), 2 - Add a button to trigger it. manassehkatz about 1 month ago

@manasseh Ah, so it was the comma messing me up with the Rambam. I hear the difficulty with implementing the preview; maybe something to put on the back burner for a future time then. Does the API support, for example, adding a button to the menu bar to browse texts to cite, or would that also be too complicated to work out? DonielF about 1 month ago

@DonielF Does the API support, for example, adding a button to the menu bar to browse texts to cite, or would that also be too complicated to work out? I haven't looked into enough. manassehkatz about 1 month ago

You can read more about how the Linker works at https://www.sefaria.org/linker and the GitHub project linked there. Isaac Moses about 1 month ago

Show 1 more comments

Sign up to answer this question »

Like any library, this site offers tons of great information, but does not offer personalized, professional advice, and does not take the place of seeking such advice from your rabbi.

This site is part of the Codidact network. We have other sites too — take a look!

You can also join us in chat!

Want to advertise this site? Use our templates!