mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-03 02:25:57 +08:00
doc: Use the doxygen awesome theme (#2807)
* chore: remove cppreference * feat: add doxyfile * feat: add doxygen-awesome theme * chore: remove unneccessary doxygen config form cmake * test: for doxygen test purposes Note: revert before merging to main * fix: try removing css from rm * fix: set style sheet via cmake * feat: make doxygen theme finally work * fix: remove mathjax from doxyfile * feat: add sidebar and make mathjax work * doc: add transparency and make output svg of dot * fix: make dots interactive * chore: move math jax from cmake to doxyfile * feat: add header file * chore: add header file to cmake * chore: remove redundant transparency config * fix: force cmake to use config file * chore: remove working directory * fix: use old add_docs command * feat: fix doxygen build * fix: re enable clang assited parsing * fix: use relative paths * fix: relative paths arent necessary * feat: add project logo and favicon * fix: revert gh-pages to master * fix: add dot to doxyfile * fix: add lib clang to doxygen * fix: use source browser * fix: add clang as compiler * docs: remove headers from source browser * revert: branch to master
This commit is contained in:
6
.github/workflows/gh-pages.yml
vendored
6
.github/workflows/gh-pages.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Doxygen CI
|
||||
|
||||
on:
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
run: |
|
||||
brew install graphviz ninja doxygen
|
||||
- name: configure
|
||||
run: cmake -G Ninja -B ./build -S .
|
||||
run: cmake -G Ninja -Duse_libclang=ON -DCMAKE_CXX_COMPILER=clang++ -B ./build -S .
|
||||
- name: build
|
||||
run: cmake --build build -t doc
|
||||
- name: gh-pages
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
git config --global user.name "$GITHUB_ACTOR"
|
||||
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
rm -rf d* && rm *.html && rm *.svg && rm *.map && rm *.md5 && rm *.png && rm *.js && rm *.css
|
||||
rm -rf d* && rm *.html && rm *.svg && rm *.map && rm *.md5 && rm *.png && rm *.js
|
||||
git add .
|
||||
cp -rp ./build/html/* . && rm -rf ./build && ls -lah
|
||||
git add .
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(Algorithms_in_C++
|
||||
project(TheAlgorithms/C++
|
||||
LANGUAGES CXX
|
||||
VERSION 1.0.0
|
||||
DESCRIPTION "Set of algorithms implemented in C++."
|
||||
@@ -54,47 +54,30 @@ add_subdirectory(physics)
|
||||
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
|
||||
find_package(Doxygen OPTIONAL_COMPONENTS dot dia)
|
||||
if(DOXYGEN_FOUND)
|
||||
set(DOXYGEN_GENERATE_MAN NO)
|
||||
set(DOXYGEN_USE_MATHJAX YES)
|
||||
set(DOXYGEN_GENERATE_HTML YES)
|
||||
# set(DOXYGEN_HTML_TIMESTAMP YES)
|
||||
set(DOXYGEN_EXTRACT_STATIC YES)
|
||||
set(DOXYGEN_INLINE_SOURCES YES)
|
||||
set(DOXYGEN_CREATE_SUBDIRS YES)
|
||||
set(DOXYGEN_EXTRACT_PRIVATE YES)
|
||||
set(DOXYGEN_GENERATE_TREEVIEW YES)
|
||||
set(DOXYGEN_STRIP_CODE_COMMENTS NO)
|
||||
set(DOXYGEN_EXT_LINKS_IN_WINDOW YES)
|
||||
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
|
||||
set(DOXYGEN_EXCLUDE_PATTERNS */build/*)
|
||||
set(DOXYGEN_ENABLE_PREPROCESSING YES)
|
||||
set(DOXYGEN_CLANG_ASSISTED_PARSING YES)
|
||||
set(DOXYGEN_FILE_PATTERNS *.cpp *.h *.hpp *.md)
|
||||
set(DOXYGEN_MATHJAX_EXTENSIONS TeX/AMSmath TeX/AMSsymbols)
|
||||
set(DOXYGEN_TAGFILES "doc/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/")
|
||||
if(DOXYGEN_FOUND)
|
||||
if(MSVC)
|
||||
set(DOXYGEN_CPP_CLI_SUPPORT YES)
|
||||
endif()
|
||||
set(DOXYGEN_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML")
|
||||
|
||||
if(Doxygen_dot_FOUND)
|
||||
set(DOXYGEN_HAVE_DOT YES)
|
||||
set(DOXYGEN_CALL_GRAPH YES)
|
||||
set(DOXYGEN_INTERACTIVE_SVG YES)
|
||||
set(DOXYGEN_DOT_IMAGE_FORMAT "svg")
|
||||
endif()
|
||||
|
||||
if(OPENMP_FOUND)
|
||||
set(DOXYGEN_PREDEFINED "_OPENMP=1")
|
||||
endif()
|
||||
|
||||
if(GLUT_FOUND)
|
||||
set(DOXYGEN_PREDEFINED ${DOXYGEN_PREDEFINED} "GLUT_FOUND=1")
|
||||
endif()
|
||||
|
||||
doxygen_add_docs(
|
||||
doc
|
||||
${PROJECT_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Generate documentation"
|
||||
CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
2926
doc/Doxyfile
Normal file
2926
doc/Doxyfile
Normal file
File diff suppressed because it is too large
Load Diff
5
doc/assets/favicon.svg
Normal file
5
doc/assets/favicon.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 159.7 116.9" enable-background="new 0 0 159.7 116.9" xml:space="preserve">
|
||||
<path fill="#00BCB4" d="M54.7,110.7H9l11.9-28.1h32L88.5,0H50.3L22.2,65.3h17.2c1.2,2,3.4,3.4,5.9,3.4c3.8,0,6.9-3.1,6.9-6.9 S49.1,55,45.3,55c-2.8,0-5.1,1.6-6.2,4h-8.2L54.2,6.2h25L49.1,76.3l-31.7,0.2L0,116.9h58.8l7.7-16.8h25.5l8.5,16.8h59.1L106.3,0 L54.7,110.7z M69.8,93.5L79,73.4L89,93.5H69.8z M104.5,111.4l-5.8-11.7h18.2c1.2,2.2,3.5,3.7,6.1,3.7c3.8,0,6.9-3.1,6.9-6.9 c0-3.8-3.1-6.9-6.9-6.9c-2.8,0-5.2,1.7-6.3,4.1H95.9L82,66.7l10.2-22.4l11.5,23.4h5.4c1.1,2.3,3.5,4,6.2,4c3.8,0,6.9-3.1,6.9-6.9 c0-3.8-3.1-6.9-6.9-6.9c-2.9,0-5.4,1.8-6.4,4.4h-2L95,38.1l11.3-24.8l44.4,98.1H104.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 936 B |
BIN
doc/assets/project_logo.png
Normal file
BIN
doc/assets/project_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
File diff suppressed because it is too large
Load Diff
84
doc/html/header.html
Normal file
84
doc/html/header.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_ICON-->
|
||||
<link rel="icon" href="$relpath^$projecticon" type="image/x-icon" />
|
||||
<!--END PROJECT_ICON-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<script type="text/javascript">var page_layout=1;</script>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<!--BEGIN COPY_CLIPBOARD-->
|
||||
<script type="text/javascript" src="$relpath^clipboard.js"></script>
|
||||
<!--END COPY_CLIPBOARD-->
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
$darkmode
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
</head>
|
||||
<body>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"$logosize/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign">
|
||||
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td>
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN !FULL_SIDEBAR-->
|
||||
<td>$searchbox</td>
|
||||
<!--END !FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<tr><td colspan="2">$searchbox</td></tr>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
||||
2681
doc/styles/doxygen-awesome.css
Normal file
2681
doc/styles/doxygen-awesome.css
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user