Giter Club home page Giter Club logo

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.AddControllers();
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:

services.AddCloudy(cloudy => cloudy.AddContentRoute() // ...

And 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:....

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 use Authorize() in UseCloudyAdmin!

The UI works well with 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.

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.