diff options
| author | Ralph Amissah <ralph@amissah.com> | 2011-12-19 22:27:58 -0500 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2011-12-19 22:52:50 -0500 | 
| commit | d71c116e5ae9ef3c26f098923a8204ea3e270a1e (patch) | |
| tree | a1d80347406eb8d59ba37e6a3114cac7574a759f /lib | |
| parent | v3: sysenv, html files in _sisu/home (*.html) copied as home pages (diff) | |
v3: html, seg output, index.html fixessisu_3.1.9
* place in correct directory and use language code as appropriate
* remove broken index.html from output [note the existing erroneous file is
  not removed by a program run, it has to be removed manually]
* [issue reported by chals (debian live-manual) on irc oftc #sisu]
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sisu/v3/html.rb | 10 | ||||
| -rw-r--r-- | lib/sisu/v3/sysenv.rb | 2 | 
2 files changed, 4 insertions, 8 deletions
| diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 3f867215..145ceb40 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -634,7 +634,6 @@ WOK        def segtoc          begin            @filename_html_segtoc=@file.write_file.html_segtoc -          @filename_html_index=@file.write_file.html_seg_index            @data.each do |para|              para.strip!              para.gsub!(/<!.+?!>/,'') @@ -642,19 +641,16 @@ WOK              para.gsub!(Xx[:html_relative1],@file.path_rel_links.html_seg_1)              unless para =~/\A\s*\Z/                @filename_html_segtoc.puts para,"\n" -              @filename_html_index.puts para,"\n"              end            end          rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error          ensure            @filename_html_segtoc.close -          @filename_html_index.close -          ## only works properly for directory_structure_by language, fix -          unless FileTest.file?("#{@file.output_path.html.dir}/index.html") +          unless FileTest.file?("#{@file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg_index}")              pwd_set=Dir.pwd              idx_lnk=@file.base_filename.html_segtoc -            mlnk='index.html' -            Dir.chdir(@file.output_path.html.dir) +            mlnk=@file.base_filename.html_seg_index +            Dir.chdir(@file.output_path.html_seg.dir)              FileUtils::rm_f(mlnk)              FileUtils::ln_s(idx_lnk, mlnk)              Dir.chdir(pwd_set) diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index e18a82c8..436e1d7f 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -3740,7 +3740,7 @@ WOK        def html_seg_index          ft='.html'          if @env.output_dir_structure.by_language_code? -          'toc' + ft +          'index' + ft          else            'index' + @md.lang_code_insert + ft          end | 
