Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ 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).

<!-- insertion marker -->
## [1.1.0](https://github.com/nomike/scms/releases/tag/1.1.0) - 2025-05-11

<small>[Compare with 1.0.0](https://github.com/nomike/scms/compare/1.0.0...1.1.0)</small>

This release adds support for org-files, which are a popular format for notes and task management.
So instead of 'index' or 'index.md' files, you can now also use 'index.org'.

This release adds `org-python` as a requirement. Be sure to run
`pip install -r requirements.txt --upgrade` in your virtual environment to install the new
dependency.

Depending on your setup, you might also want to `killall scms.fcgi` to force the webserver to
reload the application.

### Added

- Add support for org-files. ([fd9cc8b](https://github.com/nomike/scms/commit/fd9cc8bc55ec40677fea707ba6773eb2d5eaea07) by nomike).

## [1.0.0](https://github.com/nomike/scms/releases/tag/1.0.0) - 2025-05-11

<small>[Compare with first commit](https://github.com/nomike/scms/compare/a880905b6acb03a98f817cde20d1dc552536e7e1...1.0.0)</small>
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,15 @@ This template is used to render error pages (e.g. HTTP/404).
Optionally you could create templates for specific erro codes. The name has
to be [errorcode].html (e.g. '404.html'). If no specific error template is
found, sscm falls back to 'error.html'.

## Development

### Versioning

This project uses [EffVer](https://jacobtomlinson.dev/effver/).

Version numbers are comprised of three parts: Macro, Meso, Micro.

If the macro version is incremented, expect a lare effort when upgrading.
Meso version increments are usually small changes, but may require some effort.
Micro version increments are usually bugfixes or small changes, which should not require any effort when upgrading.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
flask
markdown
org-python
pyyaml
regex
6 changes: 4 additions & 2 deletions templatehelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

# pylint: disable=unused-import
import markdown
# pylint: disable=unused-import
import orgpython
import regex
import yaml

Expand Down Expand Up @@ -80,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', '*.scmsfasicon', '*.scmstarget']
ignorelist = ['index', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget']
if os.path.exists(os.path.join(pathprefix, path, '.scmsignore')):
with open(
os.path.join(pathprefix, path, '.scmsignore'),
Expand Down Expand Up @@ -113,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', '*.scmsfasicon', '*.scmstarget']
ignorelist = ['index', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget']
if os.path.exists(os.path.join(pathprefix, path, '.scmsignore')):
with open(
os.path.join(pathprefix, path, '.scmsignore'),
Expand Down
7 changes: 4 additions & 3 deletions templates/nomike.com/directory.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<a href="{{ templatehelper.urllib.parse.quote(link) }}" target="{{ templatehelper.readfile(templatehelper.os.path.join(path, name + '.scmstarget')) }}"><i class="fas {{ templatehelper.getfasicon(templatehelper.os.path.join(path, name)) }}"></i> {{ name }}</a> {% else %}
<a href="{{ templatehelper.urllib.parse.quote(link) }}"><i class="fas {{ templatehelper.getfasicon(templatehelper.os.path.join(path, name)) }}"></i> {{ name }}</a> {% endif %} {% endfor %}
</div>
{% endif -%} {% endblock -%} {% block content -%} {% if 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 }} {% elif templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path, 'index')) -%} {{ templatehelper.readfile(templatehelper.os.path.join(pathprefix, path, 'index')) | safe -}} {% else -%}
{% 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 -%}
<h1>/{{ path }}</h1>
{% 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 %}
{% 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 %}