Browse Source

docs scriban pass parameter document_version

pull/2550/head
Yunus Emre Kalkan 7 years ago
parent
commit
26e8c88d2f
  1. 4
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs

4
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs

@ -392,9 +392,11 @@ namespace Volo.Docs.Pages.Documents.Project
private async Task ConvertDocumentContentToHtmlAsync() private async Task ConvertDocumentContentToHtmlAsync()
{ {
await SetDocumentPreferencesAsync(); await SetDocumentPreferencesAsync();
SetUserPreferences(); SetUserPreferences();
UserPreferences.Add("Document_Language_Code", LanguageCode); UserPreferences.Add("Document_Language_Code", LanguageCode);
UserPreferences.Add("Document_Version", Version);
Document.Content = await _documentSectionRenderer.RenderAsync(Document.Content, UserPreferences); Document.Content = await _documentSectionRenderer.RenderAsync(Document.Content, UserPreferences);
var converter = _documentToHtmlConverterFactory.Create(Document.Format ?? Project.Format); var converter = _documentToHtmlConverterFactory.Create(Document.Format ?? Project.Format);

Loading…
Cancel
Save