poppastring / dasblog-core

The original DasBlog reimagined with ASP.NET Core
MIT License
469 stars 193 forks source link

Support For Static Pages? #686

Closed thousandtyone closed 10 months ago

thousandtyone commented 10 months ago

Legacy DasBlog had support for static pages. You could make a HTML file and put it inside static folder and it would automatically pick up those files and integrate them with the blog as static pages. A lot of blogging engines like WordPress also have support for pages. Here is an example of static page running on my blog (which I am going to migrate to the new version):

https://www.thousandtyone.com/blog/aboutus.aspx

Hence I was thinking about working on building support for static pages in DasBlog. Is this something that we feel we should support as a feature for new DasBlog? I'm happy to work on it and submit a PR if others feel it will help or add value.

tomwattscom commented 10 months ago

As a very old contributor of DasBlog's back in it's CodePlex days 12 years ago, I would very much like to see this upgrade! Cheers Tom

poppastring commented 10 months ago

I like the idea! @thousandtyone @tomwattscom

A few questions/thoughts that come to my mind: -

  1. Is the assumption that these files undergo no server-side transformation? Strictly html?
  2. The answer to question one should inform where we want to store these files? I assume a subfolder of content and we map it to the root.
  3. What do we do about the file extensions? For example, I would want /somepage.html to be accessible via /somepage.
  4. Do we need or want to support generating these files via Live Writer? Or via the admin pages? Or just assume people can upload manually via FTP? I am thinking we can push decision down the road for now and assume FTP.
  5. There is currently an "about page" option that I think should become obsolete with this option, thoughts?

My thoughts are mostly inline but please add your ideas too. :)

thousandtyone commented 10 months ago

@poppastring - My personal opinions:

  1. Is the assumption that these files undergo no server-side transformation? Strictly html?
  1. The answer to question one should inform where we want to store these files? I assume a subfolder of content and we map it to the root.
  1. What do we do about the file extensions? For example, I would want /somepage.html to be accessible via /somepage.
  1. Do we need or want to support generating these files via Live Writer? Or via the admin pages? Or just assume people can upload manually via FTP? I am thinking we can push decision down the road for now and assume FTP.
  1. There is currently an "about page" option that I think should become obsolete with this option, Thoughts?

@poppastring , @tomwattscom - do let me know if the above seems fine or if you have any additional ideas/thoughts since you might know the older implementation much better than me.

poppastring commented 10 months ago

@thousandtyone I think we are agreed, go for it! 👍🏿

thousandtyone commented 10 months ago

Done with this @poppastring. PR Submitted already. Please feel free to review. I've added documentation of how to use static pages and how this can be tested at:

https://github.com/poppastring/dasblog-core/pull/688

Please do let me know if any added changes need to be made. Once the PR is merged, I will start working on caching for these pages and will also submit the test cases for this feature.

thousandtyone commented 10 months ago

I'm closing this since the basic implementation is complete. I'll continue to work on pieces like caching and test cases and will open them a different issues if that's okay. Feel free to re-open if you believe they should all be tracked under the same issue.