Create a professional website using ASP.NET Razor Pages and Contentstack.
Contentstack is a headless CMS with an API-first approach that puts content at the center. It is designed to simplify the process of publication by separating code from content.
- To get your app running quickly, we have created a sample .NET Product Catalog for this project. You will need to download the code and change the configuration. Download the code using the command given below:
$ git clone https://github.com/contentstack/contentstack-dotnet-razor-pages-webapp-example.git
-
Once you have downloaded the project, Create a new Stack, add your Contentstack API Key, Delivery Token, and Environment to the application settings. If you're new to Contentstack, follow these links to learn how to find your Stack's API Key and Delivery Token. Also consider reading more about Environments.
-
Extract the contents of
ContentTypes.zip
and importproducts.json
into the stack created above. Publish several product entries to the environment created above. -
Open
ContentstackRazorPagesExample/appsettings.json
and insert your credentials, so it looks like this:
{
....
"ContentstackOptions": {
"Host": "<HOST_NAME>",
"ApiKey": "<API_KEY>",
"DeliveryToken": "<DELIVERY_TOKEN>",
"Environment": "<ENVIRONMENT_NAME>"
},
...
}
You're all set. Now, run the project.
We've also created a guide that further explains this project. Click here to learn more.