Menu

CONFIGURATION

Henk van den Akker
CONFIGURATION

SF Wiki Helper uses the local git configuration file to store settings. In that
way you can have separate configurations for different projects and wiki tools.
It also means you need to run sfwiki from the repository where you keep or are
going to keep your wiki's markdown files to be able to read and modify your
configuration.

The following items can be configured:

- Project and wiki name
  You will be asked to enter your project and wiki name when you download or
  publish your wiki pages. You have to enter the names exactly as they appear
  in the URL to your wiki. They are saved automatically. It is possible to
  download your wiki outside a git repository but in that case project and
  wiki name won't be saved
- Default branch name
  SF Wiki Helper assumes that the last commit of the default branch
  represents the current online contents of your wiki. By default it uses the
  'master' branch. Suppose your are using 'main', 'trunk' or another default
  branch name you can change it with sfwiki -c.
- 'Detect renamed pages' mode
  By default 'detect renamed pages' mode is off, i.e. when you rename a page
  it is published under the new name and you have to manually remove the page
  with the original name afterwards. When you turn it on you get the
  opportunity to manually rename renamed pages before publishing so you do not
  need to delete the original page afterwards. This has the advantage that the
  on-line revision history is preserved. For more information see RENAME PAGES
  (sfwiki -h rename). You can turn renamed page detection on or off with
  sfwiki -c. 
- Similarity threshold for 'detect renamed pages' mode
  For detecting renamed files git looks at the similarity between deleted and
  added files. A similarity threshold of 100 means the files need to be
  exactly the same. The lower the threshold, the more differences are
  allowed. So if you notice that renamed pages are not detected you can lower
  the threshold. If you detect false positives you can increase the
  threshold. The default threshold is 50. You can change it to any integer
  from 1 to 100 with sfwiki -c.

There are alternative ways to change these settings. Be careful though
because your input will not be validated. You can edit .git/config in your
git repository. Here is an example of how the sfwiki section can look like.

    [sfwiki]
        project = yourproject
        wiki = yourwiki
        defaultbranch = master
        detectrenamed = off
        similaritythreshold = 50

In addition you could use git config to change the sfwiki configuration, for
example:

    $ git config sfwiki.similaritythreshold 60

This will set the configuration locally. It is possible to set it globally,
for example:

    $ git config --global sfwiki.detectrenamed on

Don't do this for the project and wiki name though. And in all cases make
sure that detectrenamed has a value 'on' or 'off' and similaritythreshold is an
integer between 1 and 100.

[Home]


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.