{"id":5430,"date":"2020-02-02T17:35:08","date_gmt":"2020-02-02T17:35:08","guid":{"rendered":"https:\/\/musilda.cz\/?p=5430"},"modified":"2020-02-02T17:35:08","modified_gmt":"2020-02-02T17:35:08","slug":"wordpress-xml-sitemap-brzy-bez-nutnosti-pluginu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/wordpress-xml-sitemap-brzy-bez-nutnosti-pluginu\/","title":{"rendered":"WordPress XML sitemap – brzy bez nutnosti pluginu"},"content":{"rendered":"\n
XML sitemapa je d\u016fle\u017eit\u00fd SEO prvek, kter\u00fd bylo nutn\u00e9 doposud \u0159e\u0161it instalac\u00ed pluginu. To se z\u0159ejm\u011b ji\u017e brzy zm\u011bn\u00ed a xml sitemapu bude WordPress obsahovat v z\u00e1kladu.<\/p>\n\n\n\n
P\u0159esto\u017ee se jedn\u00e1 o velmi z\u00e1kladn\u00ed v\u011bc, p\u0159i vytvo\u0159en\u00ed webu, kter\u00e1 umo\u017e\u0148uje vyhled\u00e1va\u010di rychleji indexovat a aktualizovat dostupn\u00e9 url adresy, WordPress ji v z\u00e1kladu neobsahuje. <\/p>\n\n\n\n
Pokud se pod\u00edv\u00e1te na nejpopul\u00e1rn\u011bj\u0161\u00ed pluginy pro WordPress, tak v prvn\u00edch patn\u00e1cti je hned n\u011bkolik plugin\u016f, kter\u00e9 toto do WordPressu dopl\u0148uj\u00ed. Z toho vypl\u00fdv\u00e1, \u017ee to je d\u016fle\u017eit\u00fd a \u017e\u00e1dan\u00fd dopln\u011bk. <\/p>\n\n\n\n
Nov\u011b je tedy v pl\u00e1nu, do WordPressu p\u0159idat podporu pro generov\u00e1n\u00ed sitemapy ji\u017e v z\u00e1kladu. <\/p>\n\n\n\n
P\u0159id\u00e1n\u00ed nov\u00e9 featury, m\u00e1 n\u011bkolik krok\u016f, od n\u00e1padu, p\u0159es jeho schv\u00e1len\u00ed, vytvo\u0159en\u00ed takzvan\u00e9ho featured pluginu a jeho implementace do j\u00e1dra. <\/p>\n\n\n\n
Aktu\u00e1ln\u011b je WordPress xml sitemap ve f\u00e1zi featured pluginu, kter\u00fd je ji\u017e p\u0159ipraven pro testov\u00e1n\u00ed. <\/p>\n\n\n\n
Ten v\u00e1m umo\u017en\u00ed v z\u00e1kladu u\u010dinit n\u00e1sleduj\u00edc\u00ed typy obsahu indexovateln\u00e9:<\/p>\n\n\n\n
\u2013 Homepage
\u2013 V\u00fdpis \u010dl\u00e1nk\u016f
\u2013 V\u00fdchoz\u00ed typy obsahu (str\u00e1nky a \u010dl\u00e1nky)
\u2013 Vlastn\u00ed typy obsahu
\u2013 V\u00fdchoz\u00ed taxonomie (\u0161t\u00edtky a ketgorie)
\u2013 Vlastn\u00ed taxonomie
\u2013 Auto\u0159i<\/p>\n\n\n\n
Plugin po aktivaci vytvo\u0159\u00ed soubot sitemap.xml, co\u017e bude index se v\u0161emi sitemapami pro ostatn\u00ed typy obsahu. <\/p>\n\n\n\n
Ka\u017ed\u00e1 sitemapa bude dostupn\u00e1 na url ve form\u00e1tu sitemap-{object-type}-{object-subtype}-{page}.xml .<\/p>\n\n\n\n
Limit pro xml sitemapy je 50 tis\u00edc url adres a 50MB, ale v praxi doch\u00e1z\u00ed k probl\u00e9m\u016fm p\u0159i generov\u00e1n\u00ed query pro n\u011bkolik tis\u00edc url adres (zpomalov\u00e1n\u00ed) a proto je limit pro ka\u017edou sitemapu nastaven na 2 tis\u00edce url adres. <\/p>\n\n\n\n
Auto\u0159i se rozhodli, nezab\u00fdvat se v tuto chv\u00edli cacheov\u00e1n\u00edm XML sitemapy, proto\u017ee to nen\u00ed hlavn\u00edm \u00fakolem. Priorita je generov\u00e1n\u00ed aktu\u00e1ln\u00ed sitemapy, tak aby m\u011bl vyhled\u00e1va\u010d p\u0159\u00edstup k \u010derstv\u00fdm dat\u016fm. <\/p>\n\n\n\n
Pokud jsem spr\u00e1vn\u011b pochopil koment\u00e1\u0159 autor\u016f, tak nyn\u00ed je sitemapa generov\u00e1na dynamicky a pracuje se na zappojen\u00ed WP Cronu, kter\u00fd bude spou\u0161t\u011bn dvakr\u00e1t za den a bude generovat sitemapu z dat o zm\u011bn\u00e1ch obsahu, kter\u00e1 budou ukl\u00e1d\u00e1na do wp options tabulky. <\/p>\n\n\n\n
Dal\u0161\u00edm miln\u00edkem pak bude vyvinut\u00ed robustn\u00edho cache \u0159e\u0161en\u00ed, ter\u00e9 bude z\u0159ejm\u011b obsahovat i nov\u00e9 tabulky v datab\u00e1zi, tak aby byl v\u00fdkon webu ovlivn\u011bn co nejm\u00e9n\u011b. <\/p>\n\n\n\n
Plugin pro testov\u00e1n\u00ed si m\u016f\u017eete st\u00e1hnout zde https:\/\/wordpress.org\/plugins\/core-sitemaps\/<\/a> , Github reposit\u00e1\u0159 najdete zde https:\/\/github.com\/GoogleChromeLabs\/wp-sitemaps<\/a> .<\/p>\n\n\n\n Uvid\u00edme, jak se implementace autor\u016fm povede, ur\u010dit\u011b bude kolem toho velk\u00e1 diskuze, ale v ka\u017ed\u00e9m p\u0159\u00edpad\u011b je toto dal\u0161\u00ed roz\u0161\u00ed\u0159en\u00ed j\u00e1dra, kter\u00e9 v\u00edt\u00e1m.<\/p>\n\n\n\n Pokud netu\u0161\u00edte co je sitemap a k \u010demu slou\u017e\u00ed, zde jsou dva \u010dl\u00e1nky, kter\u00e9 v\u00e1m to objasn\u00ed:<\/p>\n\n\n\n XML sitemapa je d\u016fle\u017eit\u00fd SEO prvek, kter\u00fd bylo nutn\u00e9 doposud \u0159e\u0161it instalac\u00ed pluginu. To se z\u0159ejm\u011b ji\u017e brzy zm\u011bn\u00ed a xml sitemapu bude WordPress obsahovat v z\u00e1kladu. P\u0159esto\u017ee se jedn\u00e1 o velmi z\u00e1kladn\u00ed v\u011bc, p\u0159i vytvo\u0159en\u00ed webu, kter\u00e1 umo\u017e\u0148uje vyhled\u00e1va\u010di rychleji indexovat a aktualizovat dostupn\u00e9 url adresy, WordPress ji v z\u00e1kladu neobsahuje. Pokud se pod\u00edv\u00e1te<\/p>\n","protected":false},"author":1,"featured_media":5431,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[48,30],"tags":[],"class_list":["post-5430","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-novinky","category-wordpress"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5430"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=5430"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5430\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/5431"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=5430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=5430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=5430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}