当前位置:网站首页>Automatically generate RSS feeds for docsify

Automatically generate RSS feeds for docsify

2020-11-08 10:30:02 Shen mourning

Search twitter for Docsify When I found a configuration that was released on the minority RSS Subscription articles

Some people quote that :

It's rare to see such outrageous articles in the minority . As a tutorial , Even the whole article does not mention that its static blog is Powered by Docsify.

Ha ha ha , Click in and have a look at the original text 《 Bring... To your static blog RSS subscribe 》 , I really didn't see Docsify The figure of , But the original author's blog did use Docsify

I studied his article , Generate RSS The principle is that GitHub Through the platform Travis CI service , Automatic generation RSS file , Use Git To find the latest 10 Files and update time , Use Pandoc take MarkDown Change the content to HTML

He used Travis CI, I'm going to use GitHub Actions, A little modification based on his script

establish .github/workflows/rss.yml file , write in rss.yml

name: RSS

on: [ push, pull_request ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ref: ${{ github.head_ref }}

      - name: Install Pandoc
        run:
          sudo apt-get install -y pandoc

      - name: Build RSS
        run: |
          cd docs/
          ./rss.sh

      - name: Commit Updated
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Build feed.xml

Then you need it in your document directory , Such as docs Created in rss.sh, Click to view and write rss.sh The content of

Copy and paste , modify website_titlewebsite_link and description The content of , Submitted to the GitHub After that, it will be automatically generated feed.xml file

Direct push and PR Will automatically generate , This is my demo site https://notes.qq52o.me/feed.xml

Now I'm looking at RSS There should not be many people ... If you need to, you can use this method for your Docsify Site generation RSS subscribe .

Docsify Participating in 2020 year OSC China open source project selection , Please click the link below to vote your vote : https://www.oschina.net/p/doc...

版权声明
本文为[Shen mourning]所创,转载请带上原文链接,感谢