简体   繁体   English

网站首页上的虚假博客文章

[英]ghost blog post on website home page

I am using ghost blog integrated with my website as www.domainXX.com/blog. 我正在使用与我的网站集成为www.domainXX.com/blog的幽灵博客。

I want to display few important/recent blog on my website's home page.Is there any way I can do that except writing short description code of your blog manually and then give link to your blog using html/css. 我想在我的网站首页上显示一些重要/最近的博客。除了手动编写简短的博客描述代码,然后使用html / css链接到我的博客之外,有什么方法可以做到这一点。

I checked this website " https://www.nerdwallet.com/ " and they are using the same concept under "must reads by our expert" section. 我检查了该网站“ https://www.nerdwallet.com/ ”,他们在“必须由我们的专家阅读”部分使用相同的概念。

Thanks. 谢谢。

Yes, you can do that with Ghost API. 是的,您可以使用Ghost API做到这一点。 You can write a JavaScript widget that fetches your recent posts with ajax. 您可以编写一个JavaScript小部件,以用ajax获取您最近的帖子。

$.get(
    ghost.url.api('posts', {
      limit: 2, 
      include: 'count.posts', 
      order: 'count.posts DESC'
    })
  ).done(function (data) {
    console.log('Success!', data);
  });

http://themes.ghost.org/docs/ghost-api-ajax http://themes.ghost.org/docs/ghost-api-ajax

FYI ghost.url.api() might not be on your home website so you need reference it from your blog https://www.nerdwallet.com/blog/shared/ghost-url.min.js 仅供参考ghost.url.api()可能不在您的家庭网站上,因此您需要从博客https://www.nerdwallet.com/blog/shared/ghost-url.min.js引用它

Alternative solution would be to generate embedded RSS widget pointed to your blog. 另一种解决方案是生成指向您博客的嵌入式RSS小部件。 https://feed.mikle.com/ https://feed.mikle.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 网站的首页和URL的路由 - Routing for Home Page and URL's for Website 在博客文章的评论中评论 - comment in comment for blog post 如何使用AngularJS将wordpress博客集成到AWS托管的自定义单页应用程序网站上 - How to integrate wordpress blog into a custom Single page app website hosted on AWS using AngularJS 如何使用量角器和测试操作导航到网站中的页面而不是主页? - How to navigate to a page in website rather than home page using protractor and test operations in it? 除非重新加载页面,否则简单的Angular Rails博客无法显示内容 - Simple Angular rails blog cant get post to show unless the page is reloaded 在浏览器中首次打开时,在主页上的MVC网站上显示警报消息 - Show Alert message in MVC website on home page when opened for the first time in a browser 如何在不使用AngularJS加载新页面的情况下让我的wordpress网站在同一页面上显示博客文章? - How can I get my wordpress site to show a blog post in the same page without loading a new page using AngularJS? Jekyll / Github页面博客中的Angular-博客文章路由 - Angular in Jekyll/Github pages blog - blog post routing 如何在博客网站中应用实时模板切换 - How to apply realtime template switching in blog website ScrollTop重定向到主页 - ScrollTop redirecting to home page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM