diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a33b4b..9f3ffc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.1.1](https://github.com/nomike/scms/releases/tag/1.1.1) - 2025-05-11 + +[Compare with v1.1.0](https://github.com/nomike/scms/compare/v1.1.0...1.1.1) + +### Fixed + +- Fix detection and rendering of plain 'index' files ([3a3edd6](https://github.com/nomike/scms/commit/3a3edd6122d3a0ba5e92a270fb3f887b1fd180ce) by nomike). + ## [1.1.0](https://github.com/nomike/scms/releases/tag/1.1.0) - 2025-05-11 [Compare with 1.0.0](https://github.com/nomike/scms/compare/1.0.0...1.1.0) diff --git a/templatehelper.py b/templatehelper.py index 49860b3..5a94e51 100644 --- a/templatehelper.py +++ b/templatehelper.py @@ -82,7 +82,7 @@ def listdir(path): If a file named "index" is present, it is supposed to be rendered as the main content of the page and thus it will be ommited from the list as well. """ - ignorelist = ['index', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget'] + ignorelist = ['index', 'index.html', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget'] if os.path.exists(os.path.join(pathprefix, path, '.scmsignore')): with open( os.path.join(pathprefix, path, '.scmsignore'), @@ -115,7 +115,7 @@ def listchildren(path): If a file named "index" is present, it is supposed to be rendered as the main content of the page and thus it will be ommited from the list as well. """ - ignorelist = ['index', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget'] + ignorelist = ['index', 'index.html', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget'] if os.path.exists(os.path.join(pathprefix, path, '.scmsignore')): with open( os.path.join(pathprefix, path, '.scmsignore'), diff --git a/templates/nomike.com/directory.html b/templates/nomike.com/directory.html index fc513e5..c9c26a4 100644 --- a/templates/nomike.com/directory.html +++ b/templates/nomike.com/directory.html @@ -14,6 +14,8 @@ {% endif -%} {% endblock -%} {% block content -%} {% if templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path,'index.org')) -%} {{ templatehelper.orgpython.to_html(templatehelper.readfile(templatehelper.os.path.join(pathprefix,path,'index.org'))) | safe }} {% elif templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path,'index.md')) -%} {{ templatehelper.markdown.markdown(templatehelper.readfile(templatehelper.os.path.join(pathprefix,path,'index.md')),extensions=['fenced_code','toc','tables']) - | safe }} {% else -%} + | safe }} {% elif templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path, 'index.html')) -%} {{ templatehelper.readfile(templatehelper.os.path.join(pathprefix, path, 'index.html')) + | safe -}} {% elif templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path, 'index')) -%} {{ templatehelper.readfile(templatehelper.os.path.join(pathprefix, path, 'index')) + | safe -}} {% else -%}

/{{ path }}

{% endif -%} {% if templatehelper.os.path.isdir(templatehelper.os.path.join(pathprefix, path, 'image')) %} {% include templatehelper.os.path.join(templatehelper.config['template'], 'gallery.html') %} {% endif %} {% endblock %}