15

I'm using Doxygen to create html output.

I'd like to customize the output so that the index.html file could be more noticeable, since at the moment it is buried half way down a huge list of files in the html output folder.

For example, if it were moved up one directory to be outside of the 'bits and pieces' html files then it would be much more accessible for others who will be looking for it. However, I can't just ass a line of script to copy it to that location, since all of the links it has would break.

If I could configure Doxygen to have the index file go to a different location, or if you can think of another solution to my problem, I'd be grateful for your response.

Thanks

user1488804
  • 840
  • 1
  • 13
  • 27
  • Why don't you just create a symlink or shortcut to `index.html` and then place that where ever you like? Also, if you are in a graphical file manager typing a letter generally goes to the first file whose file name starts with that letter. For me hitting `i` goes straight to `index.html`. – Chris Aug 22 '12 at 11:28
  • @Chris Thanks for the advice. I'll try doing that. I know it's easy to get to for someone who knows what to look for, but people will be using the directory without knowing to look there. I just wanted to make it as easy and clear as possible. – user1488804 Aug 22 '12 at 12:19
  • Sure, so a symlink/shortcut in the root directory of your project pointing to `./html/index/html` is probably your best bet then. You can name this symlink anything you like to make it obvious to your users what it is. – Chris Aug 22 '12 at 12:46
  • @Chris Yep, it works nicely. Feel free to add your comment as an answer and I'll tick it for you. Thanks – user1488804 Aug 22 '12 at 12:54

2 Answers2

18

I would leave the documentation in its place and instead use the meta refresh option of the HTML language. Place a file, for instance called, "Documentation.html" in any folder you want with the following content

<meta http-equiv="REFRESH" content="0;URL=RELATIVE/PATH/TO/index.html">
Amirsaman
  • 181
  • 1
  • 5
2

As I mention in comments to the OP the easiest solution is probably to create a symbolic link or shortcut to the index.html file generated by doxygen, rather than trying to get doxygen to change the layout of it's output files. This symlink/shortcut can then be placed in the root directory of your project (or elsewhere), pointing to ./html/index/html, and named anything you like to make it obvious to your users what it is.

Chris
  • 44,602
  • 16
  • 137
  • 156
  • 2
    One more thing that you might be able to help me with: Before this folder gets to the end-user it gets zipped, then unzipped, probably on a Windows machine. The problem this is that symlinks don't work on Windows, but just turn into txt files containing the link. I can't (even with my limited goggling ability) think of a way to solve this cross-platform issue. Any thoughts? – user1488804 Aug 22 '12 at 13:41
  • This is probably best asked as a separate question. I don't know how to create symbolic links in a portable way, I would be surprised if there was an easy way to do this. You could have separate symlinks for Linux and Windows (the later using `mklink`). I'm not sure if the links will work however, since you will need to point to a relative path. – Chris Aug 22 '12 at 14:14
  • The only thing I can think of, which I will now try, is to make a html file (called index, or whatever) which contains a little bit of javascript pointing to the file in the subdirectory. But yes, I'll ask it as a separate question, since I might need someone who knows anything about javascript (not me then) to help me there. – user1488804 Aug 22 '12 at 14:41