Skip to content

[R-pkg-devel] I changed my vignette's file name to lowercase, then realized the url was case-sensitive

4 messages · Duncan Murdoch, David Kepplinger, Dominic Comtois

#
I changed my "Introduction.html" vignette's name to
"introduction.html", realizing only after the fact that CRAN's URLs
are case sensitive.

Would the solution of adding to my package's source a new
Introduction.html file pointing to introduction.html using a <meta
http-equiv="refresh" ...> be a viable one? Or is there maybe another,
better solution?

Thanks in advance

Dominic Comtois, summarytools author & maintainer
#
On 02/08/2021 3:20 p.m., Dominic Comtois wrote:
I'm afraid I don't understand the issue here.  Other packages have 
vignettes named "introduction.html", e.g.

https://cran.r-project.org/web/packages/rasterly/index.html

links to

https://cran.r-project.org/web/packages/rasterly/vignettes/introduction.html

and it doesn't seem to cause any problems.  Why would you need a 
separate link to Introduction.html?

Duncan Murdoch
#
According to https://www.w3.org/TR/WD-html40-970708/htmlweb.html, "URLs in
general are case-sensitive", it's not only a CRAN thing.
Your vignette will be shipped with the package, hence if a user has a
case-insensitive file system (like macOS has by default), your workaround
would not work (see also Section 1.1 in "Writing R Extensions").

In my opinion the only solution is to fix the links, or go back to the old
case. There are plenty of tools around to replace all occurrences of
"Introduction.html" to "introduction.html" within your package. Of course
that doesn't work for all other links pointing to "Introduction.html" that
float around the web?

Best,
David

On Mon, Aug 2, 2021 at 3:21 PM Dominic Comtois <dominic.comtois at gmail.com>
wrote:

  
    
#
My question was in relation to the fact that my package has been
around for a while using this link:

https://cran.r-project.org/package=summarytools/vignettes/Introduction.html

which is now broken, since my last update (uploaded to CRAN a few days ago) uses

https://cran.r-project.org/package=summarytools/vignettes/introduction.html

So yes, I can revert to the previous Introduction.html, but I thought
a more flexible approach would be to add, when I submit my next
release, an "Introduction.html" redirecting to introduction.html.

I was wondering whether that would pose a problem, or whether there
might be a better way to redirect than using the meta tag / refresh
approach.



On Mon, 2 Aug 2021 at 15:51, David Kepplinger
<david.kepplinger at gmail.com> wrote: