madskristensen / miniblog.core Goto Github PK
View Code? Open in Web Editor NEWAn ASP.NET Core blogging engine
Home Page: https://miniblogcore.azurewebsites.net/
License: Other
An ASP.NET Core blogging engine
Home Page: https://miniblogcore.azurewebsites.net/
License: Other
@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?
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?
JS Output from serviceworker is not minified, imo because the call is without .js, so it will not detected by weboptimizer.
Looking through and can't see any reference to Markdown support.
Is this provided / available or a "todo"?
Add a feature to show comment when that is approved.
Very Thanks
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.
According to gravatar.com: Creating the Hash we had to
- Trim leading and trailing whitespace from an email address
- Force all characters to lower-case
- 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";
}
}
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...
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...
The category page selector on bottom of post, is not correct. It uses the page number from post page selector.
for example go to: https://madskristensen.net/28/
and select there the category link, build to: https://madskristensen.net/blog/category/random%20thoughts/28
and we get an empty category page, because there are at the moment of writing only 26 ones.
I will digging and build a PR
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.
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.
As the SaveFilesToDisk method is called after the post has been persisted the path rewrite in this method can have no effect. As such the base64 image is still loaded in the blog code source.
This appears to simply require swapping the order of the lines unless I am missing something.
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.
Looking through and can't see any reference to Syntax Highlighting support.
Is this provided / available or a "todo"?
I can see security headers added on live site, but can't find middleware reponsible for it?
Seem to be able to reliably re-create this.
Believe behaviour only shows for Un-Published Posts
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!)
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.
Hi,
Thx for your work ! it's very cool
How can i create complexe url?
Like "/cat1/mytitle" ?
thx !
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
Hi
Do you think you're going to add a feature so that the articles have a main image?
Thank you
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.).
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?
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.
It would be much appreciated if the latest update to core 2.1 could be made available through the nuget package manager :-)
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.
I'd like to move an old Wordpress Blog to MiniBlog.Core. Can I use this tool? Miniblog Formatter
open livewriter connect is not able to connect, because we have no blog:name value in aspsettings anymore
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?
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?
.
Hi
Please work on docker version ๐
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.
How can I change default demo password?
According to "appsettings.json" in comment, // Generate a new password hash with salt here https://onlinehasher.azurewebsites.net.
but, url seem does not work anymore.
Can anyone help?
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.
when can solve this by validating the slug input field before a new post is created.
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 !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.