What is "Spintax"?
Spintax is a way of writing text that can be "spun" out into multiple variations. The whole point of spintax is to create variations. For example, when using mass page platforms, spintax is used to add synonyms to words and therefore create millions of variations out of one article, increasing the reach of a relatively small amount of text content. With this said, however, spintax can be used for any bit of text that you would like variations in, like putting in 5 image URLs and each variation picks a different image.
Fun fact: "spintax" is a portmanteau of "Spinning syntax"
How does spintax work?
Spintax by itself doesn't do anything; it's interpreted by a "spinner" (an algorithm that takes the spintax and renders the variations from in). In Menterprise Content, we utilise spintax for synonym, sentence, paragraph and module variation. In Menterprise Publishing, we interpret or "spin" spintax content out into thousands of pages based on the variations provided.
Spintax is all about variations, so when we write spintax we are writing variations of text that will eventually culminate into one piece of text.
How do I write spintax?
Spintax has three characters in it's syntax: { } |
Let's break down what those characters mean and how we combine them into spintax. Firstly, we have the "curly" braces, { and }. These two denote a statement that contains variations. Second, we have the pipe |. This denotes a separation in variations.
With that out of the way, let's write some spintax. It goes like this:
So what did we do? We created a single-level spintax that will have two variations: "variation one" and "variation two". You'll also notice that this looks like what Menterprise Content produces.
What's next? Let's go through multiple spintax statements. Below is an example of this:
This example would have 4 unique variations. Why 4? Our first statement {weekday|weekend} has 2 variations and {cold|hot} has 2, so 2 variations times 2 variations is 4 total unique variations. If we added another variation like {!|?} at the end, it'd be 2 times 2 times 2 variations... you can see how this can grow quickly and how Menterprise Content and Menterprise Publishing can produces millions of unique variations from one spintax article!
What is "nested" spintax, and how do I write it?
Above we mentioned spintax variations and how to write them, but this isn't all you can do; you can also nest spintax and create crazy variations. Below is an example:
This text has four variations:
- My favourite fruit is an apple!
- My favourite fruit is an orange!
- My favourite vegetable is a carrot!
- My favourite vegetable is broccoli!
Notice how we've add the food types (fruit/vegetable) in spintax and then inside that we've nested some options, like apple and carrot. Doing this we've added some context (we wouldn't want to mix "fruit" and "carrot"). Of course, this is a small example, and you can technically nest spintax thousands of levels deep.