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

website: Make latest release (1.7) be default manual #3130

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

wader
Copy link
Member

@wader wader commented May 27, 2024

Fixes issue with confusion about features that has not been
released yet.

Move deveopment manual.yml to dev/manual.yml
Symlink manual.yml to v1.7/manual.yml
Refactor to share history header with links to other manual versions.
Change man.test and man page generation to use dev/manual.yml

Related to #3078 #3127

@wader
Copy link
Member Author

wader commented May 27, 2024

Looks like this:

Screenshot 2024-05-27 at 20 41 58

Tested locally doing jq/docs$ pipenv run python3.12 build_website.py and serve output directory using this Caddyfile:

{
	debug
}

http://localhost:3000 {
	root /jq/* output
	uri strip_prefix /jq
	file_server
}

@wader wader mentioned this pull request May 27, 2024
@wader wader force-pushed the website-default-version-some-reorg branch 7 times, most recently from 0cc3118 to a906013 Compare May 27, 2024 19:17
<a href="/jq/manual/v1.5/">1.5</a>,
<a href="/jq/manual/v1.4/">1.4</a>,
<a href="/jq/manual/v1.3/">1.3</a> or
<a href="/jq/manual/dev/">development version</a>.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made these same and absolute for all for less maintenance work and so that links are correct at both /jq/manual/ and /jq/manual//

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /jq looks like the --root and the links don't work locally?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wops i messed up the markdown. It was suppose to say "...are correct at both /jq/manual/ and /jq/manual/<version>/". If we want to use a symlink to point /jq/manual/ to current release then that manual will be accessable at two locations so ../ will not work.

With the caddy config that maps /jq/<path> to <docs output root>/<path> (same as https://jqlang.github.io/jq/) links work fine for me locally. Or did you mean something else?

I think we want to keep /jq/manual/ working and not break links?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in docs/README.md and manual, we can specify the root path with --root to make links working with the output/ dir, serving with Python easily. So I think the links don't work locally. But the --root is a mess, I forgot why I couldn't make links work without this option, so you can cleanup the option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i see, didn't know. I fixed the link to be relative to root now so i think we can keep it for now.

Fixes issue with confusion about features that has not been
released yet.

Move deveopment manual.yml to dev/manual.yml
Symlink manual.yml to v1.7/manual.yml
Refactor to share history header with links to other manual versions.
Change man.test and man page generation to use dev/manual.yml

Related to jqlang#3078 jqlang#3127
@wader wader force-pushed the website-default-version-some-reorg branch from a906013 to f0dce44 Compare May 28, 2024 07:45
@wader
Copy link
Member Author

wader commented May 28, 2024

I wonder what to do about jqplay links in the dev manual that won't work 🤔 add some warning somewhere or make jqplay version-aware? (might confuse ppl also)

Copy link
Contributor

@itchyny itchyny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice. Thank you!

My slight concern is the abbreviated name dev in the path, but I think that's ok. BTW should we consider follow the trend of inclusiveness and change the default branch name? If we choose develop, I'd like to align the path of the manual, but if main, I don't care.

@wader
Copy link
Member Author

wader commented May 30, 2024

This is nice. Thank you!

Yeap hope it will address some confusion

My slight concern is the abbreviated name dev in the path, but I think that's ok.

Same as branch name might be good? but ok to merge this now as is and rename later if we decide to rename default branch?

BTW should we consider follow the trend of inclusiveness and change the default branch name? If we choose develop, I'd like to align the path of the manual, but if main, I don't care.

Fine with me too. Only concern i have would be that there are build scripts etc out there explicitly specifying "master"?

@itchyny
Copy link
Contributor

itchyny commented May 30, 2024

We should avoid changing the path as much as possible, we'll have to implement redirect for the links in other websites.

@wader
Copy link
Member Author

wader commented May 30, 2024

We should avoid changing the path as much as possible, we'll have to implement redirect for the links in other websites.

Good point, i was mostly concerned to not break the "default" manual /jq/manual URL in this change. So should we change /jq/manual/dev to /jq/manual/master in this PR?

@itchyny
Copy link
Contributor

itchyny commented May 30, 2024

I don't think /master/ in the path is a good name. I was just worried about the case /dev/ for develop branch. But anyway, I think it's better to fix the manual confusion soon rather than waisting time for misalignment against the default branch name in the future. So I'm ok with merging this now. Any thoughts from other maintainers?

@wader
Copy link
Member Author

wader commented Jun 3, 2024

Merge?

@wader
Copy link
Member Author

wader commented Jun 14, 2024

@itchyny ok to merge?

@wader wader merged commit c1d885b into jqlang:master Jul 12, 2024
29 checks passed
@wader wader deleted the website-default-version-some-reorg branch July 12, 2024 15:43
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.

3 participants