File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
src/content-render/scripts/reusables-cli Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ permissions:
2424 contents : read
2525
2626jobs :
27- orphaned-assets -check :
27+ orphaned-files -check :
2828 if : ${{ github.repository == 'github/docs-internal' }}
2929 runs-on : ubuntu-latest
3030 steps :
Original file line number Diff line number Diff line change @@ -24,10 +24,17 @@ export function findUnused({ absolute }: { absolute: boolean }) {
2424 const liquidTokens = getLiquidTokens ( fileContents )
2525 for ( const token of liquidTokens ) {
2626 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'
2932 // 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+ ) {
3138 continue
3239 }
3340 const reusablePath = resolveReusablePath ( reusableName )
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ export function getAllReusablesFilePaths(): string[] {
105105 walk ( reusablesDirectory , {
106106 includeBasePath : true ,
107107 directories : false ,
108+ ignore : [ '**/README.md' , 'enterprise_deprecation/**' ] ,
108109 } ) ,
109110 )
110111}
You can’t perform that action at this time.
0 commit comments