Sample web site that renders articles published by Azure DPS (Documentation Publishing System). This sample should be used by teams onboarding to DPS as a reference for implementing their rendering experience.
The DocumentationController class provides the necessary methods to list and give the details of the documentation articles.
Lists the documentation articles for the specified culture.
- culture
- Type: System.String
- Culture from where the articles list will be loaded.
The documentation articles will be loaded from the storage container specified in the container app settings. In case the container does not contain articles for the specified culture, the controller will try to load the content from the default culture (en-us) folder.
Loads a documentation article culture.
- culture
- Type: System.String
- Culture from where the articles list will be loaded.
- id
- Type: System.String
- The identifier of the documentation article.
The article will be loaded from the storage container specified in the container app settings. In case the container does not contain the requested article for the specified culture, the controller will try to load the content from the default culture (en-us) folder.
Loads the version info from the settings file in the storage container.
- blobContainer
- Type: Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer
- The blob storage container.
- culture
- Type: System.String
- Culture identifier.
The PublishVersionInfo will be deserialized from the settings.json file located in the culture folder of the given storage container.
Loads the blob text content.
- blob
- Type: Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob
- Documentation article blob.
This method returns an HTML-encoded string with the blob content.
Parse the documentation article metadata from the given blob.
- blockBlob
- Type: Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob
- Documentation article blob.
This method extracts the metadata attributes of the given blob and returns a new documentation Article object with this parsed data.
Get a list containing the authors of the article and the contributors.
- article
- Type: ACOM.DocumentationSample.Models.Article
- A documentation article object.
Get a unified list of GithubAuthor containing the article Authors and Contributors.
Parse the article tags.
- tagsString
- Type: System.String
- A JSON array containing the article tags.
Returns the deserialized dictionary with the documentation article tags.
Resolve the slug from a blob name.
- blobName
- Type: System.String
- Blob name.
Returns the slugified blob name.
Parse the article tags
- tagsString
- Type: System.String
- A JSON array containing the article tags.
Returns the deserialized dictionary with the documentation article tags.
Parse the authors names from a comma separated string.
- articleAuthorString
- Type: System.String
- Comma separated array of author names.
Returns an array of strings containing the parsed authors.
Deserialize the GithubContributors list.
- githubContributorsString
- Type: System.String
- JSON string containing the array of Github Authors.
Returns a collection with the parsed GithubAuthors.
All documentation articles contain the following metadata properties to enable some website automation and SEO stuff.
Property | Description | Example |
---|---|---|
x-ms-meta-pageTitle | Page title | Page title |
x-ms-meta-articleTitle | Article title | Article title |
x-ms-meta-metaDescription | Article meta description | This is an article |
x-ms-meta-articleAuthor | CSV list of authors | author1, author2 |
x-ms-meta-githubContributors | Contributors JSON array | [{"Id":"123456", "Login":"jdoe", "Name":"John Doe"},{"Id":"654321", "Login":"user1", "Name":"Another User"}] |
x-ms-meta-createdDate | Article Creation Date | 06-15-2009 01:45:30 PM |