From b5495d40dba9d4e54ff85678bf8b29dd8b64c435 Mon Sep 17 00:00:00 2001 From: Blerim Sheqa Date: Thu, 30 Nov 2017 09:00:23 +0100 Subject: [PATCH] Update regex to match anchor links --- build-docs.rb | 2 +- examples/icingaweb2-latest.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-docs.rb b/build-docs.rb index 9c4be47..5e42a03 100755 --- a/build-docs.rb +++ b/build-docs.rb @@ -85,7 +85,7 @@ main_pages = build_page_index(full_docs_dir, config['project']['docs_dir']) index_file = "#{clone_target}/index.md" FileUtils.cp("#{clone_target}/#{main_pages[0].values[0]}", index_file) index_content = File.read(index_file) -index_new_content = index_content.gsub(/\(((?!http)\S+(\.md|\.png))\)/, "(#{config['project']['docs_dir']}/\\1)") +index_new_content = index_content.gsub(/\(((?!http)\S+(\.md|\.png)(\S+)?)\)/, "(#{config['project']['docs_dir']}/\\1)") File.open(index_file, "w") {|file| file.puts index_new_content } mkdocs['pages'].push('' => "index.md") diff --git a/examples/icingaweb2-latest.yml b/examples/icingaweb2-latest.yml index 85de779..a1c6ac6 100644 --- a/examples/icingaweb2-latest.yml +++ b/examples/icingaweb2-latest.yml @@ -1,7 +1,7 @@ --- site_name: 'Icinga Web 2' -source_dir: 'www/source' -site_dir: 'www/html' +source_dir: 'www/docs/source' +site_dir: 'www/docs/html' project: git: 'https://github.com/Icinga/icingaweb2.git' ref: 'master'