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

Code cleanup + update to ETT 4.1.0 #9

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

bedroesb
Copy link

@bedroesb bedroesb commented Jan 29, 2025

There was some old code that is not needed with the current Jekyll theme + some deprecated files unrelated to the current deployment. I also took out unused includes. You can test the changes here: https://bedroesb.github.io/seek-documentation/

This will close #8

@bedroesb
Copy link
Author

@PhilReedData Couldn't hold myself :)

@bedroesb
Copy link
Author

One of the problems is that with the current version the TOC is jumping in size, and a custom layout making it not so future proof. I also recomend to set the sizing of headings through Bootstrap variables, since they have automatic scaling.

@bedroesb
Copy link
Author

I was wondering if we could take out the home buttons inside the sidebar?

@bedroesb
Copy link
Author

I also impoved the perma links.

@PhilReedData
Copy link
Contributor

hi Bert, you have been busy here, I appreciate it. I have run this PR branch locally and it works very well.

For the sidebar home links, I seem to remember seeing that done but I can't find examples. I was a little concerned that the other way to get to home was unclear: clicking on the name or logo of the site, top left of any page. I hid the name since 'FAIRDOM SEEK Documentation' is too long and I couldn't see a way to shorten it there only. I'm not stuck on it, though.

For the heading types, yes there could be more improvements there too.

I am surprised (and pleased) that you took out so much permalink code and it still works, I wonder what I was doing wrong, I couldn't get them to work otherwise.

So what is remaining to do from your suggestions after I merge this PR?

@stuzart
Copy link
Member

stuzart commented Jan 30, 2025

I tried this out and the page jumps about all over the place when switching between pages, which the live version at https://docs.seek4science.org doesn't. The header and what appears to be the fonts or spacing keep changes sizes.

Try changing pages whilst keeping an eye on the header and see if you get the same problem

@PhilReedData
Copy link
Contributor

PhilReedData commented Jan 30, 2025

Oh right, I'll try again and look more closely for that. I'll see if I can get Bert's branch to appear on our docs test server, I think that means I should make a fresh PR to the original ett branch and it should get picked up on a cron job overnight. That way, all the images will load correctly since the site will be served from the root directory, and perhaps that is affecting some scripts or other assets loading too.

@stuzart will this work? #11

@bedroesb
Copy link
Author

You are touching on an interesting topic! The theme is made to work on forks too (everything uses relative urls) So either you serve the images in the same folder as the page, or you make use of the relative_url jekyll snippet, which I used now. This allows you to:

  • Serve on a fork for previewing and testing (@PhilReedData no need for some magic deployment anymore, you just activate GitHub Pages in your settings!) This Branch you can test here:https://bedroesb.github.io/seek-documentation/
  • SEEK admins can serve their docs just from GitHub pages not needing a custom domain.

@stuzart Could you make a screen recording and drop it here? Which browser are you using? I can not recreate your behavior. I make use in the theme of the responsive capabilities of bootstrap, instead of pinning one size.

@bedroesb
Copy link
Author

This page with images in a table seem to also render fine now:https://bedroesb.github.io/seek-documentation/help/user-guide/isa-overview

@bedroesb
Copy link
Author

bedroesb commented Jan 31, 2025

For demonstration I moved the home button from the sidebar to the topnav ( a more common place to place it) But if there is a reason not to do so, let me know, I don't want that to stop this pull request.

@PhilReedData
Copy link
Contributor

PhilReedData commented Jan 31, 2025

The testing server should have the latest* code now (unconfirmed).

I considered the relative_url code, and rewriting all images to use the include image.html, but I thought that would mean more/unnecessary work, and possibly the images would no longer show when viewing the docs in GitHub regular/editor view. It is worth me going through every time an image is used and replacing it with one of these longer methods?

*Edit, latest means last night's code, but I see Bert has done more fixes this morning.

@bedroesb
Copy link
Author

bedroesb commented Jan 31, 2025

For the images (but in general the urls) There are multiple options:

  • using ![ALT]({{ "PATH" | relative_url }}){:.screenshot}
  • using ![ALT]({{site.baseurl}}/PATH){:.screenshot}
  • serving the images in a img/ dir inside the same repo of the page, so it is relatively available to the page on the same level
  • using the images.html include like you mentioned. This would mean that it becomes theme specific.

I have replaced all those images using a regex. I could easily change it to another syntax for the whole website in one click.

@bedroesb
Copy link
Author

My idea would be that you can test things without the need of a testing server, so you are independent and can easily see the latest changes of things.

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

Successfully merging this pull request may close these issues.

Mix old theme and ETT
3 participants