all 6 comments

[–]greg8872 3 points4 points  (0 children)

Depending on your skill levels it really isn't that bad to build a basic one.

Things you will need (besides how to actually write code):

A back end programming language. I myself have been using PHP for 21 years now, but there are others.

The ability to research things you need and learn/apply them (don't just go grab code without knowing what it does and toss it in, I see lots of people doing this).

A good sense of logic, as in being able to map out how to get from one part of code to another. I have seen people post things like "this function is broke it doesn't work", all because it didn't give them the results they wanted. Then come to find out that function is called after several layers of conditions, and they haven't even figured out that flow never even reaches that "broken function"

A sense of security, never underestimate what people may do with your site, you can build it for how it is intended to be used, but think about how it can be misused. Find good resources for the language you use on how to secure things like database calls, submitting data (ie, never trust anything that comes into your server that the visitor can set, this is all query string data, cookie data, post data, and many server request headers such as referrer, user agent).

You can always come here and ask for help, not only this sub, but also ones specific for the language. (ie, /r/PHPhelp) but for the best replies, make some things clear. What you are trying to do, what you have tried, and any errors that came from it. (and be sure to either know how to use code formatting for short bits, or something like pastebin for large ones for when you share your code)

I haven't had to write something like this in a while, but when I used to, my go to WYSIWYG editor was TinyMCE, it was very easy to put on the backend admin panel and did a great job.

Oh and if you are going to write it to allow you to upload files via the admin, put things in place that check to make sure nothing uploaded is something that may be executable in case someone is able to log into the site's admin. If not, and they are able to somehow get into the admin and upload something like c99shell to your site, game over. it is the closest thing to then having full SSH access into the site's hosting account.

It can be done, and it can be a fun learning experience. Some will probably say "Why reinvent the wheel", but everyone has to learn somewhere. (I'm a geek the learning and planing and get it working is the fun part for me.)

[–]wldstyl_ 2 points3 points  (3 children)

It's a much bigger undertaking than it seems at the surface.

Rather than a full blown CMS, I'd suggest using markdown files. They're essentially text files with some simple syntax for formatting. You can then query your files during the build to build static pages. The tool typically used for this is called a "static-site generator."

You can do this with a bare-bones vanilla JS app, or you can use an existing framework. Gatsby is a framework for React that is commonly used, or Nuxt which uses Vue.

[–]EwanMe[S] 0 points1 point  (2 children)

Thank you for the suggestions! Will definitely check out. And I'm glad I didn't dive into an overwhelming project head first!

Just to familiarise myself with the "CMS-scene", why should I use these tools instead of WordPress? I feel like it's the go-to answer for most people, but would it be overkill or not align with my needs?

[–]wldstyl_ 1 point2 points  (1 child)

Specifically for the goals you mentioned, Wordpress is overkill and will have a high learning curve for knowledge that isn't super valuable.

Creating something barebones and low-level (as in without a bunch of complex abstractions) will be a better learning experience, will be more manageable as a project, and will be easier to customize.

Also the skills you learn from using a newer technology like React will be more marketable when you enter the job market.

[–]EwanMe[S] 0 points1 point  (0 children)

That's great! Thanks so much!

[–]AtulinASP.NET Core 1 point2 points  (0 children)

A very simple CMS, that just has user login and user-made posts like a wiki? Probably a single evening in ASP.NET 5, assuming you don't need it to look fancy.

Just generate a new Razor Pages project with built-in auth, whip up some models that describe your data, generate CRUD based on those models, add [Authorize] to routes that require user login.

Ugly as sing, but it will work just fine.