Skip to content

Commit

Permalink
doc work
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Jan 29, 2024
1 parent 0ebcd87 commit c15191d
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 74 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build and publish documentation

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' #pattern match
branches:
- main
- tk_volatile
Expand Down
13 changes: 13 additions & 0 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Did not work:
.sbtighttable table td {
white-space: normal !important;
}
This did, but affects all tables:
*/

/*
.wy-table-responsive table td {
white-space: normal !important;
}
*/
10 changes: 7 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ def _reporoot():
# for :sbpkg:`MyPkg` links
extensions += '_simple_build_system._sphinxext',
def _sbbundles():
#For now, just linking to main branch on github. This could be improved!
sbdgversion='main'
if re.match(r"^v[0-9]+\.[0-9]+\.[0-9]+$", version ):
sbdgversion = version
sbversion='main' # probably is best to keep at main
sbdgdata = _reporoot() / 'src' / 'simplebuild_dgcode' / 'data'
import _simple_build_system as _
sbdata = pathlib.Path(_.__file__).parent / 'data'
sbdgdata_online = f'https://github.com/mctools/simplebuild-dgcode/tree/{sbdgversion}/src/simplebuild-dgcode/data'#FIXME FIXME url "-" to "_"!!!
sbdata_online = f'https://github.com/mctools/simplebuild/tree/{sbversion}/src/_simple_build_system/data'
sbdgdata_online = f'https://github.com/mctools/simplebuild-dgcode/[blob|tree]/{sbdgversion}/src/simplebuild-dgcode/data'#FIXME FIXME url "-" to "_"!!!
sbdata_online = f'https://github.com/mctools/simplebuild/[blob|tree]/{sbversion}/src/_simple_build_system/data'

bundles = { 'dgcode' : ( sbdgdata / 'pkgs', sbdgdata_online + '/pkgs' ),
'dgcode_val' : ( sbdgdata / 'pkgs_val', sbdgdata_online + '/pkgs_val' ),
Expand All @@ -69,6 +68,11 @@ def _sbbundles():
return bundles
simplebuild_pkgbundles = _sbbundles()

def setup(app):
#Avoid horizontal scroll-bars in tables (see
#https://stackoverflow.com/a/40650120):
app.add_css_file('custom.css')

#https://img.shields.io/github/issues/mctools/simplebuild
#https://img.shields.io/github/issues/mctools/simplebuild/bug
#https://img.shields.io/github/issues/detail/state/mctools/simplebuild/36
Expand Down
Loading

0 comments on commit c15191d

Please sign in to comment.