Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support For Static Pages? #686

Closed
thousandtyone opened this issue Aug 23, 2023 · 6 comments
Closed

Support For Static Pages? #686

thousandtyone opened this issue Aug 23, 2023 · 6 comments
Assignees

Comments

@thousandtyone
Copy link
Contributor

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
Copy link

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
Copy link
Owner

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
Copy link
Contributor Author

thousandtyone commented Aug 24, 2023

@poppastring - My personal opinions:

  1. Is the assumption that these files undergo no server-side transformation? Strictly html?
  • As far as I know, that is how older DasBlog worked. There were pure HTML files posted under /content/static.
  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.
  • From what I recollect, legacy DasBlog used convention over configuration and stored this is /content/static folder. (i.e. same folder where we store posts but a subfolder called static under it.)
  1. What do we do about the file extensions? For example, I would want /somepage.html to be accessible via /somepage.
  • I would think this should honor instance instance-configured routing schemes for posts. e.g. I already have static pages in my legacy install, where the .html extension is replaced with .aspx (because all my posts use aspx extension). But if someone has used newer URL scheme in a fresh install it should use whatever they are following for their blog posts (based on their site settings). This will allow me to port my older static pages and retain their link when I migrate, but for someone new, they can use whatever scheme their blog is configured to use for posts.
  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.
  • V1 (basic implementation) can work under the assumption that upload is done manually. Later, it might be possible to extend this further and build a separate section for pages like WordPress does with WYSIWYG editor. If people want we can also build support using live writer later. For now, I would think, hand code the HTML and upload it to a folder for now as the first version. Any additions can be built as separate enhancements.
  1. There is currently an "about page" option that I think should become obsolete with this option, Thoughts?
  • I would vote Yes. Let the users create as many static pages as they want like they do in WordPress and other blogging engines. That is better than giving them an option to create just 1 about us page.

@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
Copy link
Owner

poppastring commented Aug 27, 2023

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

@thousandtyone
Copy link
Contributor Author

thousandtyone commented Aug 27, 2023

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:

#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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants