GithubHelp home page GithubHelp logo

developeramarish / cloudy.cms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudy-net/cloudy.net

0.0 0.0 0.0 1.48 MB

ASP.NET Core CMS optimized for the cloud.

C# 74.93% JavaScript 17.86% CSS 7.20% Dockerfile 0.01%

cloudy.cms's Introduction

Screenshot of the Cloudy CMS admin UI.

Installation

Create a new, empty ASP.NET Core web application.

Install Cloudy.CMS and Cloudy.CMS.UI from NuGet.

In Startup.cs, under ConfigureServices, do:

services.AddMvc();
services.AddCloudy(cloudy => cloudy.AddAdmin());

And in the Configure method, do:

app.UseCloudyAdmin(cloudy => cloudy.Unprotect()); // NOTE: Admin UI will be publicly available!

Then visit /Admin for the royal tour.

To route INavigatable content (will work on /pages/MyUrlSegment etc), do:

app.UseRouting();
app.UseEndpoints(endpoints => {
    endpoints.MapGet("/pages/{route:contentroute}", async c => await c.Response.WriteAsync($"Hello {c.GetContentFromContentRoute().Id}"));
    endpoints.MapControllerRoute(null, "/controllertest/{route:contentroute}", new { controller = "Page", action = "Blog" });
});

In the controller, do:

public ActionResult Index([FromContentRoute] IContent page)

To use IHierarchical content (nested pages), you need to use a ** wildcard like {**route:....

Authentication

To use ASP.NET Identity (UI) with Users managed by Cloudy, create an example project with individual user accounts, and uninstall the EF stuff. Instead uf IdentityUser and IdentityUserStore, use User and UserStore and don't forget to remove Unprotect() in UseCloudyAdmin!

The UI works well with OAuth aka external login providers. Just follow the guides eg. Google authentication and don't forget to use Authorize() in UseCloudyAdmin!

Database

Uses inmemory database by default.

To use a physical folder with JSON documents, do: .WithStaticFiles() under AddCloudy.

To use MongoDB, do: .WithMongoDatabaseConnectionStringNamed("mongo") under AddCloudy.

Usage for large corporations

This CMS is under active development, and is not guaranteed to keep API compatibility between releases.

If you are a large corporation or otherwise require something like a LTS, the best practice is to clone the repo and setup your own build pipeline with your own NuGet packages.

When you wish to upgrade (either for security reasons or if necessary functionality has been added or changed), you merge from this repo at the tag you planned, and only deploy to production after the upgrade has been fully regression tested by your QA team.

cloudy.cms's People

Contributors

bjorn-ali-goransson 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.