Vaikuta Facebook-julkaisun ulkoasuun Open Graph -tiedoilla

Uudet viimeisen hienot nettisivut vihdoin valmiit ja olet valmis julkistamaan sen maailmalle. Kirjoitat tai liität osoitteen Facebookin tekstikenttään ja klikkaat Julkaise.

Kauhuksesi huomaat, että julkaisuun ilmestyy joku aivan kamala kuva sivustoltasi tai kuva, jota ei pitäisi siellä edes olla tai joissain tapauksissa ei kuvaa lainkaan. Kuvan alle ilmestyvät tekstitkin ovat mitä kummallisempia litanioita eikä niissä ole myynnillisyyden palaakaan. Uudet upeat nettisivusi näyttäytyvät Facebookin sekasotkuna.

Tarkista sivustosi Open Graph -tiedot

Facebook hakee Graph eli OG-tiedoista Opens. Mikäli et ole tietojen eteen mitään, on data vain satunnaisia otoksia sivustoltasi. Facebook kehitti Open Graphin vuonna 2010. Sen tarkoitus on helposti löydettäviä, yhtenäisiä tietueita nettisivujen ja Facebookin välillä ja niiden avulla Facebook luo jokaisesta sivustosta samanmuotoisen julkaisun. Sittemmin myös muut sosiaalisen median alustat ovat ottaneet OG-tiedot hyötykäyttöön.

Tietoja haetaan ja näytetään sivustoilta tietyssä järjestyksessä. Järjestyksen ymmärtämällä voi päätellä, onko isommille muokkauksille tarvetta jokaisen sivun kohdalla vai näkyykö sivu oikein ns. perusasetuksilla. Esimerkiksi sivustosi näyttämä, Facebook-julkaisun yhteydessä näkyvä OG-kuva (og:picture) haetaan käyttäen seuraavaa järjestystä:

  1. Sinun asettamasi Facebook OG-kuva
  2. Artikkelikuva
  3. Muut sivulla käytetyt kuvat
  4. Kuva Embedly tai Getty -palveluista, jos niitä on käytetty sivustolla
  5. Oletusarvoinen lisäosan avulla asetettu OG-kuva (ohje tämän artikkelin lopussa)
  6. Ei kuvia = ei kuvaa

WordPress-sivuston Open Graph -tietojen muuttaminen Yoast SEO -lisäosan avulla

Asenna sivustollesi Yoast SEO -lisäosa ja ota se käyttöön https://www.zoner.fi/paranna-wordpress-sivuston-hakukonenakyvyytta-seo-lisaosan-avulla/ ellet ole jo asentanut sitä aiemmin. Keskitymme nimenomaan OG-tietojen muokkaukseen, mutta kannattaa tutustua linkin takaa myös muihin ominaisuuksiin that is lisäosan.

1. Yoast SEO -laatikko

Mene sivun muokkaustilaan ja etsi Yoast SEO -laatikko. Se on teemasta riippuen joko tekstieditorin ylä- tai alapuolella.

Laatikon vasemmassa reunassa näkyvät Yoastille tyypilliset liikennevalot, jakamisen ja asetuksia merkkaava rataskuvake. Klikkaa jakamisen kuvaketta.

2. Facebook-julkaisut

Syötä tiedot, jotka haluat näkyviin, kun ko. sivu jaetaan Facebookissa. Voit halutessasi määrittää Twitteriin omat tietonsa.

  • Facebook Title = Facebook-julkaisun otsikko.  Jos kohdan tyhjäksi Facebook tähän ko. sivun otsikon
  • Facebook Description = Otsikon alle tuleva teksti.  Jos kohdan tyhjäksi Facebook tähän ko. Tai sen puuttuessa osan sivun teksteistä sisältäen myös mm. Artikkelin päivämäärä- ja kirjoittajatiedot
  • Facebook Image = Julkaisun kuva.   Määritä, mikä kuva julkaisussa näkyy. Suosituskoko on 1200 x 630px. Jos kohdan tyhjäksi Facebook tähän artikkelikuvan tai satunnaisen, sopivan kokoisen kuvan sivustoltasi.

3. Tallenna muutokset

Lopuksi tallenna muutokset painamalla Päivitä painiketta.

WordPress-sivuston oletusarvoisen OG-kuvan asettaminen

Jos varmistaa, että sivustosi sivu näyttää jaettaessa parhaan mahdollisen kuvan, mutta et jaksa käydä jokaista sivua erikseen läpi, mikäli toista ei ole määritetty, voit asettaa sivustolle kuvan joka näytetään julkaisussa automaattisesti.

Simple Facebook OG Image https://fi.wordpress.org/plugins/simple-facebook-og-image/  on helppo ja yksinkertainen lisäosa, jonka avulla asetat ns. hätävarakuvan.

Lisäosan asentamisen jälkeen löydät lisäosan asetukset valikkokohdasta Asetukset — Simple Facebook OG Image.

Kohtaan Default Image ladataan oletusarvoinen OG-kuva ja Tallennetaan muutokset.

Spacious Graph -tietoja voi muokata avulla. Lisätietoja löytyy vaikkapa täältä http://ogp.me/

Kerro muutoksista myös Facebookille

Hakurobotit vierailevat sivustoilla kohtuullisen harvoin ja siksi tehdyistä muutoksista pitää ilmoittaa, jotta ne tulevat voimaan heti. Kutsu siis “raapijat” kylään käyttämällä Facebookin Sharing Debugger https://developers.facebook.com/tools/debug/sharing/ -työkalua.

Syötä sivustosi osoite kohtaan Enter an URL to view data that’s utilized when it’s shared on Facebook ja klikkaa Debug. Jos kyseessä on osoite, jota ei ole vielä jaettu Facebookissa, saat siitä ilmoituksen. Klikkaa ilmoituksesta nappulaa Fetch New Information.

Ja tiedot, jotka Facebookilla on sivustostasi tällä hetkellä. Kuinka kauan edellisestä tietojen tarkistuksesta was Scraped on by Kohdasta Time on. Klikkaa Scrape Again saadaksesi Facebookin hakemaan tiedot uudestaan.

Sivu päivittyy ja nyt tietojen pitäisi vastata juuri tekemiäsi muutoksia. Tee Scrape again aina kaikkien muutosten jälkeen, niin uusissa Facebook-julkaisuissa on varmasti oikeat tiedot. Näy vanhoissa, ennen muutoksia tehdyissä julkaisuissa.

The article Vaikuta Facebook-julkaisun ulkoasuun Open Graph -tiedoilla appeared on Zoner Web Hosting.

Open Graph and Twitter Cards

Say hello to the newest Pagekit launch 0.11.0. It comes with a much more installer and improved semantic markup. These are the modifications among several other, making Pagekit appropriate for your website project.

Rich Meta Tags

The release adds meta data to the markup to cater for sharing, accessibility and search engines on media. Not only is it easier for semantics, however sharing on Twitter and Facebook also appears beautiful.

Whereever possible, Pagekit employs default values like the image in a blog article. For different places, you can choose for yourself exactly what data you are interested in being used. To restrain what meta data is added, 2 sections are added to the admin interface. Go to Website > Settings > Meta to manage global settings along with also a default outline text.

For pages that are single, you will locate a Meta tab on top of the editor. When editing blog posts, this tab can be available.

Please bear in mind to upgrade your site extension from the platform extensions see to find the open graph encounter.

SQLite by default

With SQLite being an outstanding choice for pretty much percent of sites out there, we have opted to simplify the Pagekit installation and make SQLite the default driver.

If SQLite is not accessible if you favor MySQL or on a host, the option is offered. Existing Pagekit installations are untouched by this.

Document picker

If you wish to link to files from your storage, you can now select files when inserting a link. This works equally when inserting links in the editor and when adding a connection.

Setup Pagekit from the control line

For everyone and terminal fans who likes adware and automation, we have added a command to setup a Pagekit installation. Just provide email and password for the admin account and Pagekit will be installed using default settings and SQLite.

Php pagekit installation --adminpass=demoadminmail=admin@example.com

Internals

The launch incorporates further fixes and additions like a new view.init occasion, globals parameters are now handed to the opinion renderer and you are able to control where users have been redirected after they login. The Complete list of changes can be found from the changelog

Translate Pagekit

Is your language or are there a few translations lacking? Please help out and go to this Pagekit Transifex project. It would be wonderful to have Pagekit available in as many languages as possible for the last 1.0 release. Thank you!

We’re excited to share this release with you. Have fun with the newest variant and feel free to leave comments and opinions below.

How the Citus Dispersed database rebalances your data

In both Citus Cloud 2 and from the variant of Citus 7.1 there has been a pretty large update to one of our flagship attributes–both the shard rebalancer. No, I am not talking about our rebalancer visualization which reminds me of the Windows ’95 disk defrag. (Side-node: At one stage I attempted to convince my engineering group to play tetris songs at the background while the shard rebalancer UI at Citus Cloud has been running. The fantastic news for every one of you is that my own team overwhelmingly veto’ed me. Whew.) The intriguing new capacity from the Citus database is that the online nature of the shard rebalancer.

Before I dig into shard rebalancer upgrades, it’s probably beneficial to get some baseline understanding of the Citus dispersed database. Citus takes a desk and distributes it to shards (aka smaller Postgres tables) across multiple physical nodes. Here’s a good illustration:

Just how sharding in Postgres using Citus works

You have a events table. If you shard this events table using the Citus expansion to Postgres, under the covers we will create events_001, events_002, events_003, etc..

Each one of those shards is a Postgres table that is normal. Your own shard count is independent of the amount of nodes inside your Citus database bunch. We split them up among the nodes in your audience and then choose the shards. Which shard lives on which node listed inside metadata tables on the Citus coordinator node and is determined by the Citus software.

Now let’s have an example SQL query:

SELECT Decision
FROM events
WHERE user_id = 

Citus would alter this SQL query beneath the covers. Notice your program doesn’t need to do anything additional to distribute the SQL query over nodes onr across shards, instead, our Citus dynamic executors and router executors care of it for you. The resulting query would look something like:

SELECT Decision
FROM events_003
WHERE user_id = 

Nodes, shards, tables, even the transformation of SQL queries… what exactly does any of this have to do with shard scaling and interrogate outside Postgres?

When you originally make your Citus database bunch, you define the amount of shards, and it is much more of a limit of the amount into.

The old way of rebalancing

Ahead of Postgres 10 and earlier Citus 7.1, once you’d rather run the shard rebalancer, Citus would start transferring data to get a given shard/table to some other node from the Citus database bunch.

We didn’t need to have a lock to prevent data, while the shards were transferred. All reads of the Citus database will still continue to flow as normal, but the writes utilized to get queued up, while that lock has been held. And then, after that lock has been published, only then would we allow the writes to flow through as ordinary. For many applications this is alright and still was. And yet…

Let’s do some math regarding our rebalancer functioned in the previous times. (Actually, my teammate Claire informs me this isn’t mathematics, nor maths–instead, it’s just arithmetic.)

Anyhow, let’s do some arithmetic within this pre-Postgres 10 and pre-Citus scenario:

  • Let’s say you had 2 Citus worker nodes in your database cluster with 120 shards complete across both nodes.
  • You wished to add 2 more nodes, scaling out the whole Citus database bunch into 4 nodes.
  • Let’s suppose in this case, it might take you an hour to reevaluate the shards–i.e. to transfer half of the shards (60) in the present 2 Citus nodes into the 2 nodes that you just added into the Citus database bunch.
  • In the past, this meant that the impact on each shard was to get a 1-2 minute window, writes to people shards would get queued.
  • The fantastic news was that all the while your reads would have functioned as you had expected.
  • As each shard has been transferred, Citus would update the metadata about the Citus coordinator node to announce brand new SQL queries (you know, using this Citus router executor I said before) into the brand new Citus worker node.

To get a database bunch when adding nodes (consequently incorporating memory and vCPU and electricity), the last shard rebalancer experience with Citus was frequently adequate. Some of our clients even said that it was “fine”. But we are not okay with “good” we believed we can do better, we knew there were applications & use instances where a zero-downtime shard rebalancer would be valuable.

Enter Postgres 10, rational replication, and also the Citus zero-downtime shard rebalancer

Enter Postgres 10. The replication feature put a base to enhance the consumer experience because of our rebalancer.

At the Citus 7.1 launch, those few minutes of writes becoming queued up that used to exist will be reduced to milliseconds, thanks to the way Citus uses the newest Postgres 10 plausible replication capabilities. If you are unfamiliar rational replication– in layman’s terms, plausible replication allows us to acquire basic inserts, upgrades, deletes as they occur on the database in addition to filter them at a per-table or database perspective.

The strong fundamentals of the new logical replication feature in Postgres 10

The best way to prepare logical replication between two unique Postgres databases is to make exactly the same table schema on 2 unique Postgres databases, then to create a “novel” about the Postgres database that is taking writes, then to create a “subscription” over the Postgres database that you want to replicate to (i.e. to the Postgres database that’s meant to be a replica of the primary.)

Underneath the covers, the Postgres 10 starts copying the data in the table using the command. This occurs without obstructing writes, therefore that the first data copy finishes, the source table may have shifted. The magical at replication that is rational is that it’s going to keep a log of changes in the present time the data copy began and then put in them on the subscriber, maintaining it in sync.

This logical replication capacity in Postgres has a lot of potential. By way of instance, it may be employed to update Postgres. Our Citus expansion to Postgres now utilizes logical replication beneath the covers to scale a bunch seamlessly and also to rebalance your database without downtime.

Under the hood of the zero-downtime shard rebalancer at Citus

But when you run the shard rebalancer at Citus after adding a new worker node, then the Citus shard rebalancer selects which shards to proceed to the new node(s). To transfer a shard, the rebalancer creates the table structure, including indexes and constraints, to the new node puts up the novel and subscription to replicate the shard (including adjustments to the shard) into the new node.

The Citus shard rebalancer waits until the data copy is complete and the new node is caught up with all the shift log. When a few modifications are staying, the Citus coordinator waits for the node to grab with all the few staying writes and very briefly blocks writes , then drops the old shard and starts using the newest one. In this manner, the program will hardly notice that the data was being transferred.

Co-location makes the Citus shard rebalancer safe for software

Doing the rebalancing in an internet fashion means there is not any locking of writes, but what about?

For use instances with a lot of linking, you need to guarantee every one of the references into the data and not propagate across structures.

Together with Citus, once you shard your tables by a distribution key (sometimes referred to as a sharding key, or a partition key) such as tenant_id or customer_id (as many of our customers with multi-tenant software do), all tables associated with a particular tenant_id or customer_id are then co-located about precisely the same node. Citus ensures they remain together so that you can join them also keeps tabs on those tables that are co-located.

As soon as the Citus shard rebalancer starts transferring information, it respects a user’s data spans across people tables and multiple tables stay. To honor that, the rebalancer moves of the tables which will the cutover together with the writes in sync and have connections.

Wish to learn more about the way the Citus expansion to Postgres works?

If you have some questions regarding the inner workings of Citus, we are always pleased to spend some time talking about Citus, Postgres, and the way others are using Citus to present their software a kick (in regard to performance, and scale)

In Actuality, once I had coffee with a few of our users my heart was warmed by that CTO with these words:

“If I’d known I could talk to actual [knowledgeable & useful] people, I’d have contacted one months before.”

Therefore, in the event that you have any queries or simply want to say hello, feel free to join us at our idle channel. And if you want to jump on the telephone to research whether Citus is a fit for the usage situation contact us.

Number & Maths Puzzles

Number & Maths Puzzles Utilize your brain to fix these amount and maths puzzles. A number of them may be easy while other maths puzzles may be difficult. Test your thinking and show you can perform well with numbers and maths symbols in a kind of a puzzle.

Read More