Module:BibliographyLink: Difference between revisions

Created page with "local p = {} function p.link(frame) local args = frame:getParent().args local title = args["Title"] or "" local category = args["Category"] or "general" -- Get text before the first colon local base = mw.ustring.match(title, "^[^:]+") or title -- Clean slug: lowercase, replace spaces with dashes local slug = mw.ustring.lower(base) slug = mw.ustring.gsub(slug, " ", "-") local url = "https://adarislibrary.org/docs/books/" .. category..."
 
No edit summary
Line 14: Line 14:


     local url = "https://adarislibrary.org/docs/books/" .. category .. "/" .. slug
     local url = "https://adarislibrary.org/docs/books/" .. category .. "/" .. slug
     return string.format("[%s %s]", url, title)
     return string.format("<noautolinks>[%s %s]</noautolinks>", url, title)
end
end


return p
return p