Skip to content

Commit

Permalink
docs: improve metatags in doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoDornelles committed Nov 26, 2024
1 parent 5f24dd1 commit 02b61e2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/doxygen_plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,31 @@ local plugin_paragraph_link = '<script type="text/javascript" src="$relpath^doxy
local header_file = io.open('doxygen/header.html', 'r')
local header_content = header_file:read('*a')

local icon_clipboard = '<!--END PROJECT_ICON-->\n'
local icon_clipboard_pattern = '<%!%-%-END PROJECT_ICON%-%->'
local plugin_metadata = [[
<meta name="title" content="$projectname Docs"/>
<meta name="summary" content="$projectbrief"/>
<meta name="description" content="$title"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="$projectname Docs"/>
<meta property="og:site_name" content="$projectbrief"/>
<meta property="og:description" content="$title"/>
<meta property="og:image" content="http://docs.gamely.com.br/icon80x80.png"/>
<meta property="twitter:card" content="summary_large_image"/>
<meta property="twitter:title" content="$projectname Docs"/>
<meta property="twitter:description" content="$title"/>
<meta property="twitter:image" content="http://docs.gamely.com.br/icon80x80.png"/>
]]

header_file:close()

header_file = io.open('doxygen/header.html', 'w')
header_content = header_content:gsub(copy_clipboard_pattern, text_clipboard..plugin_paragraph_link)
header_content = header_content:gsub(copy_clipboard_pattern, text_clipboard..plugin_toggle_darkmode)
header_content = header_content:gsub(icon_clipboard_pattern, icon_clipboard..plugin_metadata)

header_file:write(header_content)
header_file:close()

0 comments on commit 02b61e2

Please sign in to comment.