Upload images to GitHub from the browser

前端 未结 7 885
执笔经年
执笔经年 2020-12-24 02:22

I am using GitHub Pages, Jekyll, and Prose to manage a Website. Everything works fine, besides I cannot find a way to upload images. The Prose image uploader is not working

7条回答
  •  不知归路
    2020-12-24 02:51

    Update: Github has released Upload option for repositories! There is an easy way to upload images to Github using prose.io.

    But you have to add the code below to _config.yml if you want to upload images to Jekyll blog or if you are using just githb pages then you have to create a _prose.yml file in the root and add this code inside.

    This works and this is how I'm updating my blog posts and adding images in it.

    prose:
      rooturl: '/'
      siteurl: 'http://prose.github.io/starter/'
      relativeLinks: 'http://prose.github.io/starter/links.jsonp'
      media: 'media'
      ignore:
        - index.md
        - _config.yml
        - /_layouts
        - /_includes
      metadata:
        _posts:
          - name: "layout"
            field:
              element: "hidden"
              value: "blog"
          - name: "tags"
            field:
              element: "multiselect"
              label: "Add Tags"
              placeholder: "Choose Tags"
              options:
                - name: "Apples"
                  value: "apples"
                - name: "Bananas"
                  value: "bananas"
        _posts/static:
          - name: "layout"
            field:
              element: "hidden"
              value: "page"
          - name: "permalink"
            field:
              element: "text"
              label: "Permalink"
              value: ""
    

    Now you should be able to upload images through prose.io

    Read detailed Tutorial here: How to add or edit Jekyll posts online

提交回复
热议问题