mirror of
https://github.com/nlohmann/json.git
synced 2026-07-05 10:05:10 +00:00
Consolidate documentation (#3071)
* 🦚 consolidate documentation * ♻️ overwork std specializations * 🦃 move images files to mkdocs * ♻️ fix URLs * 🪝 tweak MkDocs configuration * 🪝 add namespaces * 📡 document deprecations * 📡 document documentation generation * 🦜 improve search * 🦜 add examples * 🚧 start adding documentation for macros * 📡 add note for https://github.com/nlohmann/json/issues/874#issuecomment-1001699139 * 📡 overwork example handling * 📡 fix Markdown tables
This commit is contained in:
+2
-40
@@ -1,8 +1,6 @@
|
||||
SRCDIR = ../single_include
|
||||
SED:=$(shell command -v gsed || which sed)
|
||||
|
||||
all: doxygen
|
||||
|
||||
all: create_output
|
||||
|
||||
##########################################################################
|
||||
# example files
|
||||
@@ -24,49 +22,13 @@ EXAMPLES = $(wildcard examples/*.cpp)
|
||||
diff $@ $(<:.cpp=.output)
|
||||
rm $(<:.cpp=) $@
|
||||
|
||||
# create links to try the code online
|
||||
%.link: %.cpp
|
||||
rm -fr tmp
|
||||
mkdir tmp
|
||||
cp -r $(SRCDIR)/nlohmann tmp
|
||||
python2 scripts/send_to_wandbox.py tmp $< > $@.tmp
|
||||
/bin/echo -n "<a target=\"_blank\" href=\"`cat $@.tmp`\"><b>online</b></a>" > $@
|
||||
rm -fr tmp $@.tmp
|
||||
|
||||
# create output from all stand-alone example files
|
||||
create_output: $(EXAMPLES:.cpp=.output)
|
||||
|
||||
create_links: $(EXAMPLES:.cpp=.link)
|
||||
|
||||
# check output of all stand-alone example files
|
||||
check_output: $(EXAMPLES:.cpp=.test)
|
||||
|
||||
|
||||
clean:
|
||||
rm -fr me.nlohmann.json.docset html $(EXAMPLES:.cpp=)
|
||||
rm -fr $(EXAMPLES:.cpp=)
|
||||
$(MAKE) clean -C docset
|
||||
$(MAKE) clean -C mkdocs
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Doxygen HTML documentation
|
||||
##########################################################################
|
||||
|
||||
# create Doxygen documentation
|
||||
doxygen: create_output create_links
|
||||
doxygen
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, AllocatorType JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer>@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@JSON_HEDLEY_RETURNS_NON_NULL@@g' html/*.html
|
||||
$(SED) -i 's@JSON_HEDLEY_WARN_UNUSED_RESULT@@g' html/*.html
|
||||
|
||||
upload: clean doxygen check_output
|
||||
scripts/git-update-ghpages nlohmann/json html
|
||||
rm -fr html
|
||||
open http://nlohmann.github.io/json/
|
||||
|
||||
Reference in New Issue
Block a user