A fully open-source headless CMS that supports Markdown and Visual Editing
React hook that instantiates the deprecated GitFile class (PR #5715). Removed together with the legacy filesystem API.
411d until removal
/**
* @deprecated as the API is clunky and hard to use. Mutations should now be
* done via Graphql. This will be removed by July 2025.
*/
export function useGitFile(
relativePath: string,
format: (file: any) => string,
parse: (content: string) => any
) {
const cms = useCMS();
return useMemo(
() => new GitFile(cms, relativePath, format, parse),
[cms, relativePath, format, parse]
);
}Use the TinaCMS form/client hooks (e.g. useTina) and submit mutations through the GraphQL client.