Skip to content

Commit

Permalink
docs(nxdev): temporary image path fix before docs flattening (#8408)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes authored Jan 6, 2022
1 parent 9b947a5 commit de486f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('transformImagePath', () => {
const transform = transformImagePath(opts);

expect(transform('/shared/test.png')).toEqual(
'/documentation/shared/test.png'
'/documentation/latest/shared/test.png'
);
});
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { uriTransformer } from 'react-markdown';
import {
DocumentData,
VersionMetadata,
} from '@nrwl/nx-dev/data-access-documents';
import { DocumentData } from '@nrwl/nx-dev/data-access-documents';
import { join } from 'path';

export function transformImagePath({
Expand All @@ -23,6 +20,7 @@ export function transformImagePath({
);
}

return uriTransformer(`/documentation`.concat(src));
// TODO@ben remove `latest` when flattening docs' architecture
return uriTransformer(`/documentation/latest`.concat(src));
};
}

1 comment on commit de486f8

@vercel
Copy link

@vercel vercel bot commented on de486f8 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.