Skip to content

Conversation

@RogerHaase
Copy link
Member

No description provided.

'help-common': 'help-common', # contains media files used by other language helps
'help-en': 'help-en', # replace this with help-de, help-ru, help-pt_BR etc.
# define custom namespaces if desired, trailing / below causes foo to be stored in default backend
# 'foo/': 'default',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind that was that pages starting with foo/ (== subpages of foo) are stored in that namespace.

If you remove the slash, page foobar and fool will also be stored into that namespace.

Except if there was a code change that auto-appends a slash. Is that the case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing / was from /storage/__init__.py create_simple_mapping #563 when wikiconfig.py used create_simple_mapping. The trailing / is no longer in the docs https://moin-20.readthedocs.io/en/latest/admin/configure.html#create-simple-mapping but lived on in code comments.

wikiconfig.py now uses create_mapping per #1237 which allows admins to create custom namespaces.

namespaces = {
    # maps namespace name -> backend name
    # first, configure the required, standard namespaces:
    NAMESPACE_DEFAULT: 'default',
    - snip -
    # some additional custom namespaces stored in default backend:
    'foo': 'default',
    'bar': 'default',
    # custom namespace with a backend
    'baz': 'baz',
}

There were 2 code changes, trailing / was removed from create_simple_mapping, and wikiconfig.py changed to use create_mapping.

@RogerHaase RogerHaase merged commit 1d0fd0a into moinwiki:master Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants