From 3f31d3da4a87ce2e08542de8fdbaa1de951385fa Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 28 Jan 2018 14:14:57 -0200 Subject: Fix sphinx and main Makefile location --- share/templater/basic/files/Makefile | 47 ----------------------------- share/templater/sphinx/_static/.empty | 0 share/templater/sphinx/files/_static/.empty | 0 share/templater/sphinx/files/conf.py | 15 ++++++--- share/templater/templater/files/Makefile | 47 +++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 51 deletions(-) delete mode 100644 share/templater/basic/files/Makefile delete mode 100644 share/templater/sphinx/_static/.empty create mode 100644 share/templater/sphinx/files/_static/.empty create mode 100644 share/templater/templater/files/Makefile diff --git a/share/templater/basic/files/Makefile b/share/templater/basic/files/Makefile deleted file mode 100644 index 6dbbd98..0000000 --- a/share/templater/basic/files/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Global Makefile - https://templater.fluxo.info -# -# This Makefile contains basic, common targets and also includes -# any Makefile.* available in the current folder. -# - -# Port to serve content -HTTP_PORT="8000" -HTTP_SERVER="SimpleHTTPServer" - -# Set CONTAINER based in what we have available in the system -# This variable can be user in other, included Makefiles to handle virtualization tasks -ifeq ($(shell which kvmx > /dev/null && test -s kvmxfile && echo yes), yes) - CONTAINER = kvmx -else ifeq ($(shell which vagrant > /dev/null && test -s Vagrantfile && echo yes), yes) - CONTAINER = vagrant -else ifeq ($(shell which docker > /dev/null && test -s Dockerfile && echo yes), yes) - CONTAINER = docker -else - CONTAINER = '' -endif - -# See http://unix.stackexchange.com/questions/32182/simple-command-line-http-server#32200 -# http://php.net/manual/en/features.commandline.webserver.php -serve: - @if [ "$(HTTP_SERVER)" = "SimpleHTTPServer" ]; then python -m SimpleHTTPServer $(HTTP_PORT); fi - @if [ "$(HTTP_SERVER)" = "ssi_server" ]; then PYTHONDONTWRITEBYTECODE=0 ssi_server.py $(HTTP_PORT); fi - @if [ "$(HTTP_SERVER)" = "http.server" ]; then python3 -m http.server $(HTTP_PORT); fi - @if [ "$(HTTP_SERVER)" = "php" ]; then php -S localhost:$(HTTP_PORT); fi - -# Configure a git post-receive hook -post_receive: - git config receive.denyCurrentBranch ignore - test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive - -# Process any other Makefile whose filename matches Makefile.* -# See https://www.gnu.org/software/make/manual/html_node/Include.html -# -# Some of those files might even contain local customizations/overrides -# that can be .gitignore'd, like a Makefile.local for example. --include Makefile.* - -# Customization examples can be as simple as setting variables: -#CONTAINER = vagrant -#CONTAINER = docker -#DESTDIR ?= vendor diff --git a/share/templater/sphinx/_static/.empty b/share/templater/sphinx/_static/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/share/templater/sphinx/files/_static/.empty b/share/templater/sphinx/files/_static/.empty new file mode 100644 index 0000000..e69de29 diff --git a/share/templater/sphinx/files/conf.py b/share/templater/sphinx/files/conf.py index 6bc7b9a..a605478 100644 --- a/share/templater/sphinx/files/conf.py +++ b/share/templater/sphinx/files/conf.py @@ -30,8 +30,15 @@ extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# Parsers +# See http://www.sphinx-doc.org/en/stable/markdown.html +source_parsers = { + '.md': 'recommonmark.parser.CommonMarkParser', +} + # The suffix of source filenames. -source_suffix = '.rst' +#source_suffix = '.rst' +source_suffix = ['.rst', '.md'] # The encoding of source files. #source_encoding = 'utf-8-sig' @@ -91,9 +98,9 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = "sphinx_rtd_theme" -#html_theme_path = ["_themes/sphinx_rtd_theme", ] -html_theme = 'default' +#html_theme = 'default' +html_theme = "sphinx_rtd_theme" +html_theme_path = ["_themes/sphinx_rtd_theme", ] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/share/templater/templater/files/Makefile b/share/templater/templater/files/Makefile new file mode 100644 index 0000000..6dbbd98 --- /dev/null +++ b/share/templater/templater/files/Makefile @@ -0,0 +1,47 @@ +# +# Global Makefile - https://templater.fluxo.info +# +# This Makefile contains basic, common targets and also includes +# any Makefile.* available in the current folder. +# + +# Port to serve content +HTTP_PORT="8000" +HTTP_SERVER="SimpleHTTPServer" + +# Set CONTAINER based in what we have available in the system +# This variable can be user in other, included Makefiles to handle virtualization tasks +ifeq ($(shell which kvmx > /dev/null && test -s kvmxfile && echo yes), yes) + CONTAINER = kvmx +else ifeq ($(shell which vagrant > /dev/null && test -s Vagrantfile && echo yes), yes) + CONTAINER = vagrant +else ifeq ($(shell which docker > /dev/null && test -s Dockerfile && echo yes), yes) + CONTAINER = docker +else + CONTAINER = '' +endif + +# See http://unix.stackexchange.com/questions/32182/simple-command-line-http-server#32200 +# http://php.net/manual/en/features.commandline.webserver.php +serve: + @if [ "$(HTTP_SERVER)" = "SimpleHTTPServer" ]; then python -m SimpleHTTPServer $(HTTP_PORT); fi + @if [ "$(HTTP_SERVER)" = "ssi_server" ]; then PYTHONDONTWRITEBYTECODE=0 ssi_server.py $(HTTP_PORT); fi + @if [ "$(HTTP_SERVER)" = "http.server" ]; then python3 -m http.server $(HTTP_PORT); fi + @if [ "$(HTTP_SERVER)" = "php" ]; then php -S localhost:$(HTTP_PORT); fi + +# Configure a git post-receive hook +post_receive: + git config receive.denyCurrentBranch ignore + test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive + +# Process any other Makefile whose filename matches Makefile.* +# See https://www.gnu.org/software/make/manual/html_node/Include.html +# +# Some of those files might even contain local customizations/overrides +# that can be .gitignore'd, like a Makefile.local for example. +-include Makefile.* + +# Customization examples can be as simple as setting variables: +#CONTAINER = vagrant +#CONTAINER = docker +#DESTDIR ?= vendor -- cgit v1.2.3