hyperspy / hyperspy-website

HyperSpy website sources
https://hyperspy.org
3 stars 12 forks source link

Update Website #49

Closed CSSFrancis closed 10 months ago

CSSFrancis commented 11 months ago

Based on some previous discussion I tried to update the landing site for hyperspy.org. I think using https://github.com/scientific-python/scientific-python-hugo-theme is a good idea as it is a pretty good standard right now.

A couple of things I need to do still:

CSSFrancis commented 11 months ago

Just a note of what this looks like:

image
jlaehne commented 11 months ago

Yep that is a good starting point! I'll have a closer look later, but just some first thoughts:

ericpre commented 11 months ago

I have setup a netlify account for this repository but with the free account only one member is allowed. I don't know if adding the netlify configuration will be enough to get it to work or if something else is required in the netlify account.

From a quick google search, it doesn't seem that readthedocs can be used readily build and render the static html on PR. As I understand netlify will be used in PR only, the website will be pushed to https://github.com/hyperspy/hyperspy.github.com as it is done currently?

netlify[bot] commented 11 months ago

Deploy Preview for bucolic-pixie-58f008 ready!

Name Link
Latest commit 6d318644878619dcd4f927949f54664bbd56d4c3
Latest deploy log https://app.netlify.com/sites/bucolic-pixie-58f008/deploys/659476d6e84b200008534762
Deploy Preview https://deploy-preview-49--bucolic-pixie-58f008.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

ericpre commented 11 months ago

The webhook should be working now but they fail! 😅

CSSFrancis commented 11 months ago

@ericpre Now it should work :) There are still some small links etc that need to be fixed but for now at least it renders.

ericpre commented 11 months ago

Yes, this looks very promising indeed!

A few things that I noticed before I forgot:

CSSFrancis commented 11 months ago

I might be able to get back to this later tonight but if anyone wants to play around with it they are more than welcome to!

ericpre commented 11 months ago

Thank you @CSSFrancis, I am going off now but this is very good start! It seems that the base is almost in place with not that much to sort out:

For the documentation of the different version, we could simply use the version switcher from the pydata-sphinx-theme with the various version hosted at https://github.com/hyperspy/hyperspy-doc. This would having to update the website when making a minor release. I will have a look at how this can be done.

ericpre commented 11 months ago

Setting up the git submodule of the theme should be fixed now but I needed to customise the casestudies layout to get the initial render of this PR. I am not sure this template is very mature (for example the workaround to get the casetudies template to work is a bug which may be easy to fix in the theme), it needs to setup hugo, which is a bit more complicated than using the sphinx website, since we are already using sphinx for the documentation.

There is still a bug with building the static html... which seems to be a bug from the template or something missing from the documentation.

@CSSFrancis, the screenshot above looks different from the current version, is there anything that you customise to explain this difference?

CSSFrancis commented 11 months ago

@ericpre thanks for doing that! I was out of the country for a bit and had a little less access than I thought. (Probably a good thing)

We don't have to use this theme. I just liked it and wanted to stay on brand with numpy and scipy but having used it a bit you are correct it does seem a little half baked. I like Hugo as it's fast to render but you're right it does mean learning something else.

Most of the problems I think are related to no supporting .rst and the old news.

I changed the font size a little bit to make things a bit more readable. I'm not sure anything else was changed.

Maybe we should be doing something more like https://sunpy.org

jlaehne commented 11 months ago

I agree with @CSSFrancis that the hugo-based theme does look neat.

The sphinx-themes are clearly aimed at documentations and not websites and with the sunpy theme I feel that it looks a little too similar to the documentation (no suprise as it is based on the pydata-sphinx-theme).

However, in the end, maintainability is a very valid major argument. We should not create unnecessary extra work by choosing a too complicated framework.

CSSFrancis commented 11 months ago

I agree with @CSSFrancis that the hugo-based theme does look neat.

I think making things more official looking might go a long ways to building a larger userbase and recognition.

The sphinx-themes are clearly aimed at documentations and not websites and with the sunpy theme I feel that it looks a little too similar to the documentation (no suprise as it is based on the pydata-sphinx-theme).

Honestly, these things seem to have a life span of like 2 years and then if you haven't changed your theme you look outdated and like you haven't been keeping up. I usually just think we should copy numpy or scipy and then you know you aren't going to be left behind.

However, in the end, maintainability is a very valid major argument. We should not create unnecessary extra work by choosing a too complicated framework.

To this point, we make everything in hyperspy very beginner friendly. Realistically this part doesn't need to be, most people would just be adding a markdown file to the repo and a simple readme would be super easy to explain how to do this.

ericpre commented 11 months ago

Honestly, these things seem to have a life span of like 2 years and then if you haven't changed your theme you look outdated and like you haven't been keeping up. I usually just think we should copy numpy or scipy and then you know you aren't going to be left behind.

@CSSFrancis, I completely agree with this approach in principle, but in this case, in my opinion this template is not mature enough (particularly the documentation) and the numpy website has more requirement than we need.

In #50, I tried to migrate to the pydata-sphinx-theme and I think that this is a good alternative to consider! With this theme, we should be able to use jupyterlite-sphinx! :) With the https://github.com/scientific-python/scientific-python-hugo-theme, it should be possible too (numpy.org has it) but from what I have seen I suspect that this would be more difficult to setup because we don't have the relevant knowledge...

CSSFrancis commented 11 months ago

In #50, I tried to migrate to the pydata-sphinx-theme and I think that this is a good alternative to consider! With this theme, we should be able to use jupyterlite-sphinx! :) With the https://github.com/scientific-python/scientific-python-hugo-theme, it should be possible too (numpy.org has it) but from what I have seen I suspect that this would be more difficult to setup because we don't have the relevant knowledge...

That's fine with me as long as we update the website. You really had me at jupyterlite-sphinx ;) I might play around with it tonight and see what we can do to make things more "website" and less "documentation"