diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 90591ad..0a78388 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -123,44 +123,6 @@ jobs: dst_user: '${{ secrets.BOT_MIRROR_NAME }}' dst_token: '${{ secrets.BOT_MIRROR_TOKEN_MOSHUB }}' - # ------------------------------------------------------------------------------------------------------------------ # - # GIT.ORG.RU. - # ------------------------------------------------------------------------------------------------------------------ # - - mirror_gitorgru: - runs-on: ubuntu-latest - name: 'GIT.ORG.RU' - env: - DOMAIN: 'https://git.org.ru' - VERSION: 'v1' - steps: - - name: 'Get repository name' - shell: bash - run: | - echo "REPO_NAME=$( echo '${{ github.repository }}' | awk -F '/' '{ print $2 }' )" >> $GITHUB_ENV - - name: 'Create repository' - shell: bash - run: | - http="$( curl -s -o '/dev/null' -I -w '%{http_code}' -A '${{ env.USER_AGENT }}' '${{ env.DOMAIN }}/${{ env.OWNER }}/${{ env.REPO_NAME }}' )" - if [[ "${http}" -ne 200 ]]; then - curl -X POST \ - -H 'Authorization: token ${{ secrets.BOT_MIRROR_TOKEN_GITORGRU }}' \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' \ - -A '${{ env.USER_AGENT }}' \ - '${{ env.DOMAIN }}/api/${{ env.VERSION }}/orgs/${{ env.OWNER }}/repos' \ - -d '{"name":"${{ env.REPO_NAME }}"}' - fi - - name: 'Mirror repository' - uses: ghastore/github-mirror@main - with: - src_repo: '${{ github.server_url }}/${{ github.repository }}.git' - src_user: '${{ secrets.BOT_MIRROR_NAME }}' - src_token: '${{ secrets.BOT_MIRROR_TOKEN_GITHUB }}' - dst_repo: '${{ env.DOMAIN }}/${{ env.OWNER }}/${{ env.REPO_NAME }}.git' - dst_user: '${{ secrets.BOT_MIRROR_NAME }}' - dst_token: '${{ secrets.BOT_MIRROR_TOKEN_GITORGRU }}' - # ------------------------------------------------------------------------------------------------------------------ # # Disroot. # ------------------------------------------------------------------------------------------------------------------ # diff --git a/layouts/shortcodes/file.html b/layouts/shortcodes/file.html index 66b83f6..b4f29ca 100644 --- a/layouts/shortcodes/file.html +++ b/layouts/shortcodes/file.html @@ -55,7 +55,7 @@ the syntax highlighting language from the file extension will be automatically s -
+
{{ if (eq (($lang) | len) 0) }} {{ $lang = ((replace (path.Ext (.Name)) "." "") | default "plaintext") }} {{ end }}