V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
vfiles
V2EX  ›  问与答

Hexo 文章图片不显示

  •  
  •   vfiles · 2018-03-06 11:08:25 +08:00 · 2257 次点击
    这是一个创建于 2479 天前的主题,其中的信息可能已经有所发展或是发生改变。

    使用 Hexo 写博客,

    发现文章里面插入网络图片不能显示,

    Test_PIC

    • 我很确定写法正确, URL 是可以访问的。
    ![标题](图片 URL)
    
    • 在浏览器里 F12 看到如下, 找前端的同学查看, 他跟我说是 src 里面无内容。
    <img src="" data-echo="https://s1.ax2x.com/2018/02/10/yHcS3.png" alt="yHcS3.png"> 
    

    不知道是不是环境出了问题,

    • 环境如下:
    (node:8336) [DEP0061] DeprecationWarning: fs.SyncWriteStream is deprecated.
    hexo: 3.6.0
    hexo-cli: 1.1.0
    os: Windows_NT 10.0.16299 win32 x64
    http_parser: 2.7.0
    node: 9.7.1
    v8: 6.2.414.46-node.20
    uv: 1.19.2
    zlib: 1.2.11
    ares: 1.13.0
    modules: 59
    nghttp2: 1.29.0
    napi: 2
    openssl: 1.0.2n
    icu: 60.2
    unicode: 10.0
    cldr: 32.0.1
    tz: 2017c
    
    • HEXO 配置文件 _config.yml:
    # Hexo Configuration
    ## Docs: https://hexo.io/docs/configuration.html
    ## Source: https://github.com/hexojs/hexo/
    
    # Site
    title: OHLIA
    subtitle: 
    description: 懒癌+伪 Geak
    author: OHLIA
    language: zh-CN
    timezone:
    
    # URL
    ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
    url: http://yoursite.com
    root: /
    permalink: :year/:month/:day/:title/
    permalink_defaults:
    
    # Directory
    source_dir: source
    public_dir: public
    tag_dir: tags
    archive_dir: archives
    category_dir: categories
    code_dir: downloads/code
    i18n_dir: :lang
    skip_render:
    
    # Writing
    new_post_name: :title.md # File name of new posts
    default_layout: post
    titlecase: false # Transform title into titlecase
    external_link: true # Open external links in new tab
    filename_case: 0
    render_drafts: false
    post_asset_folder: false
    relative_link: false
    future: true
    highlight:
      enable: true
      line_number: true
      auto_detect: false
      tab_replace:
      
    # Home page setting
    # path: Root path for your blogs index page. (default = '')
    # per_page: Posts displayed per page. (0 = disable pagination)
    # order_by: Posts order. (Order by date descending by default)
    index_generator:
      path: ''
      per_page: 10
      order_by: -date
      
    # Category & Tag
    default_category: uncategorized
    category_map:
    tag_map:
    
    # Date / Time format
    ## Hexo uses Moment.js to parse and display date
    ## You can customize the date format as defined in
    ## http://momentjs.com/docs/#/displaying/format/
    date_format: YYYY-MM-DD
    time_format: HH:mm:ss
    
    # Pagination
    ## Set per_page to 0 to disable pagination
    per_page: 10
    pagination_dir: page
    
    # Extensions
    ## Plugins: https://hexo.io/plugins/
    ## Themes: https://hexo.io/themes/
    theme: yelee
    
    #RSS 订阅插件
    plugin:
    - hexo-generator-feed
    #RSS 插件配置
    feed:
      type: rss2
      path: atom.xml
      limit: 20
      hub:
      content: true
     
    #文章加密
    ## hexo-blog-encrypt
    #Security
    encrypt: 
        enable: true
        default_abstract: 这是篇受保护的文章!
        default_message: 请输入文章密码!
        #default_template: # 文章详情页
    
    #后台管理
    #hexo-admin
    #admin:
      #username: OHLIA
      #password_hash: 0477a36f2fbe7f7e3a94e96b572e4991
      #secret: NoOneCanLogin
    
    # Deployment
    ## Docs: https://hexo.io/docs/deployment.html
    deploy:
      type: git
      repo: [email protected]:OHLIA/OHLIA.github.io.git
      branch: master
    
    
    alvinbone88
        1
    alvinbone88  
       2018-03-06 12:11:42 +08:00   ❤️ 1
    卸载 hexo-renderer-marked-lazy
    Cipool
        2
    Cipool  
       2018-03-06 12:18:40 +08:00 via Android
    把你的图片链接改成源图片的直链
    https://s1.ax2x.com/2018/02/08/v8vZr.jpg
    vfiles
        3
    vfiles  
    OP
       2018-03-06 17:15:09 +08:00
    @alvinbone88
    确实是这个插件的问题,卸载了就好了,

    为什么安装了这个插件,但是我没打开功能也会影响到?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3116 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:48 · PVG 21:48 · LAX 05:48 · JFK 08:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.