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

Publish the manual in HTML5 #743

Closed
wants to merge 2 commits into from
Closed

Publish the manual in HTML5 #743

wants to merge 2 commits into from

Conversation

cjmayo
Copy link
Contributor

@cjmayo cjmayo commented Sep 16, 2023

The currently used html/docbook.xsl outputs ISO-8859-1.


Is there another way other than switching to xhtml5? But unlike chunked output (which is UTF-8) there is no param to set.

@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 18, 2023

Updated configure.ac.

One visual difference I can see is bullets on tables of contents. These can be avoided e.g.:

ul.toc li {
    list-style-type: none;
}

@strk
Copy link
Member

strk commented Sep 20, 2023

We look for html/docbook.xsl at configure time so if html5 is needed we'd need configure.ac to be updated to check for that too

@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 20, 2023

OK. I've put that back.

@strk
Copy link
Member

strk commented Sep 25, 2023

Don't you want the chunked html to also be UTF-8 ?

@strk
Copy link
Member

strk commented Sep 25, 2023

Updated configure.ac.

One visual difference I can see is bullets on tables of contents. These can be avoided e.g.:

ul.toc li {
    list-style-type: none;
}

See html/style.css to tweak that

@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 25, 2023

Chunked is already UTF-8, html/chunk.xsl unlike html/docbook.xsl takes a parameter --stringparam chunker.output.encoding UTF-8.
Maybe there is a case for switching to xhtml5/chunk.xsl anyway, 69 validation errors [1].

I hesitated about adding the CSS (I have used it locally) if it only applied to the single page and not the chunked one.

[1]
https://validator.w3.org/nu/?doc=https%3A%2F%2Fpostgis.net%2Fdocs%2Fmanual-3.4%2Fen%2F

@strk
Copy link
Member

strk commented Sep 26, 2023

May I ask you to please file a ticket for the misencoded HTML manual on https://trac.osgeo.org/postgis ? It will then be easier to schedule inclusion of your patch.

This enables the single page manual to be encoded in UTF-8 instead of
ISO-8859-1, and allows browsers to process the pages without resorting
to quirks mode.
@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 27, 2023

OK., created https://trac.osgeo.org/postgis/ticket/5553#ticket

I've also updated the PR to included the chunked manual.

@cjmayo cjmayo changed the title Generate single page HTML manual as UTF-8 Publish the manual in HTML5 Sep 27, 2023
doc/Makefile.in Outdated
@@ -107,6 +107,7 @@ XSLTPROC_COMMONOPTS= \
--param table.borders.with.css 1 \
--stringparam chunker.output.encoding UTF-8 \
--stringparam chunker.output.indent no \
--stringparam html.ext .html \
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, why/where did you need this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default the pages are being saved with a .xhtml extension. This seemed like a good idea to minimise the change -- but looks like a problem. I hadn't tried the chunked-html-web target, and now the <script /> tag is not being seen as closed and making the page blank - as published on https://postgis.net/docs/manual-dev/en/.

doc/html/style.css Outdated Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think these changes should be later on in the Docbook Specifics section.

@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 28, 2023

I've added a separate commit because the first one has been reviewed - and not sure where https://postgis.net/docs/manual-dev/en/ has been published from.

Ideally this new commit could be just squashed in though without any comments.

@cjmayo cjmayo marked this pull request as draft September 28, 2023 18:53
@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 28, 2023

Looks like .xhtml breaks the links from the main table of contents...

Back to the start. Just XHTML for the single page - and accept the extra CSS in style.css?

@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 28, 2023

No, that was wrong - I hadn't updated my local environment. The internal links work fine.

But... it would break any links people have created elsewhere to specific pages.

@cjmayo
Copy link
Contributor Author

cjmayo commented Sep 29, 2023

Maybe it's best to just solve the initial problem of the single page not being UTF-8:
#747

We're a bit trapped by xsltproc only supporting XSLT 1.0 and the development of the DocBook XSL templates having moved on to XSLT 3.0.

@cjmayo
Copy link
Contributor Author

cjmayo commented Oct 4, 2023

With ga.js being removed fd46289 the problem of a blank opening page when served as text/html has gone.

@cjmayo cjmayo closed this Oct 4, 2023
@cjmayo cjmayo deleted the xhtml5 branch January 3, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants