Giter Club home page Giter Club logo

miniblog.core's Introduction

Blog engine for ASP.NET Core 7 (3.1 and above)

A full-featured yet simple blog engine built on ASP.NET Core 7 (3.1 and above).

Please be aware that Mads is taking pull requests, but is not actively working on it.

Build status NuGet

Deploy to Azure

Live demo: https://miniblogcore.azurewebsites.net/
Username: demo
Password: demo

Editor

Custom themes

In search for custom designed themes for MiniBlog.Core? Click here.

Features

  • Windows/Open Live Writer support
  • RSS and ATOM feeds
  • User comments
  • Search engine optimized
  • All major browsers fully supported (IE 9+)
  • Social media integration (Facebook, Twitter)
  • Lazy loads images for better performance
  • Easy YouTube video embedding
  • Looks great when printed
  • Works offline with use of Service Worker
  • Follows best practices for web applications

Technical features

YouTube embeds

You can embed any youtube video by using the following syntax in the source of a blog post:

[youtube:ScXvuavqhzo]

ScXvuavqhzo is the ID of the YouTube video which can be found in any YouTube link looking this youtube.com/watch?v=ScXvuavqhzo

How to use

On the command line, install the template.

dotnet new --install MadsKristensen.AspNetCore.Miniblog

Then create it into any folder.

dotnet new miniblog

Then run it or open it in Visual Studio or your favorite code editor.

dotnet run

Credits

SVG icons by https://simpleicons.org/

miniblog.core's People

Contributors

adaskothebeast avatar am11 avatar aminmesbahi avatar bdukes avatar braegelno5 avatar damlayasarr avatar dyardygit avatar dynamorando avatar eddynaka avatar fduman avatar glosrob avatar jimmylewis avatar julianz avatar kevbat avatar lukino2000 avatar madskristensen avatar manfredlange avatar marcoskirchner avatar mareklanduch avatar martindybal avatar michaelfery avatar rbleattler avatar robertuk avatar skynode avatar surfmuggle avatar taritsyn avatar thomaspleasance avatar timheuer avatar wforney avatar xnodeoncode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miniblog.core's Issues

Form Validation For Slug Input

currently, you can not create a new post without the required input fields being filled. Right now, if you do not provide a slug in the input field, it will let you continue causing a null reference exception. Here is the image of the error.
capture

when can solve this by validating the slug input field before a new post is created.

Complexe url

Hi,
Thx for your work ! it's very cool

How can i create complexe url?
Like "/cat1/mytitle" ?
thx !

Status code page, status code: 404, Signing out after posting new or editing title of new post

Seem to be able to reliably re-create this.
Believe behaviour only shows for Un-Published Posts

  1. Login
  2. Create new test Post (or change title of existing)
  3. Un-tick Is Published
  4. Save
  5. Signout

Browser is redirected to http://miniblogcore20171027024748.azurewebsites.net/blog/Test/

Status code page, status code: 404

As its not visible to logged out users, as its un-published.

Looks like a Return-Url issue maybe?

(ps: Nice work!)

Article with main image

Hi
Do you think you're going to add a feature so that the articles have a main image?
Thank you

SaveFile not checks for invalid chars

sometimes the file names or suffixes have invalid path names on blog hosted by operation system; also the relative pathname is used to create the absolute with hardcoded "/" - works only on windows

Trying to install this in an existing asp.net MVC site.

Sorry. I am a bit of a newbie here.

I have an MVC .net site running on IIS. I would like to have this run under a directory of that site but I cannot figure out how to install it?

I have set up the blog to run under it's own domain and IIS site (IIS 10) without issue. I would like to however run the site from sub-directory from the other domain.

To that end I have added an application to my other IIS site, named it "blog" and pointed it to the root of the working site. This keeps resulting in a 500 error, but I cannot seem to find what the error says despite enabling detailed errors in the web.config.

Any ides how I may get the blog to run in a sub-directory?

Thanks in advance.

I will continue to try and find the error message.

Syntax Highlighting support?

Looking through and can't see any reference to Syntax Highlighting support.

Is this provided / available or a "todo"?

Inserting image causes app to crash and get 404 error

I need to look into this more, so just posting as a to-do.
But today, while editing a blog post and adding images on about 5 occasions (did resize most, but not all) after hitting save I got a 404 and seems site crashed in Azure and automatically restarted...

No files found matching "/serviceworker.js"

Hello,

Maybe I'm doing something wrong but I'm getting this error when I'm trying to run solution.

I see that you registered it here, but I cannot find the file:

    // Register service worker
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register("/serviceworker.js");
    }

Could you guide me where I have to look?

Blog Settings are in config files

Might be a little easier for some people to use if there was a basic admin page that could modify these settings.

edit, looking a bit closer... it's using file storage for the entire blog. Not that it is a bad thing, just not what I was expecting. Probably not worth doing this unless the posts and comments changed too.

Markdown support?

Looking through and can't see any reference to Markdown support.

Is this provided / available or a "todo"?

Publish date instead of boolean

Even in the smallest of Blogs people tend to want to be able to schedule posts. The field ispublished could be replaced with a published field mapping to a DateTime?.

InMemoryBlogServiceBase : IBlogService

Question, is

public abstract class InMemoryBlogServiceBase : IBlogService
located in IBlogService.cs

is only a not used artefact, or is it used by the caching system?

Thinking about the SaveFile method in the service interface

I've been working on a PR (versus the stuff I whipped up real quick as a proof of concept) to integrate a couple other blog services that are not file based.

The first one being Azure table storage. There's a method on the service interface that is coupled to a file provider.

Task<string> SaveFile(byte[] bytes, string fileName, string suffix = null)
https://github.com/madskristensen/Miniblog.Core/blob/master/src/Services/IBlogService.cs#L107

While I could or would normally just ignore it and have it throw an exception, the issue here is how coupled this method is to the whole app not just the service itself. It's called once from each the blog controller and the metaweblog service.

Any thoughts on this specific coupling and how it could be reduced to just the FileBlog Service?

Here's the commit for the service I am proposing. But I could see this being a similar issue with a database provider.

tbasallo@fc8ccff

If there's no interest in supporting other services, then no big deal. But since an interface is used I imagine that the intent was to allow other providers.

Open Live Writer Login Seems Broken

A refactor of MetaWeblogService appears to have broken the WLS login:

        private void ValidateUser(string username, string password)
        {
            if (_userServices.ValidateUser(username, password))
            {
                throw new MetaWeblogException("Unauthorized");
            }

            var identity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme);
            identity.AddClaim(new Claim(ClaimTypes.Name, username));

            _context.HttpContext.User = new ClaimsPrincipal(identity);
        }

As you can probably see, a successful user validation results in an exception, whereas a failure provides access...

New post doesn't work when in edit mode

When choosing New post when editing a post the form just loops around. The button should either be disabled in edit mode or open an empty form for a new post.

404 on Post Comment button click event

  1. When trying to add a Comment to a Post, clicking the Post Comment button results in a 404 error.

  2. This behavior is also present on the Azure demo site. Screenshot attached.

  3. You are a rock star of the coding community. Thank you for your contributions.

miniblog_core_screenshot

Miniblog won't work as IIS application

I've been trying to work out what is special about the miniblog.core routing/setup that stops it working as a IIS application (works fine when published to a root IIS site. Miniblog is unable to find Views and css files for example, but I'm unable to understand why ยฏ_(ใƒ„)_/ยฏ Can anyone help/give me some pointers? Thanks.

Basic blog features

  • RSS feed
  • MetaWeblog API
  • Windows/Open Live Writer support
  • Commenting system
  • Gravatar support
  • OpenGraph support
  • Post editing
  • Post creation
  • Post deletion
  • Categories
  • Robots.txt and sitemap.xml support
  • Social sharing
  • File/image uploads

Security headers? How?

I can see security headers added on live site, but can't find middleware reponsible for it?

Marriage with Aurelia?

I am looking for a blog engine component to serve as a back end to the Aurelia front end. It is being used as a model for several articles on distributed processes and identity management, that are planned for the Carmel project, dedicated to Aurelia Community. The article Aurelia blog describes its current functionality and plans for the near future.

I know how busy Mads is and I also know how "wide spread" he likes to be, meaning to say that he has wide spectrum of interests. So, it is possible that he may be interested in the idea to use miniblog.core as the engine for multiple front ends.

Live demo site down.

@madskristensen sorry this is not to say that something wrong with this project, but is this project setup with some CI or github hook to azure app?

image

I have been having this issue for quite a while with one of my project as well that one day I managed to deploy site once on azure web app and subsequent deployment ended up in same error and its very hard to debug. I have lost the confidence on auto deployment recently and been doing manual web deploy.

I would say web app deployment isn't as stable as it should be as this issue or similar has already been escalated on other places and most of the time the solutions presented don't work consistently.

here, here , here, here, here, here, here, here, here

Do you have any knowledge on it being down?

Rendering of partial views does not work on linux

The rendering of partial views does not work on linux. The source of the problem is rather trivial: ASP.Net Core seems to be case sensitive on linux, and the code is not fully aware of this yet.

Comments.GetGravatar is broken

According to gravatar.com: Creating the Hash we had to

  1. Trim leading and trailing whitespace from an email address
  2. Force all characters to lower-case
  3. md5 hash the final string

The given php example is

$email = trim( "[email protected] " ); // "[email protected]"
$email = strtolower( $email ); // "[email protected]"
echo md5( $email );
// "0bc83cb571cd1c50ba6f3e8a78ef1346"

The default encoding in php is UTF8

All in all, we had to change the code to

public string GetGravatar()
{
    using (var md5 = System.Security.Cryptography.MD5.Create())
    {
        var email = Email;
        // 1. Trim leading and trailing whitespace from an email address
        email = email.Trim();
        // 2. Force all characters to lower-case
        email = email.ToLowerInvariant();
        // 3. md5 hash the final string
        byte[] inputBytes = Encoding.UTF8.GetBytes(email);
        byte[] hashBytes = md5.ComputeHash(inputBytes);

        // Convert the byte array to hexadecimal string
        var sb = new StringBuilder();
        for (int i = 0; i < hashBytes.Length; i++)
        {
            sb.Append(hashBytes[i].ToString("X2"));
        }

        var gravatarId = sb.ToString().ToLowerInvariant();

        return $"https://www.gravatar.com/avatar/{gravatarId}?s=60&d=blank";
    }
}

How to back up just the Posts / Images

Hi there,
Sorry I'm an almost complete nub when it comes to developing but I'm trying to use this excellent project to learn some useful stuff
One thing I'm trying to figure out is what are the files I need to backup to restore my blog
Is it just the "Posts" folder ?
Thanks !

BlogServiceProviders

Are you interested in implementing other providers (in the core project) and taking pull requests, or would you prefer for users to implement as they need on their own and leave outside of this project?

I ask because with the interface created, it would be trivial for others to add other providers (SQL [using things like NPoco, dapper, ADO.NET, Azure Blob/Table Storage, etc.).

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.