LetFoxRun
V2EX  ›  问与答

静态博客有没有像 Wordpress 的那种站内搜索功能啊?

  •  
  •   LetFoxRun · Jul 20, 2014 · 3762 views
    This topic created in 4395 days ago, the information mentioned may be changed or developed.
    没有用到数据库,应该没有像Wordpress的那种站内搜索功能,感觉很不方便,有没有解决办法啊?

    谢谢。
    16 replies    2014-07-21 09:00:01 +08:00
    loading
        1
    loading  
       Jul 20, 2014 via iPhone   ❤️ 1
    请把这个事情交给 google
    LetFoxRun
        2
    LetFoxRun  
    OP
       Jul 20, 2014
    @loading 主要Wordpress自带的全文搜索比较赞,有些知识点忘记了,能快速找到。
    GuoAPP
        3
    GuoAPP  
       Jul 20, 2014   ❤️ 1
    呃 自己建一个?
    LetFoxRun
        4
    LetFoxRun  
    OP
       Jul 20, 2014
    @GuoAPP 写个程序爬取html数据,使用分词之后导入数据库,再然后显示出来吗。
    lcj2class
        5
    lcj2class  
       Jul 20, 2014
    一般就是site:your-domain.com 这用方式吧,要不自己建索引什么的,也太麻烦了吧
    loading
        6
    loading  
       Jul 20, 2014 via iPhone
    请整理后记在 Evernote
    jasontse
        7
    jasontse  
       Jul 20, 2014 via iPad
    Swiftype
    woodfish
        8
    woodfish  
       Jul 20, 2014   ❤️ 1
    ChiChou
        9
    ChiChou  
       Jul 20, 2014
    你都加上了搜索,还有什么静态可言。
    laomo
        10
    laomo  
       Jul 20, 2014   ❤️ 2
    Swiftype +1
    附上个自己找解决方案的过程: http://lmbj.net/blog/static-site-search/
    wsph123
        11
    wsph123  
       Jul 21, 2014   ❤️ 1
    http://i.mouto.org/#hot
    参考下我的静态博客关于搜索的解决方案?

    无延迟哟OwQ
    LetFoxRun
        12
    LetFoxRun  
    OP
       Jul 21, 2014
    @wsph123

    求教程啊。谢谢。
    wsph123
        13
    wsph123  
       Jul 21, 2014   ❤️ 1
    @LetFoxRun 都是在前端做的,需要提前载入文章标题和简介才行。

    http://i.mouto.org/f/search.js
    代码在这里
    LetFoxRun
        14
    LetFoxRun  
    OP
       Jul 21, 2014
    @wsph123 不懂,但是想问下,博客在github下能实现吗?如果可以,我自己研究下,谢谢。
    wsph123
        15
    wsph123  
       Jul 21, 2014
    @LetFoxRun 代码都给你了T_T 你自己研究下呗?
    googlefans
        16
    googlefans  
       Jul 21, 2014
    你用的什么做的静态博客?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2392 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 16:08 · PVG 00:08 · LAX 09:08 · JFK 12:08
    ♥ Do have faith in what you're doing.