Пример #1
0
        public string Build(FolderItem page)
        {
            _content = _parser.Transform(_content);

            if (_transformBlocks)
            {
                _content = NoteBlockHelper.GenerateNoteBlocks(_content);
                _content = PanelBlockHelper.GeneratePanelBlocks(_content);
            }

            if (_codeBlocks != null)
            {
                _content = CodeBlockHelper.GenerateCodeBlocks(_content, _documentationVersion, _options, _codeBlocks);
            }

            if (_rawHtmlBlocks != null)
            {
                _content = LegacyBlockHelper.ReplaceRawHtmlPlaceholdersAfterMarkdownTransformation(_content, _rawHtmlBlocks);
            }

            string expectedPageUrl = null;

            page.Metadata?.TryGetValue("url", out expectedPageUrl);

            _content = SocialMediaBlockHelper.ReplaceSocialMediaBlocks(_content, expectedPageUrl);

            return(_content);
        }
Пример #2
0
        public void ReplaceSocialMediaBlocks(FolderItem page)
        {
            string expectedPageUrl = null;

            page.Metadata?.TryGetValue("url", out expectedPageUrl);

            _content = SocialMediaBlockHelper.ReplaceSocialMediaBlocks(_content, expectedPageUrl);
        }