| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 14fb2b5 commit f335417
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,7 +24,7 @@ permissions: | |||
| 24 | 24 | contents: read | |
| 25 | 25 | ||
| 26 | 26 | jobs: | |
| 27 | - orphaned-assets-check: | ||
| 27 | + orphaned-files-check: | ||
| 28 | 28 | if: ${{ github.repository == 'github/docs-internal' }} | |
| 29 | 29 | runs-on: ubuntu-latest | |
| 30 | 30 | steps: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,10 +24,17 @@ export function findUnused({ absolute }: { absolute: boolean }) { | |||
| 24 | 24 | const liquidTokens = getLiquidTokens(fileContents) | |
| 25 | 25 | for (const token of liquidTokens) { | |
| 26 | 26 | const { args, name } = token | |
| 27 | - if (name === 'data' && args.startsWith('reusables.')) { | ||
| 28 | - const reusableName = path.join('data', ...args.split('.')) + '.md' | ||
| 27 | + if ( | ||
| 28 | + (name === 'data' || name === 'indented_data_reference') && | ||
| 29 | + args.startsWith('reusables.') | ||
| 30 | + ) { | ||
| 31 | + const reusableName = path.join('data', ...args.split(' ')[0].split('.')) + '.md' | ||
| 29 | 32 | // Special cases where we don't want them to count as reusables. It's an example in a how-to doc | |
| 30 | - if (reusableName.includes('foo/bar.md') || reusableName.includes('your-reusable-name.md')) { | ||
| 33 | + if ( | ||
| 34 | + reusableName.includes('foo/bar.md') || | ||
| 35 | + reusableName.includes('foo/par.md') || | ||
| 36 | + reusableName.includes('your-reusable-name.md') | ||
| 37 | + ) { | ||
| 31 | 38 | continue | |
| 32 | 39 | } | |
| 33 | 40 | const reusablePath = resolveReusablePath(reusableName) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -105,6 +105,7 @@ export function getAllReusablesFilePaths(): string[] { | |||
| 105 | 105 | walk(reusablesDirectory, { | |
| 106 | 106 | includeBasePath: true, | |
| 107 | 107 | directories: false, | |
| 108 | + ignore: ['**/README.md', 'enterprise_deprecation/**'], | ||
| 108 | 109 | }), | |
| 109 | 110 | ) | |
| 110 | 111 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments