Skip to content

Commit 58e9d9a

Browse files
authored
Чинит валидацию W3С (#1262)
* Приводит всё в соответствие с современным состоянием * Дорабатывает скрипт для прода
1 parent 90d3b65 commit 58e9d9a

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/workflows/w3c-validator.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,22 @@ on:
99
jobs:
1010
validate:
1111
runs-on: ubuntu-latest
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
PATH_TO_CONTENT: ./content
1215
steps:
13-
- uses: actions/checkout@v4
16+
- name: Загрузка платформы
17+
uses: actions/checkout@v4
18+
- name: Загрузка контента
19+
uses: actions/checkout@v4
20+
with:
21+
repository: doka-guide/content
22+
path: content
23+
- name: Загрузка кеша
24+
uses: actions/checkout@v2
25+
with:
26+
repository: doka-guide/cache
27+
path: cache
1428
- uses: actions/setup-node@v4
1529
with:
1630
node-version: 20
@@ -30,7 +44,11 @@ jobs:
3044
${{ runner.os }}-build-${{ env.cache-name }}-
3145
${{ runner.os }}-build-
3246
${{ runner.os }}-
33-
- run: |
34-
npm ci
35-
npm run build
36-
npx node-w3c-validator -i ./dist/**/*.html -f lint -ev
47+
- name: Установка модулей
48+
run: npm ci
49+
- name: Копирование кеша
50+
run: cp ./cache/issues.json ./.issues.json
51+
- name: Сборка сайта
52+
run: npm run build
53+
- name: Валидация
54+
run: npx node-w3c-validator -i ./dist/**/*.html -f lint -ev

src/views/views.11tydata.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const frontMatter = require('gray-matter')
44
const { baseUrl, mainSections } = require('../../config/constants')
55
const categoryColors = require('../../config/category-colors')
66
const { titleFormatter } = require('../libs/title-formatter/title-formatter')
7-
const { getAuthorContributionStats } = require('../libs/github-contribution-stats/github-contribution-stats')
87
const { setPath } = require('../libs/collection-helpers/set-path')
98
const { isProdEnv } = require('../../config/env.js')
109

@@ -311,6 +310,7 @@ module.exports = {
311310
let contributionStat = undefined
312311

313312
if (isProdEnv) {
313+
const { getAuthorContributionStats } = require('../libs/github-contribution-stats/github-contribution-stats')
314314
contributionStat = getAuthorContributionStats()
315315
}
316316

0 commit comments

Comments
 (0)