Code Monkey home page Code Monkey logo

Comments (1)

wincent avatar wincent commented on June 11, 2024

Have you looked at the docs for the transform setting?

corpus/doc/corpus.txt

Lines 200 to 220 in 2b1db22

`transform` ~
When set to "local", tells Corpus to transform filenames into link targets
in a way that is suitable for navigating between files on a local
filesystem. This is the "local personal wiki" use case. For example, given a
filename of "Shopping list.md", we have:
- A title of "Shopping list".
- Links of the form `[Shopping list]`.
- Link targets of the form `Shopping list.md`.
When set to "web", tells Corpus to transform filenames into link targets in
a way that is suitable for deployment as a public wiki on the web. Spaces
are transformed into underscores, and the |corpus-base| setting is prepended.
For example, given a filename of "Troubleshooting tips.md", we have:
- A title of "Troubleshooting tips".
- Links of the form `[Troubleshooting tips]`.
- Link targets of the form `/wiki/Troubleshooting_tips`.
Defaults to 'local'.

This tells Corpus how titles and filenames map onto each other. At the moment there are two modes:

  • local: title equals filename, but without ".md" extension — so this means if you want spaces in your title, you'll need them in your filename too.
  • web: filenames have underscores instead of spaces, and links will have a prefix prepended to them, if set (eg. /wiki/).

Those are the two I need (for my local notes and remote wiki), so I was thinking that a third one could be added which would just be fn and accept an arbitrary function; then you would be able to apply any transform that you want.

from corpus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.