1$(function(){ 2 $.ajax({ 3 type: 'GET', 4 url: 'https://sspc.blog/wp-json/wp/v2/posts?_embed', 5 dataType: 'json' 6 }).done(function(json){ 7 var html = ''; 8 //è¨äºã®ä»¶æ°åã¤ãã¬ã¼ããã 9 $.each(json, function( i, row ) { 10 11 //ããã°ã®ã¿ã¤ãã« 12 var title = row.title.rendered; 13 //ããã°ã®URL 14 var link = row.link; 15 //ããã°ã®æ¬æ 16 var excerpt = row.excerpt.rendered; 17 //ãµã ãã¤ã«ç»åã®URL 18 var thumbnail 19 if( row['_embedded']['wp:featuredmedia'] ) { 20 thumbnail = row['_embedded']['wp:featuredmedia'][0]['media_details']['sizes']['full']['source_url'] 21 } 22 html += '<article class="wp-article"><a target="_blank" href="' + link + '">'; 23 html += '<div class="eyecatch"><img src="' + thumbnail + '"></div>'; 24 html += '<h3>' + title + '</h3>'; 25 html += '<p>' + excerpt + '</p>'; 26 html += '</a></article>'; 27 }); 28 //æ´å½¢ããè¨äºã®æ å ±ããã¼ã¸ã«è¿½å ãã 29 $('#wp_blog').append(html) 30 }).fail(function(json){ 31 console.error('WordPressã®ããã°è¨äºåå¾ã«å¤±æãã¾ããã') 32 }); 33});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.