aarondandy / ducky-docs

Simple documentation tools and libraries to help you make .NET project documentation how you want it.
Other
2 stars 0 forks source link

CRef to file name #81

Open aarondandy opened 11 years ago

aarondandy commented 11 years ago

I need a way to convert CRefs to file names. To do that correctly though the model may also be needed.Examples:

if(modelIsType && nameIsSimple)
    return model.FullName;

var mangledName = model.FullName.Replace(<>[]{}() with _); // terrible!
if(mangledName.Length > 10)
    mangledName = GetHashString(mangledName);
return mangledName;
aarondandy commented 11 years ago

This is probably similar to the URI naming used on MSDN.

aarondandy commented 11 years ago

While this could be useful for static site generation it would also benefit creating slugs that can be indexed better than ?cRef=N: .

aarondandy commented 9 years ago

This is being implemented as StaticApiPageGenerator.CreateSlugName

There are some issues with ref params, generics and other things. Right now the implementation is replacing those characters with less offensive ones. It may be better instead to remove the strange characters and for those slugs that have characters removed a hash value should be appended.