Ignore:
Timestamp:
Jun 13, 2012 12:11:59 PM (10 years ago)
Author:
jemian
Message:

tweaked the instructions for publishing from the SVN server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • softGlue_examples/source/adding_examples.rst

    r878 r923  
    2727++++++++++++++++++++++++++++++++++++++++++
    2828
    29 =========  ===============================================
     29=========  ========================================
    3030extension  command
    31 =========  ===============================================
     31=========  ========================================
    3232``.html``  ``svn ps svn:mime-type text/html``
    3333``.css``   ``svn ps svn:mime-type text/css``
    3434``.js``    ``svn ps svn:mime-type text/javascript``
    35 =========  ===============================================
     35=========  ========================================
    3636
    37 Any of these commands may be useful at times when adding
     37Publishing new content as HTML
     38++++++++++++++++++++++++++++++
     39
     40The subversion repository also can act as a WWW server.
     41It is possible to publish the built HTML documentatiojn
     42as a complete web site directly from the subversion server.
     43For this to happen, the built documentation needs to be added
     44to the subversion repository.  The MIME types of certain files
     45needs to be set properly so the SVN server can deliver them
     46identified in a way that WWW clients will render them properly.
     47
     48The commands below may be useful at times when adding
    3849new examples so the HTML files display properly from the
    3950subversion repository server::
    4051
    4152        cd {softGlue_examples}
     53       
     54        # these commands will add all built HTML content
     55        svn add build/html/*
     56        svn add build/html/*/*
     57        # -or-  (to be more selective as to what is published)
    4258        svn st -u
    43         svn add {any content from previous command with "?" in left column}
     59        svn add {any content from previous "svn st" command with "?" in left column}
     60       
     61        # Now, you need to set the MIME types properly
     62        # or the SVN server will display the pages unformatted.
    4463        svn ps svn:mime-type text/html build/html/*.html
    4564        svn ps svn:mime-type text/html build/html/*/*.html
     
    4766        svn ps svn:mime-type text/css build/html/_static/*.css
    4867
     68Advisory about ``make clean``
     69^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4970
    50 .. note:: Web documentation available from the SVN server:
     71When a Sphinx web site is to be published from the SVN server,
     72it is important to avoid the use of ``make clean``.  The *clean*
     73procedure in the standard as-supplied Sphinx Makefile completely
     74removes all content under the ``build/``
     75subdirectory (including the ``build/html/.svn`` subdirectory)
     76and removes the subversion information necessary to republish the WWW site.
    5177
    52    https://subversion.xor.aps.anl.gov/bcdaext/softGlue_examples/build/html/index.html
     78Instead of ``make clean``, you can force a complete Sphinx rebuild
     79by removing the ``build/doctrees`` subdirectory.  Either edit
     80the Makefile accordingly (as has been done here) or use this command::
     81
     82   /bin/rm -rf build/doctrees
     83
     84On this modified Makefile, ``make clean`` should look like this::
     85
     86  [jemian@gov,286,softGlue_examples]$ make clean
     87  #-rm -rf build/*
     88  rm -rf build/doctrees
     89
     90
     91Restoring SVN ``build/html/.svn`` subdirectory
     92~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     93
     94If the ``build/html/.svn`` has been removed,
     95it can be easy to restore from the SVN repository.
     96Try these commands::
     97
     98   mv build build.modified
     99   svn update
     100   make html
     101
     102Once you are confident that things work the way they should,
     103you can remove the old ``build.modified`` directory::
     104
     105   /bin/rm -rf build.modified
     106
     107.. note:: This can still retain unused content in the ``build/html``
     108   subdirectory (only a problem for the few who browse the
     109   ``build/html`` subdirectory contents). 
     110   To completely rebuild the published web site), it
     111   may be necessary to remove the ``build/html`` subdirectory from the
     112   SVN repository, commit that change, rebuild the web site, then add
     113   the new ``build/html`` subdirectory back into SVN.
Note: See TracChangeset for help on using the changeset viewer.