Page MenuHomeFreeBSD

[documentation]: Fix links
ClosedPublic

Authored by fernape on Aug 29 2024, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 8:25 PM
Unknown Object (File)
Mon, Oct 28, 12:55 AM
Unknown Object (File)
Sun, Oct 27, 2:26 PM
Unknown Object (File)
Fri, Oct 25, 4:18 PM
Unknown Object (File)
Oct 14 2024, 8:41 AM
Unknown Object (File)
Oct 7 2024, 6:58 AM
Unknown Object (File)
Oct 4 2024, 10:42 PM
Unknown Object (File)
Oct 3 2024, 9:02 PM
Subscribers

Details

Summary

Use the crossref: macro all documentation internal links except for inter-book links.
This will produce the correct link in Single HTML, Splitted HTML and PDF.

Rework the macro to include the PDF special render.
Apply the changes where apply (basically convert the xref shortcut to crossref)

While here briefly document macros

PR: 266107
Should obsolete:

Dear reviewer: as you can imagine I did not check all links in the documentation, but check a fairly amount of them :-)
I'm not worried about possible mistakes now that we have a working solution.
If I accidentally broke a link, I can fix it later.

Test Plan

Check the behavior before the patch:

cd documentation && make run
Access to http://localhost:1313/ and check that the same links work in both
Split HTML and Single HTML.

Then do

cd documentation && make pdf
Go to Chapter 8 Desktops Environments.
Check the broken links in 8.1 Synopsis.

After applying the patch, do the same tests to check the links work in the three
different output formats.

Once this is in the tree I will commit another change clarifying the usage of
the link macros.

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 59239
Build 56126: arc lint + arc unit

Event Timeline

fernape edited the summary of this revision. (Show Details)
  • Fix a couple of links

I am so excited to test this after I get off work!

Tested chapter 8.1 wayland link on single pdf, doesn't work on mupdf or cellphone, opens up a web browser attempting to go to http://./#wayland.

Tested chapter 8.1 wayland link on single pdf, doesn't work on mupdf or cellphone, opens up a web browser attempting to go to http://./#wayland.

Do you mean "single HTML"?
I tested PDF. Go to page 169 ("Wayland on FreeBSD") and clicked on:

• Know how to install <<additional third-party software>>.
• How to identify and configure <<drivers for your graphics hardware>>.

Both links work.

I also tested the HTML version in split and single HTML and also both links work.
If you are testing with "make run" all links should be pointing to localhost, not to https//... whatever.

Tried with "make -j20" and "make run". "make run" worked as expected when connected to localhost instance as you described, but the PDF (handbook_en.pdf) did not work in mupdf on current or when I sent it to my phone.

Tried with "make -j20" and "make run". "make run" worked as expected when connected to localhost instance as you described, but the PDF (handbook_en.pdf) did not work in mupdf on current or when I sent it to my phone.

Are you using the handbook_en.pdf?
I will try and install mupdf. Can you try with xpdf?

Tried with "make -j20" and "make run". "make run" worked as expected when connected to localhost instance as you described, but the PDF (handbook_en.pdf) did not work in mupdf on current or when I sent it to my phone.

Tried with "make -j20" and "make run". "make run" worked as expected when connected to localhost instance as you described, but the PDF (handbook_en.pdf) did not work in mupdf on current or when I sent it to my phone.

Are you using the handbook_en.pdf?
I will try and install mupdf. Can you try with xpdf?

I installed mupdf, regenerate the PDF with make pdf and opened handbook_en.pdf with mupdf. Links work for me.

Yes, confirmed this works!!! Awesome! I will close all my attempts.

Eventually, I discovered that I had to git clean -dfx (is there a better way?) in order to delete the ignored files, or they weren't getting overwritten. Even though I was making, it wasn't happening. Worked in mupdf, xpdf, on my cellphone pdf reader, and htmls with firefox.

Yes, confirmed this works!!! Awesome! I will close all my attempts.

Eventually, I discovered that I had to git clean -dfx (is there a better way?) in order to delete the ignored files, or they weren't getting overwritten. Additionally, hugo doesn't seem to paralelize anything when passed the -j flag of make.

Tested on CURRENT with mupdf, xpdf, my cellphone pdf reader, and htmls with firefox.

This revision is now accepted and ready to land.Sep 2 2024, 3:38 PM

Yes, confirmed this works!!! Awesome! I will close all my attempts.

Eventually, I discovered that I had to git clean -dfx (is there a better way?) in order to delete the ignored files, or they weren't getting overwritten. Additionally, hugo doesn't seem to paralelize anything when passed the -j flag of make.

make clean should clean up all the generated artifacts.

Tested on CURRENT with mupdf, xpdf, my cellphone pdf reader, and htmls with firefox.

Terrific, thanks a lot!

Teriffic, thanks a lot!

Thank you! This is so exciting and informative!

bcr added a subscriber: bcr.

Looks good to me. I think we should try to use some automated link checker that reports when there is a broken link in our docs. But that's beside this review, so go ahead. Thank you for the work!

dbaio added a subscriber: dbaio.

I did some tests, and the links look good. Thanks for working on this improvement @fernape