public static async ValueTask InitializeAsync(
            this FileToken token,
            Options options,
            string destination = null)
        {
            if (token.FileType == FileType.Markdown ||
                token.FileType == FileType.Yaml)
            {
                var found = await FileTokenCacheUtility.TryFindCachedVersionAsync(token, options, destination);

                if (!found)
                {
                    var lines = await File.ReadAllLinesAsync(token.FilePath);

                    var dir  = token.DirectoryName;
                    var type = token.FileType;

                    if (type == FileType.Markdown && Metadata.TryParse(lines, out var metadata))
                    {
                        token.Header = metadata;
                    }

                    foreach (var(tokenType, tokenValue, lineNumber) in
                             lines.SelectMany((line, lineNumber) => FindAllTokensInLine(line, lineNumber + 1, TokenExpressions.FileTypeToExpressionMap[type]))
                             .Where(tuple => !string.IsNullOrEmpty(tuple.Item2)))
                    {
                        if (tokenType == TokenType.CodeFence)
                        {
                            token.CodeFenceSlugs[lineNumber] = tokenValue;
                            continue;
                        }

                        if (tokenType == TokenType.Xref)
                        {
                            token.Xrefs.Add(tokenValue);
                            continue;
                        }

                        if (tokenType == TokenType.Unrecognizable)
                        {
                            continue;
                        }

                        var(isFound, fullPath) = await FileFinder.TryFindFileAsync(options, dir, tokenValue);

                        if (isFound && !string.IsNullOrWhiteSpace(fullPath))
                        {
                            var file = new FileInfo(fullPath.NormalizePathDelimitors());
                            switch (file.GetFileType())
                            {
                            case FileType.Image:
                                token.ImagesReferenced.Add(file.FullName);
                                break;

                            case FileType.Markdown:
                                token.TopicsReferenced.Add(file.FullName);
                                break;
                            }
                        }
                    }

                    await FileTokenCacheUtility.CacheTokenAsync(token, options, destination);
                }
            }
        }