Remove PDF related files/content
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/fd239317 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/fd239317 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/fd239317 Branch: refs/heads/website Commit: fd239317c83ee229b390e7aca2d776cbc3ca2a3d Parents: b09a69d Author: Richard Downer <rich...@apache.org> Authored: Thu Oct 12 13:51:46 2017 +0100 Committer: Richard Downer <rich...@apache.org> Committed: Tue Oct 17 13:26:06 2017 +0100 ---------------------------------------------------------------------- .gitignore | 1 - README.md | 3 -- _config.yml | 6 --- _includes/singlepage-content.html | 51 ------------------ _includes/singlepage-item.html | 41 -------------- _layouts/singlePage.html | 30 ----------- contributing/pdf-manual.md | 58 -------------------- style/css/singlePage.css | 68 ------------------------ website/community/index.md | 2 - website/community/security/index.md | 2 - website/developers/index.md | 1 - website/documentation/index.md | 1 - website/download/index.md | 2 - website/learnmore/blueprint-tour.md | 1 - website/learnmore/catalog/catalog-item.html | 2 - website/learnmore/catalog/index.html | 2 - website/learnmore/index.md | 1 - website/meta/sitemap.md | 1 - website/meta/versions.md | 1 - zoneMergeManual.html | 31 ----------- zoneMergeStarted.html | 31 ----------- 21 files changed, 336 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 97a4608..806a062 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ brooklyn*.log.* ignored _site -_pdf _config_local.yml .sass-cache style/js/catalog/items.js http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 5e560a0..10d41c2 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,6 @@ Some issues we've encountered are: (more details [here](http://www.nokogiri.org/tutorials/installing_nokogiri.html)) * on Ubuntu, `sudo apt-get install libxslt-dev libxml2-dev libcurl4-openssl-dev python-minimal` -If you are building the PDF documentation, this requires [wkhtmltopdf](http://wkhtmltopdf.org/). -You can download it from [here](http://wkhtmltopdf.org/downloads.html) or use the usual apt-get / yum / brew. - Seeing the Website and Docs --------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/_config.yml ---------------------------------------------------------------------- diff --git a/_config.yml b/_config.yml index 576b802..dd0760c 100644 --- a/_config.yml +++ b/_config.yml @@ -47,13 +47,7 @@ sass: # TODO the 0.12.0 paths must be changed! brooklyn-stable-version: 0.12.0 -pdf-default-base-url: http://brooklyn.apache.org -pdf-default-versioned-url-subpath: /v/0.12.0 -pdf-rewrite-prefixes: - '/guide' : '/v/0.12.0' - '/website' : '' - brooklyn-version: 1.0.0-SNAPSHOT # BROOKLYN_VERSION brooklyn-snapshot-git-branch: master # if line above is SNAPSHOT this should point to corresponding git branch (e.g. master, 0.4) http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/_includes/singlepage-content.html ---------------------------------------------------------------------- diff --git a/_includes/singlepage-content.html b/_includes/singlepage-content.html deleted file mode 100644 index 5fadfe2..0000000 --- a/_includes/singlepage-content.html +++ /dev/null @@ -1,51 +0,0 @@ -{% pop site_items item %} -{% if item[page.page_mask] != true %} - - {% set_hash_entry item path item_path %} - {% set_hash_entry item url item_url %} - {% set_hash_entry item content item_content %} - {% set_hash_entry item title item_title %} - {% set_hash_entry item id item_id %} - - {% if visitedb contains item_title %} - {% comment %} <!-- ignore --> {% endcomment %} - {% elsif item['external'] %} - {% comment %} <!-- ignore --> {% endcomment %} - - {% else %} - {% capture pid %}{{ item.title | remove:'/' | replace:' ','-' | downcase }}{% endcapture %} - {% if item_content != null %} - <div id="contentsLink-{{pid}}" class="section-breaker section p-{{item_id}}"> - <span style="width: 100%"><h1>{{ item_title }}</h1><a href="#content-top" class="goToTop">^</a></span> - {% comment %} - <!-- - --This Section re-writes images so the base of their paths is the root docs directory. This allows the PDF to build properly. - --> - {% endcomment %} - {% comment %}<!-- Build the page directory by removing the file name from the item url -->{% endcomment %} - {% capture page_url %}{{ item_url | replace_regex:'[^\/]*$', '' }}{% endcapture %} - - {% capture new_img %}img src=".{{ page_url }}{% endcapture %} - - {% comment %}<!-- Build a regex which replaces the current path with an absolute one but leaves any sub folders such as /images -->{% endcomment %} - {% capture img_regex %}(img(.*?)src="{{ page_url | replace:'/','\/' }})|(img(.*?)src="){% endcapture %} - - {% comment %}<!-- Filter the content of the included page -->{% endcomment %} - {% capture content_filtered %}{{ item_content | replace_regex: img_regex, new_img | refactorURL: 'href="(.*?)"', site, site.pages, page.availablePages, page, item }}{% endcapture %} - - {{ content_filtered }} - </div> - {% endif %} - {% if item['menu'] %} - {% push visitedb item_title %} - {% push site_items item %} - {% assign last_item = site_items[-1] %} - {% for item in last_item['menu'] %} - {% push site_items item %} - {% include singlepage-content.html %} - {% endfor %} - {% pop site_items item %} - {% endif %} - {% endif %} - - {% endif %} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/_includes/singlepage-item.html ---------------------------------------------------------------------- diff --git a/_includes/singlepage-item.html b/_includes/singlepage-item.html deleted file mode 100644 index 4ede485..0000000 --- a/_includes/singlepage-item.html +++ /dev/null @@ -1,41 +0,0 @@ -{% pop site_items item %} -{% if item[page.page_mask] != true %} - - {% set_hash_entry item path item_path %} - {% set_hash_entry item url item_url %} - {% set_hash_entry item title item_title %} - {% set_hash_entry item content item_content %} - {% set_hash_entry item data item_data %} - - {% comment %}<!-- Build a list of all the pages included in this manual -->{% endcomment %} - {{ page.availablePages | appendToArray: item }} - - {% capture pid %}{{ item.title | remove:'/' | replace:' ','-' | downcase }}{% endcapture %} - <a id="{{ item_path }}" name="{{ item_path }}" href="javascript:void(0);"></a> - {{ page.my_array['test'] = 'test' }} - <li> - {% if visited contains item_title %} - {{ item['title'] }} <a href="#link-{{pid}}"><span class="octicon octicon-link-external flip"></span></a> - {% elsif item['external'] %} - {{ item['title'] }} <a href="{{ item['url'] }}"><span class="octicon octicon-link-external"></span></a> - {% else %} - {% if item['content'] != null %} - <a href="#contentsLink-{{pid}}" id="link-{{pid}}">{{ item['title'] }}</a> - {% else %} - {{ item['title'] }} - {% endif %} - {% if item['menu'] %} - {% push visited item_title %} - <ul> - {% push site_items item %} - {% assign last_item = site_items[-1] %} - {% for item in last_item['menu'] %} - {% push site_items item %} - {% include singlepage-item.html %} - {% endfor %} - {% pop site_items item %} - </ul> - {% endif %} - {% endif %} - </li> -{% endif %} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/_layouts/singlePage.html ---------------------------------------------------------------------- diff --git a/_layouts/singlePage.html b/_layouts/singlePage.html deleted file mode 100644 index 5e738c3..0000000 --- a/_layouts/singlePage.html +++ /dev/null @@ -1,30 +0,0 @@ ---- ---- -<!DOCTYPE html> -<html> -<head> -<title>{{ page.title }} - Apache Brooklyn</title> -<meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> -<link href=".{{site.path.style}}/deps/bootstrap.min.css" rel="stylesheet"> -<link href=".{{site.path.style}}/deps/octicons/octicons.css" rel="stylesheet"> -<link href=".{{site.path.style}}/deps/bootstrap-theme.css" rel="stylesheet"> - -<link href=".{{site.path.style}}/css/website.css" rel="stylesheet"> -<link rel="stylesheet" href=".{{ site.path.style }}/css/singlePage.css" type="text/css" media="screen" /> -<style>.{{ page.css_hide_class }}{ display: none; } .{{ page.css_show_class }}{ display: inline !important; visibility: visible !important; }</style> -<script> -[] -.forEach -.call(document.querySelectorAll('a[target="_blank"]'), - function(link) { - link.removeAttribute('target'); -}); -</script> -</head> - -<body> - -{{ content }} - -</body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/contributing/pdf-manual.md ---------------------------------------------------------------------- diff --git a/contributing/pdf-manual.md b/contributing/pdf-manual.md deleted file mode 100644 index 161d9c0..0000000 --- a/contributing/pdf-manual.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -section: Single Page Manual and PDF -section_position: 4 -section_type: inline ---- - -## Single Page Manual and PDF - -A single page overview of selections of the site are available in `zoneMergeManual` and `zoneMergeStarted`. These overviews are for the user manual -and getting started guide respectively. The zone merge pages go through the [site structure](index.html#site-structure), described above, and compile the files from this into a -single HTML page. - -In order to do this, each page is iterated over in order and it's rendered content included in the page. The plug-in `regex_filter.rb` is used to re-write - <a> links from the structured site into a form which works on a single page. Links are re-written in the following manner: - -- If the link is from an external domain, leave it as an unaltered link -- If the link is an anchor, convert to the anchor scheme used in the single page -- If the link target is in the single page, change the link to point at the anchor in the single page -- If the link is pointing at somewhere on the brooklyn site which is not included in this single page, point to the website with a specific version, so https://brooklyn.apache.org/v/0.9.0-SNAPSHOT/start/concept-quickstart.html for instance - -In addition, all images src's are re-written relative to the root directory. - -Pages can be masked from the compilation process by defining a `page_mask` in the YAML front matter of the zone merge file, then including this mask as `true` in the child page to exclude. -These pages will then not be included in the compiled single page. Note that this will mask both the child page and any children of this masked page. -For example [zoneMergeStarted](https://github.com/apache/brooklyn-docs/blob/master/zoneMergeStarted.html){:target="_blank"} uses the mask `started-pdf-exclude`: - -{% highlight yaml %} -title: Apache Brooklyn Manual -layout: singlePage -page_mask: started-pdf-exclude -... -{% endhighlight %} - -Then in latter pages, such as [/guide/ops/index.md](https://github.com/apache/brooklyn-docs/blob/master/guide/ops/index.md){:target="_blank"} include `started-pdf-exclude: true` to -exclude this section from the getting started guide. - -{% highlight yaml %} -title: Operations -started-pdf-exclude: true -... -{% endhighlight %} - -This will exclude not only the operations page but all of the operations section. - -Specific content can be also be masked or unmasked at a page component level by specifying CSS show and hide classes: - -{% highlight yaml %} -css_hide_class: usermanual-pdf-exclude -css_show_class: usermanual-pdf-include -{% endhighlight %} - -If the above YAML is included in the front matter of a zone merge file, the classes `usermanual-pdf-exclude` and `usermanual-pdf-include` will add or remove a -`display: none` to a HTML object. In addition the single page theme files [singlePage.html](https://github.com/apache/brooklyn-docs/blob/master/_layouts/singlePage.html){:target="_blank"} and -[singlePage.css](https://github.com/apache/brooklyn-docs/blob/master/style/css/singlePage.css) can be used to style only the single merged pages. - -### Conversion to PDF - -These single merged pages are then converted to PDF using wkhtmltopdf in the build scripts of this site. http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/style/css/singlePage.css ---------------------------------------------------------------------- diff --git a/style/css/singlePage.css b/style/css/singlePage.css deleted file mode 100644 index 2f2c3f6..0000000 --- a/style/css/singlePage.css +++ /dev/null @@ -1,68 +0,0 @@ -/* Fix the bootstrap parts so they show the content not the controls*/ -.nav.nav-tabs{ - display: none; -} -.tab-content > .tab-pane { - display: inline; -} -.fade { - opacity: 1; -} -#next, *[id$='_next']{ - display: none; -} -.collapse { - display: block; -} -.section-breaker { - page-break-before:always; -} -.panel-heading{ - padding-bottom: 15px; -} -/* The styled bootstrap panels */ -.panel-body, .panel-default{ - background: none; - border: 0px solid #fff !important; - box-shadow: none; - padding: 0px; -} -.panel-default > .panel-heading{ - background: none; - border: 0px solid #fff !important; - box-shadow: none; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; -} -pre, pre code{ - overflow: auto; - white-space: pre-wrap; /* CSS 3 */ - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ -} -pre { - font-family: "Lucida Console", Monaco, monospace; -} -.goToTop{ - padding-right: 25px; - padding-top: 75px; - float: right; - font-size: 20pt; - font-weight: bold; -} -.page .content h1{ - display: inline-block; - width: 90%; -} -.jumobotron.annotated_blueprint{ - display: none; -} -.usermanual-pdf-include{ - display: inline !important; -} -.usermanual-pdf-exclude{ - display: none !important; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/community/index.md ---------------------------------------------------------------------- diff --git a/website/community/index.md b/website/community/index.md index d6c0572..870f0ee 100644 --- a/website/community/index.md +++ b/website/community/index.md @@ -1,8 +1,6 @@ --- layout: website-normal title: Community -started-pdf-exclude: true -usermanual-pdf-exclude: true children: - mailing-lists.md - irc.md http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/community/security/index.md ---------------------------------------------------------------------- diff --git a/website/community/security/index.md b/website/community/security/index.md index a503f2b..ed75dd0 100644 --- a/website/community/security/index.md +++ b/website/community/security/index.md @@ -1,8 +1,6 @@ --- layout: website-normal title: Security Advisories -started-pdf-exclude: true -usermanual-pdf-exclude: true children: --- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/developers/index.md ---------------------------------------------------------------------- diff --git a/website/developers/index.md b/website/developers/index.md index df19f20..ccbf934 100644 --- a/website/developers/index.md +++ b/website/developers/index.md @@ -1,7 +1,6 @@ --- layout: website-normal title: Developers -started-pdf-exclude: true children: - code/ - how-to-contribute.md http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/documentation/index.md ---------------------------------------------------------------------- diff --git a/website/documentation/index.md b/website/documentation/index.md index a6979bd..d1f323d 100644 --- a/website/documentation/index.md +++ b/website/documentation/index.md @@ -1,7 +1,6 @@ --- layout: website-normal title: Documentation -started-pdf-exclude: true children: - link: /v/latest/index.html title_in_menu: "User Guide" http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/download/index.md ---------------------------------------------------------------------- diff --git a/website/download/index.md b/website/download/index.md index b74f002..0c56756 100644 --- a/website/download/index.md +++ b/website/download/index.md @@ -1,8 +1,6 @@ --- layout: website-normal title: Download -started-pdf-exclude: true -usermanual-pdf-exclude: true children: - { link: /v/latest/misc/download.html, title: Details, not_external: true } - { path: verify.md, title: Verify } http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/learnmore/blueprint-tour.md ---------------------------------------------------------------------- diff --git a/website/learnmore/blueprint-tour.md b/website/learnmore/blueprint-tour.md index 11a1f23..0a7795b 100644 --- a/website/learnmore/blueprint-tour.md +++ b/website/learnmore/blueprint-tour.md @@ -1,7 +1,6 @@ --- layout: website-normal title: A Quick Tour of a Brooklyn Blueprint -usermanual-pdf-exclude: true title_in_menu: Blueprint Tour --- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/learnmore/catalog/catalog-item.html ---------------------------------------------------------------------- diff --git a/website/learnmore/catalog/catalog-item.html b/website/learnmore/catalog/catalog-item.html index 6a655bc..ab9b5b7 100644 --- a/website/learnmore/catalog/catalog-item.html +++ b/website/learnmore/catalog/catalog-item.html @@ -1,7 +1,5 @@ --- title: Catalog -page_mask: usermanual-pdf-exclude -page_mask: started-pdf-exclude --- <!-- Licensed to the Apache Software Foundation (ASF) under one http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/learnmore/catalog/index.html ---------------------------------------------------------------------- diff --git a/website/learnmore/catalog/index.html b/website/learnmore/catalog/index.html index ceda969..78b8a26 100644 --- a/website/learnmore/catalog/index.html +++ b/website/learnmore/catalog/index.html @@ -1,7 +1,5 @@ --- title: Catalog -page_mask: usermanual-pdf-exclude -page_mask: started-pdf-exclude --- <!-- Licensed to the Apache Software Foundation (ASF) under one http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/learnmore/index.md ---------------------------------------------------------------------- diff --git a/website/learnmore/index.md b/website/learnmore/index.md index 42dfa69..e3b84a4 100644 --- a/website/learnmore/index.md +++ b/website/learnmore/index.md @@ -1,7 +1,6 @@ --- layout: website-normal title: Learn More -started-pdf-exclude: true children: - blueprint-tour.md - features/ http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/meta/sitemap.md ---------------------------------------------------------------------- diff --git a/website/meta/sitemap.md b/website/meta/sitemap.md index 38c66b3..7411976 100644 --- a/website/meta/sitemap.md +++ b/website/meta/sitemap.md @@ -1,6 +1,5 @@ --- layout: website-normal -usermanual-pdf-exclude: true title: Site Map --- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/website/meta/versions.md ---------------------------------------------------------------------- diff --git a/website/meta/versions.md b/website/meta/versions.md index a7142de..d9678cc 100644 --- a/website/meta/versions.md +++ b/website/meta/versions.md @@ -1,6 +1,5 @@ --- layout: website-normal -usermanual-pdf-exclude: true title: Versions --- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/zoneMergeManual.html ---------------------------------------------------------------------- diff --git a/zoneMergeManual.html b/zoneMergeManual.html deleted file mode 100644 index d1b8e6e..0000000 --- a/zoneMergeManual.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Apache Brooklyn Manual -layout: singlePage -page_mask: usermanual-pdf-exclude -css_hide_class: usermanual-pdf-exclude -css_show_class: usermanual-pdf-include -availablePages: [] ---- -{% comment %}<!-- This page builds the single page manual for the PDF, note that this name must be retained for conversion order -->{% endcomment %} - -<div id="content_container" class="container"> - <header> - <h1 id="content-top">Apache Brooklyn: User Manual</h1> - </header> - <h1>Contents</h1> - - <nav><ul> - {% assign visited = "" | split: "|" %} - {% for node in site.data.menu %} - {% push site_items node %} - {% include singlepage-item.html %} - {% endfor %} - </ul></nav> - - {% assign visitedb = "" | split: "|" %} - {% for node in site.data.menu %} - {% push site_items node %} - {% include singlepage-content.html %} - {% endfor %} - -</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/fd239317/zoneMergeStarted.html ---------------------------------------------------------------------- diff --git a/zoneMergeStarted.html b/zoneMergeStarted.html deleted file mode 100644 index e4d703a..0000000 --- a/zoneMergeStarted.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Apache Brooklyn Manual -layout: singlePage -page_mask: started-pdf-exclude -css_hide_class: started-pdf-exclude -css_show_class: started-pdf-include -availablePages: [] ---- -{% comment %}<!-- This page builds the single page getting started for the PDF, note that this name must be retained for conversion order -->{% endcomment %} - -<div id="content_container" class="container"> - <header> - <h1 id="content-top">Apache Brooklyn: Getting Started Guide</h1> - </header> - <h1>Contents</h1> - - <nav><ul> - {% assign visited = "" | split: "|" %} - {% for node in site.data.menu %} - {% push site_items node %} - {% include singlepage-item.html %} - {% endfor %} - </ul></nav> - - {% assign visitedb = "" | split: "|" %} - {% for node in site.data.menu %} - {% push site_items node %} - {% include singlepage-content.html %} - {% endfor %} - -</div> \ No newline at end of file