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

Two blogs in one installation - is this possible? #716

Open
CharliePoole opened this issue Apr 3, 2024 · 5 comments
Open

Two blogs in one installation - is this possible? #716

CharliePoole opened this issue Apr 3, 2024 · 5 comments

Comments

@CharliePoole
Copy link

I have had two websites, using .com and .org extensions. I'm retired now for a long time and I won't renew the .com site.

I'd like to continue to have the two blogs available on one site. My personal blog (family, travel, hobbies, etc) will be the main entry point but I want to have a menu item for a second blog, to which I will import all my past technical posts and even do some new ones occasionally.

I recognize that one way to do this would be to copy HTMLy itself to a subdirectory, since it's not very big. But I'm hoping to find a more elegant solution using a single copy.

Any suggestions?

@danpros
Copy link
Owner

danpros commented Apr 4, 2024

Yes its possible but the content will accessible from both URL (from .com and .org). To setup up it simply leave the site URL empty, or in config/performance enable the multisite options. You can redirect the .com to .org later

Edit: so this solution merge the contents of two blog into one blog

@CharliePoole
Copy link
Author

CharliePoole commented Apr 4, 2024

Thanks for the quick answer. I read #549 and the commit that resolved it. But I think this is the reverse of what I need.

If I understand correctly, multi.site would allow

mysite.org              mysite.com
           |                           |
           |                           |
           * =>one blog<= *

But I want to have one domain with two blogs, e.g. one under the Blog menu item and one under Tech Blog.

The two would have different posts, and different sets of categories and tags.

@danpros
Copy link
Owner

danpros commented Apr 4, 2024

Yes current multisite config only in that scope.

At the moment htmly not support a true multisite (one htmly installation for multiple blog). Currently when htmly scan the blog posts:

$tmp = glob('content/*/blog/*/*/*.md', GLOB_NOSORT);

So if the /content/ folder can be set in setting (x folder for second blog etc.) seems we can achieved it pretty easily. Perhaps in the future.

@CharliePoole
Copy link
Author

I think I'll come back to the idea of setting the content folder after I get it working.

Just so people understand my use case... you can see my current beta site at https://charliepoole.org/beta. Currently, if you click on the 'Tech Blog' menu, you are taken to an entirely different site, built with statiq. Life will be simpler if I can make that second blog work with HTMLy.

By the way, I tried to put the tech site in a subdirectory of 'beta but it doesn't work because HTMLy takes over all the routings and doesn't allow the statiq software to operate at all. So instead it's now in a directory parallel to public_html. It may be that this will also be needed if I have two installations of HTMLy.

My plan now is to take this out of beta, so my site is cleaner and then come back to this issue. Not sure if I know enough about HTMLy to do what you suggest regarding /content/ folder, but I might give it a try.

@danpros
Copy link
Owner

danpros commented Apr 5, 2024

Just thinking the possibility..

To create a nice multisite website we need specific folder for the each additional site. So there is default website and it will use the default folder structure. And for additional site (second site), the structure eg. /sites/2ndsite.com/content/, the config also /config/sites/2ndsite.com/, the cache folder /cache/sites/2ndsite.com/.

Need many adjustment it seems.

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

No branches or pull requests

2 participants