GithubHelp home page GithubHelp logo

jaydestro / cosmosweb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azurecosmosdb/cosmosweb

0.0 1.0 0.0 30.24 MB

code and content for https://gotcosmos.com/

Home Page: https://gotcosmos.com/

JavaScript 38.75% Ruby 0.02% C# 7.17% PowerShell 0.05% CSS 0.44% HTML 31.39% Less 22.19%

cosmosweb's Introduction

Cosmos DB Website

Site is hosted at https://cosmos-web.azurewebsites.net/, with a vanity url of https://gotcosmos.com.

Content updates can be made against the master branch. Once merged, changes will auto-deploy to the live site.

If you are working on bigger changes, setup a feature branch and we can create a staging slot to review/verify the rendered site.

LESS -> CSS compilation

CSS for the site is authored using LESS, which is compiled at dev time (so the CSS files are included in the src, not generated during build).

The CSS for the site is driven from bootstrap-custom.less. When first working on this site, install the MadsKristensen.WebCompiler Visual Studio Extension, then every time you save the LESS file it will be automatically compiled to generate the CSS.

Authenticated NuGet Feed

The site uses an authenticated Microsoft NuGet feed (UniversalStore) to get the libraries used for EU Cookie consent banners.

Visual Studio

If you are working in Visual Studio, you will be promted to authenticate the first time that packages restore (your domain credentials will give you access). Your login is remembered, so you don't need to login each time.

Other Editors

If you aren't using Visual Studio, you'll need to manually provide credentials to NuGet.

  • Go to the UniversalStore feed page

  • Drop down on your user profile in the top right and select security

  • Add a new Personal Access Token

  • Edit your global NuGet.config file (%APPDATA%\NuGet\NuGet.Config on Windows) to include a <packageSourceCredentials> element - as shown below.

    NuGet will match the name of the credentials (<CookieCompliance>) with the name of the feed in the NuGet.config for the website project.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageSourceCredentials>
    <CookieCompliance>
        <add key="Username" value="anyvalue" />
        <add key="ClearTextPassword" value="<YOUR PERSONAL ACCESS TOKEN HERE>" />
    </CookieCompliance> 
  </packageSourceCredentials>
</configuration>

Deployment

When the site is deployed to Azure, there is an Environment Variable (Application Setting) set on the App Service that contains credentials with a Personal Access Token. This allows the service to access the authenticated feed when building the site for deployment.

This isn't a well documentetd feature of NuGet. The environemnt variable is named NuGetPackageSourceCredentials_CookiePortal and the format is Username=anything;Password=<ACCESS TOKEN>.

cosmosweb's People

Contributors

iamalexmang avatar markjbrown avatar sajeetharan avatar sharan779 avatar thomasweiss avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.