SaraJo / website

The .NET Foundation's website [staging]

Home Page:https://staging.dotnetfoundation.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotnetfoundation-website

This repository contains the solution that allows to build and deploy the dotnetfoundation website.

Pull requests and issues are welcome!

Prerequisites

Following are listed the tools or programs that we need to build this project:

  • Git: Clone this repository if you want to make any change.
  • Visual Studio 2019 or later
  • .NET Core 3.1.*

How to build and test

Here are the basic steps to run or build the project.

  1. Open Visual Studio.
  2. From the top menu click the File | Open | Project/Solution.
  3. Open src\DotnetFoundationWeb\DotnetFoundationWeb.sln from your local folder.
  4. Click the Play button and wait for the app to start.

    Note: A web server is started to test the generated files, check the console for the correct URL.

  5. After the build, you can check the output folder to review the generated html files.

Project Structure

Statiq.Framework is a flexible and extensible static content generation framework for .NET.

  • App.Config

    This is the configuration file for use by the project, make sure to review the appSettings.

  • Program.cs:

    Class that handles the generation of the site and the start of the web server when running from Visual Studio, here is where we defined the input folder and the way to output our static files. The input folder contains source files and we are rendering to html files.

  • input

    1. _partials folder contains small sections of code that we require in other views, includes:
      • _head.cshtml: Contains the head section of the view and includes the initial stylesheet and javascript imports.
      • _header.cshtml: Common header that we are using for views and includes the main navigation.
      • _footer.cshtml: Common footer for views.
    2. _layout.cshtml is where we build the page structure, include partials, analytics code and other additional imports.
    3. index.cshtml is the main page for the site.

      Note: Properties for the page can be defined at the top of the file like a specific title for the page.

    4. css folder contains all the stylesheet files required.
    5. js folder contains the javascript libraries and other custom scripts.
    6. data folder contains files that are being used to build views such as events or projects.

Each file inside the input folder is processed by Statiq and will generate static output files.

About

The .NET Foundation's website [staging]

https://staging.dotnetfoundation.org


Languages

Language:HTML 80.4%Language:CSS 12.1%Language:JavaScript 3.9%Language:C# 3.7%