vsoch/docsy-jekyll

Is tags page required in the local repo from the remote theme?

ugreg opened this issue · 8 comments

ugreg commented

If we want to make changes to the tags page in a remote theme like https://github.com/vsoch/docsy-jekyll/blob/master/pages/tags.html, can those changes through the remote theme, without including the pages in the repository that uses the template?

Notice we have removed the tags and search pages from our repo https://github.com/microsoft/PartnerResources and this results in a 404:

image

vsoch commented

So if I understand correctly, you want to override the default tags page with your own via using the theme remotely? Or you have a clone of the repository and you've just deleted the pages and you are wondering why they don't show up? if you delete the pages, they of course will not show up.

I noticed in your repo you have put your own LICENSE, with absolutely no reference to docsy-jekyll here. The license here is Apache 2.0, and it covers the entire template. It is what Google chose, and both of us need to honor that. You can re-license with MIT but you need to give proper credit to the code it came from. You are currently representing the entire thing as your own, which is not ok with me, and likely not okay with Google.

vsoch commented

Here is more information about how to do this correctly. You should generally not remove the original license and give credit to the creator. https://softwareengineering.stackexchange.com/questions/220068/file-with-apache-2-0-and-my-modifications.

ugreg commented

Sure thing thanks vsoch, we will update this immediately. Is this change in line with the license best practice https://github.com/microsoft/PartnerResources/blob/main/LICENSE?

ugreg commented

So if I understand correctly, you want to override the default tags page with your own via using the theme remotely? Or you have a clone of the repository and you've just deleted the pages and you are wondering why they don't show up? if you delete the pages, they of course will not show up.

I was wondering this "So if I understand correctly, you want to override the default tags page with your own via using the theme remotely?" and the new remote we are considering using going forward is the fork of your repo here https://github.com/gregdegruy/docsy-jekyll.

We would like it so in our repo https://github.com/microsoft/PartnerResources that uses this new remote theme fork, we do not include the pages folder with search.html and tags.html in the repo and instead make all changes to the tags.html and search.html in the remote theme https://github.com/gregdegruy/docsy-jekyll.

vsoch commented

Sure thing thanks vsoch, we will update this immediately. Is this change in line with the license best practice https://github.com/microsoft/PartnerResources/blob/main/LICENSE?

Exactly! And you can also take the COPYRIGHT file verbatim, and just add your name and year above mine (e.g., the modified by example). Normally with code projects there would be files with headers that you edit directly, but for this repo I just have the COPYRIGHT in that file. And if you are able, a link in the README at the end to the template so if others like it they can grab it too.

For remote themes, the reason they are remote is to make your life easier - you don't need to copy everything, or really anything except for having your config. The general idea is that if you have a file locally in the same path, it will override the file for the theme. So for docsy-jekyll, you would probably have your custom style files and images, the config.yml, and then the _docs folder. You wouldn't need most of the includes, etc. So you are close but I think you are doing it backwards - instead of cloning the entire template to recreate the repo here, you just want to have your main site use the repo here as a template, and then add files there that you want to override. To test, I would start from scratch with an empty folder and the config, specify the remote theme as here, and then only add files (in the same organization) that you need changed (including those custom tags and the pages folder). Let me know if you have questions.

Thank you so much, I appreciate it!

ugreg commented

Thanks this was very helpful. Will experiment with a test repo to start from scratch, only include the config.yml in it and then point it to our forked remote them with some custom content. How does that approach sound? Adding @bhitney as well for visibility.

vsoch commented

Sure thing! Just to be clear - you don't need that third repo. The point of a template is to be able to point to it in your config.yaml, and then just add the changes to your repository. This includes content and style / images / includes, whatever you want to change. So 1. you shouldn't need your forked repo, and 2. the custom content goes into the repo that you linked above that will have the remote specified in the config.