Skip to main content

Ralsina.Me — Roberto Alsina's website

Twitter Card Support in Nikola

This fea­ture for Niko­la was im­ple­ment­ed by @amok­leben, and now, if you ask twit­ter your site can have it too.

What are Twit­ter Card­s? Did you no­tice that for some sites, when you click on tweets that have links, you get a small pre­view of the con­tent? Well, that's a twit­ter card.

This still needs a lit­tle im­prove­ment to sup­port the rich­er "me­di­a" card­s, but it does work:

//ralsina.me/galleries/random/twitter-card.png

Yes, that's a pic­ture of the twit­ter card for this post. How meta, right?

You don't have to do any­thing in your site, but set­ting the "de­scrip­tion" meta­da­ta to your posts helps make this more ac­cu­rate (and it al­so works for google+)

Nikola 5.4 is out!

I am thrilled to an­nounce the re­lease of ver­sion 5.4 of Niko­la, a stat­ic site/blog gen­er­a­tor

Here's the (in­com­plete!) changel­og for this re­lease [1]:

Features

  • Twit­ter Card / Open Graph sup­­port.

  • Smart math sup­­port

  • New sound­­could di­rec­­tive

  • Cus­­tom "read more" links

  • Bet­ter time dis­­­play, time­­zone sup­­port

  • Bet­ter doit in­­te­­gra­­tion (Is­­sue #151)

  • Make the whole list­ings fold­er brows­able (Is­­sue #128)

  • New GZIP_­­FILES/GZIP_EX­TEN­­SIONS op­­tions to cre­ate gzipped copies of some files (Is­­sue #348)

  • New op­­tion­al path pa­ram­e­ter to new_­­post com­­mand.

  • Word­­press im­­porter: op­­tion to not down­load files

  • Word­­press im­­porter: op­­tion to squash new­­lines

  • Sep­a­rat­ed BLOG_URL in­­­to SITE_URL and BASE_URL

  • Added DIS­­ABLED_­­PLU­G­INS op­­tion (Is­­sue #354)

Bugfixes

  • Added mis­s­ing </­di­v> in de­­fault theme tem­­plates.

  • Word­­press im­­port: De­scrip­­tion is left em­p­­ty if no de­scrip­­tion is found.

  • When run­n­ing the build com­­mand it is now pos­si­ble to get help.

  • Load jQuery be­­fore boot­s­trap in JS bun­­dle (Is­­sue #327)

  • Gen­er­ate valid HT­M­L5 for redi­rects (Is­­sue #276)

  • Fixed "niko­la check"

  • Fixed in­­ter­­na­­tion­al­ized RSS links

  • Make com­­mands that need to be run in a site fail grace­­ful­­ly (Is­­sue #342)

  • Use lo­­cal­ized links on lxml fix­er

  • Redi­rec­­tions cre­at­ed dur­ing the im­­port from word­­press are now writ­ten to con­f.py

  • Stop pars­ing meta­­da­­ta in post file on first blank line

  • Meta­­da­­ta han­dling cleanups by Tordek

  • Fixed block­­quote font size in­­­con­­sis­ten­­cy

  • Word­­press Im­­port: Do not break in­­­den­­ta­­tion (is­­sue #189)

  • Make things work even if SITE_URL has a path (Fix #307)


Contents © 2000-2023 Roberto Alsina