This is an automated email from the ASF dual-hosted git repository. wave pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/flex-site.git
commit 6e64aa30f3bd64e951c15cae873085c3d9b1e54d Author: Dave Fisher <[email protected]> AuthorDate: Sun Jun 13 17:45:26 2021 -0700 ready to build Flex --- LICENSE | 202 +++ README.md | 5 + cgi-bin/single-mirror-url.cgi | 3 - content/.htaccess | 26 +- content/download-utilities.md | 4 +- content/mail | 1 - lib/path.pm | 43 - lib/view.pm | 199 --- migration/README.md | 32 + migration/changes.txt | 1839 ++++++++++++++++++++++++++ pelicanconf.py | 172 +++ requirements.txt | 2 + templates/flex-v2-footer.html | 76 -- templates/flex-v2-header.html | 193 --- templates/flex-v2-hometemplate-bottom.mdtext | 21 - templates/flex-v2-hometemplate-top.mdtext | 69 - templates/flex-v2-renderer.html | 19 - templates/html_page.html | 3 - templates/leftnav.mdtext | 36 - templates/no_template.html | 1 - templates/single_narrative.html | 1 - templates/skeleton.html | 42 - theme/apache/templates/base.html | 368 ++++++ theme/apache/templates/page.html | 4 + theme/plugins/asfgenid.py | 410 ++++++ 25 files changed, 3049 insertions(+), 722 deletions(-) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4e93e58 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Pelican ASF Website + +See [ASF-Pelican](https://infra.apache.org/asf-pelican.html) + +See [migration notes](migration/README.md) diff --git a/cgi-bin/single-mirror-url.cgi b/cgi-bin/single-mirror-url.cgi deleted file mode 100644 index 1c3f597..0000000 --- a/cgi-bin/single-mirror-url.cgi +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# Wrapper around the standard mirrors.cgi script -exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* \ No newline at end of file diff --git a/content/.htaccess b/content/.htaccess index edc9b53..5a676fc 100644 --- a/content/.htaccess +++ b/content/.htaccess @@ -4,17 +4,17 @@ Options +ExecCGI ErrorDocument 404 /notFound.html -Redirect 301 /source.html http://flex.apache.org/download-source.html -Redirect 301 /news.html http://flex.apache.org/index.html -Redirect 301 /team.html http://flex.apache.org/about-people.html -Redirect 301 /mailing-lists.html http://flex.apache.org/community-mailinglists.html -Redirect 301 /tourdeflex/explorer.html http://flex.apache.org/tourdeflex/index.html -Redirect 301 /dependencies/afe.jar http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/afe.jar?format=raw -Redirect 301 /dependencies/aglj40.jar http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/aglj40.jar?format=raw -Redirect 301 /dependencies/flex-fontkit.jar http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-fontkit.jar?format=raw -Redirect 301 /dependencies/rideau.jar http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/rideau.jar?format=raw -Redirect 301 /dependencies/flex-messaging-common.jar http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-messaging-common.jar?format=raw -Redirect 301 /dependencies/osmf1/osmf.swc http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/frameworks/libs/osmf.swc?format=raw -Redirect 301 /dependencies/osmf2/OSMF.swc http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/frameworks/libs/OSMF2_0.swc?format=raw -Redirect 301 /single-mirror-url-hack.html http://apacheflexbuild.cloudapp.net:8400/examples/servlets/servlet/GetMirror +Redirect 301 /source.html /download-source.html +Redirect 301 /news.html /index.html +Redirect 301 /team.html /about-people.html +Redirect 301 /mailing-lists.html /community-mailinglists.html +Redirect 301 /tourdeflex/explorer.html /tourdeflex/index.html +Redirect 301 /dependencies/afe.jar https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/afe.jar?format=raw +Redirect 301 /dependencies/aglj40.jar https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/aglj40.jar?format=raw +Redirect 301 /dependencies/flex-fontkit.jar https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-fontkit.jar?format=raw +Redirect 301 /dependencies/rideau.jar https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/rideau.jar?format=raw +Redirect 301 /dependencies/flex-messaging-common.jar https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-messaging-common.jar?format=raw +Redirect 301 /dependencies/osmf1/osmf.swc https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/frameworks/libs/osmf.swc?format=raw +Redirect 301 /dependencies/osmf2/OSMF.swc https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/frameworks/libs/OSMF2_0.swc?format=raw +Redirect 301 /single-mirror-url-hack.html https://apacheflexbuild.cloudapp.net:8400/examples/servlets/servlet/GetMirror Redirect 301 /flexjs/docs https://cwiki.apache.org/confluence/display/FLEX/FlexJS diff --git a/content/download-utilities.md b/content/download-utilities.md index 04b22c9..214cc87 100644 --- a/content/download-utilities.md +++ b/content/download-utilities.md @@ -16,7 +16,7 @@ Regular size (302 x 302) Use this code to embed the regular size badge on your website/blog: - <iframe name="afSDKInstallBadgeRegular" src="http://flex.apache.org/installerbadge/index.html" + <iframe name="afSDKInstallBadgeRegular" src="https://flex.apache.org/installerbadge/index.html" frameborder="0" height="302" marginheight="0" marginwidth="0" scrolling="no" width="302"></iframe> Small size (402 x 84) @@ -25,7 +25,7 @@ Small size (402 x 84) Use this code to embed the small size badge on your website/blog: - <iframe name="afSDKInstallBadgeSmall" src="http://flex.apache.org/installerbadge/index.html" + <iframe name="afSDKInstallBadgeSmall" src="https://flex.apache.org/installerbadge/index.html" frameborder="0" height="84" marginheight="0" marginwidth="0" scrolling="no" width="402"></iframe> diff --git a/content/mail b/content/mail deleted file mode 120000 index 7e58b6c..0000000 --- a/content/mail +++ /dev/null @@ -1 +0,0 @@ -/home/apmail/public-arch/flex.apache.org \ No newline at end of file diff --git a/lib/path.pm b/lib/path.pm deleted file mode 100644 index 1784f5d..0000000 --- a/lib/path.pm +++ /dev/null @@ -1,43 +0,0 @@ -package path; - -# taken from django's url.py - -our @patterns = ( - [qr!\.mdtext$!, single_narrative => { template => "single_narrative.html" }], - [qr!\.htm$!, html_page => { template => "no_template.html" }], - [qr!\.chtml$!, html_page => { template => "no_template.html" }], - [qr!\.cmsPage$!, html_page => { - header => "flex-v2-header.html", - template => "flex-v2-renderer.html", - footer => "flex-v2-footer.html" - }], -) ; - -# for specifying interdependencies between files - -our %dependencies = ( -# "/sitemap.html" => [ grep s!^content!!, glob "content/*.mdtext" ], -); - -1; - -=head1 LICENSE - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - - diff --git a/lib/view.pm b/lib/view.pm deleted file mode 100644 index 845f65b..0000000 --- a/lib/view.pm +++ /dev/null @@ -1,199 +0,0 @@ -package view; - -# BUILD CONSTRAINT: all views must return $content, $extension. -# additional return values (as seen below) are optional. However, -# careful use of svn externals and dependency management in path.pm can -# resolve most issues with this constraint. - -use strict; -use warnings; -use Dotiac::DTL qw/Template *TEMPLATE_DIRS/; -use Dotiac::DTL::Addon::markup; -use ASF::Util qw/read_text_file sort_tables/; - -push our @TEMPLATE_DIRS, "templates"; - -# This is most widely used view. It takes a -# 'template' argument and a 'path' argument. -# Assuming the path ends in foo.mdtext, any files -# like foo.page/bar.mdtext will be parsed and -# passed to the template in the "bar" (hash) -# variable. - -sub single_narrative { - my %args = @_; - my %styleargs = @_; - my $file = "content$args{path}"; - my $template = $args{template}; - $args{path} =~ s/\.mdtext$/\.html/; - $args{breadcrumbs} = breadcrumbs($args{path}); - - read_text_file $file, \%args; - - my $page_path = $file; - $page_path =~ s/\.[^.]+$/.page/; - if (-d $page_path) { - for my $f (grep -f, glob "$page_path/*.mdtext") { - $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; - $args{$1} = {}; - read_text_file $f, $args{$1}; - } - } - # default navbars and mdtext from templates folder. - my $templates_folder = "templates"; - if (-d $templates_folder) { - for my $f (grep -f, glob "$templates_folder/*.mdtext") { - $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; - $args{$1} = {}; - read_text_file $f, $args{$1}; - } - } - # folder specific overrides - $templates_folder = templatesfolder($args{path}); - $args{templates_folder} = $templates_folder; - if (-d $templates_folder) { - for my $f (grep -f, glob "$templates_folder/*.mdtext") { - $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; - $args{$1} = {}; - read_text_file $f, $args{$1}; - } - } - - $args{content} = sort_tables($args{content}); - - return Template($template)->render(\%args), html => \%args; -} - -# This view is used to wrap html. It takes a -# 'template' argument and a 'path' argument. -# Assuming the path ends in foo.html, any files -# like foo.page/bar.mdtext will be parsed and -# passed to the template in the "bar" (hash) -# variable. - -sub html_page { - my %args = @_; - my %styleargs = @_; - my $file = "content$args{path}"; - my $template = $args{template}; - $args{breadcrumbs} = breadcrumbs($args{path}); - - read_text_file $file, \%args; - - my $page_path = $file; - $page_path =~ s/\.[^.]+$/.page/; - if (-d $page_path) { - for my $f (grep -f, glob "$page_path/*.mdtext") { - $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; - $args{$1} = {}; - read_text_file $f, $args{$1}; - } - } - # default navbars and mdtext from templates folder. - my $templates_folder = "templates"; - if (-d $templates_folder) { - for my $f (grep -f, glob "$templates_folder/*.mdtext") { - $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; - $args{$1} = {}; - read_text_file $f, $args{$1}; - } - } - # folder specific overrides - $templates_folder = templatesfolder($args{path}); - $args{templates_folder} = $templates_folder; - if (-d $templates_folder) { - for my $f (grep -f, glob "$templates_folder/*.mdtext") { - $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n"; - $args{$1} = {}; - read_text_file $f, $args{$1}; - } - } - - if ($args{content} =~ m!<head.*?>(.*?)</head>(?:.*?<body(.*?)>)?(.*?)(?:</body>|\Z)!si) { - @args{qw/header bodytag content/} = ($1, $2, $3); - } - - return Template($template)->render(\%args), html => \%args; -} - -sub sitemap { - my %args = @_; - my $template = "content$args{path}"; - $args{breadcrumbs} .= breadcrumbs($args{path}); - my $dir = $template; - $dir =~ s!/[^/]+$!!; - opendir my $dh, $dir or die "Can't opendir $dir: $!\n"; - my %data; - for (map "$dir/$_", grep $_ ne "." && $_ ne ".." && $_ ne ".svn", readdir $dh) { - if (-f and /\.mdtext$/) { - my $file = $_; - $file =~ s/^content//; - no warnings 'once'; - for my $p (@path::patterns) { - my ($re, $method, $args) = @$p; - next unless $file =~ $re; - my $s = view->can($method) or die "Can't locate method: $method\n"; - my ($content, $ext, $vars) = $s->(path => $file, %$args); - $file =~ s/\.mdtext$/.$ext/; - $data{$file} = $vars; - last; - } - } - } - - my $content = ""; - - for (sort keys %data) { - $content .= "- [$data{$_}->{headers}->{title}]($_)\n"; - for my $hdr (grep /^#/, split "\n", $data{$_}->{content}) { - $hdr =~ /^(#+)\s+([^#]+)?\s+\1\s+\{#([^}]+)\}$/ or next; - my $level = length $1; - $level *= 4; - $content .= " " x $level; - $content .= "- [$2]($_#$3)\n"; - } - } - $args{content} = $content; - return Template($template)->render(\%args), html => \%args; -} - -sub breadcrumbs { - my @path = split m!/!, shift; - pop @path; - my @rv; - my $relpath = ""; - for (@path) { - $relpath .= "$_/"; - $_ ||= "home"; - push @rv, qq(<a href="$relpath">$_</a>); - } - return join " » ", @rv; -} - -sub templatesfolder { - my @path = split m!/!, shift; - my $relpath = "templates/"; - $relpath .= $path[1]; - return $relpath; -} - -1; - -=head1 LICENSE - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. diff --git a/migration/README.md b/migration/README.md new file mode 100644 index 0000000..d36030c --- /dev/null +++ b/migration/README.md @@ -0,0 +1,32 @@ +# CMS Migration + +1. Markdown conversions + + - Rename from cmsPage to md + - HTML blocks must be contiguous and blank lines will become code blocks + - Headings should not use trailing ## + - Fenced code blocks differ + + See [changes.txt](changes.txt) + +2. Theme Template + + CMS templates were converted into `base.html` + +3. Configuration + + See [pelicanconf.py](../pelicanconf.py) + +4. Pelican ASF plugin configuration + + [asfgenid.py](../theme/plugins/asfgenid.py) + + - 'unsafe_tags': True # allow style, script, and iframe tags + - 'metadata': False # no metadata replacement in markdown files + - 'elements': False # CMS didn't use mdx_elementid featuresz + - 'headings': True # Fix up headings w/ permalinks + - 'headings_re': r'^h[1-4]' + - 'permalinks': True, + - 'toc': False # does not use [TOC] + - 'toc_headers': r"h[1-4]", + - 'tables': True # Fix up for markdown table class diff --git a/migration/changes.txt b/migration/changes.txt new file mode 100644 index 0000000..aa79fee --- /dev/null +++ b/migration/changes.txt @@ -0,0 +1,1839 @@ +==== ./content/about-history.md +==== ./content/dev-faq.md +6a7 +> +12a14 +> +25a28 +> +35a39 +> +39a44 +> +43a49 +> +55a62 +> +65a73 +> +77a86 +> +86a96 +> +==== ./content/about-privacy.md +==== ./content/flexunit/tutorial/flexunit/Unit-5.md +416d415 +< +421d419 +< +427d424 +< +430d426 +< +435d430 +< +441d435 +< +447d440 +< +453d445 +< +456d447 +< +461d451 +< +467d456 +< +472d460 +< +475d462 +< +479d465 +< +483d468 +< +487d471 +< +490d473 +< +497d479 +< +501d482 +< +512d492 +< +517d496 +< +520d498 +< +526d503 +< +531d507 +< +534d509 +< +539d513 +< +542d515 +< +547d519 +< +550d521 +< +555d525 +< +558d527 +< +566d534 +< +579d546 +< +584d550 +< +606d571 +< +608d572 +< +612d575 +< +617d579 +< +624d585 +< +626d586 +< +629d588 +< +633d591 +< +638d595 +< +643d599 +< +651d606 +< +653d607 +< +656d609 +< +==== ./content/flexunit/tutorial/flexunit/Unit-1.md +7c7 +< ###Objectives:### +--- +> ### Objectives: +16c16 +< ###Topics### +--- +> ### Topics +27c27 +< ##Understanding why we test automatically## +--- +> ## Understanding why we test automatically +144d143 +< +147d145 +< +151d148 +< +153d149 +< +159d154 +< +162d156 +< +164d157 +< +168d160 +< +170d161 +< +176d166 +< +183d172 +< +==== ./content/flexunit/tutorial/flexunit/Unit-13.md +70d69 +< +72d70 +< +79d76 +< +84d80 +< +86d81 +< +90d84 +< +92d85 +< +102d94 +< +108d99 +< +111d101 +< +115d104 +< +122d110 +< +138d125 +< +146d132 +< +154d139 +< +157d141 +< +160d143 +< +164d146 +< +168d149 +< +172d152 +< +176d155 +< +181d159 +< +183d160 +< +187d163 +< +190d165 +< +195d169 +< +200d173 +< +204d176 +< +211d182 +< +215d185 +< +217d186 +< +222d190 +< +224d191 +< +235d201 +< +242d207 +< +249d213 +< +256d219 +< +261d223 +< +263d224 +< +270d230 +< +272d231 +< +274d232 +< +276d233 +< +288d244 +< +298d253 +< +306d260 +< +320d273 +< +375d327 +< +377d328 +< +381d331 +< +387d336 +< +392d340 +< +394d341 +< +399d345 +< +401d346 +< +405d349 +< +407d350 +< +412d354 +< +415d356 +< +419d359 +< +422d361 +< +432d370 +< +436d373 +< +445d381 +< +452d387 +< +458d392 +< +463d396 +< +467d399 +< +471d402 +< +473d403 +< +476d405 +< +483d411 +< +488d415 +< +491d417 +< +499d424 +< +503d427 +< +509d432 +< +513d435 +< +518d439 +< +521d441 +< +528d447 +< +533d451 +< +537d454 +< +542d458 +< +544d459 +< +548d462 +< +557d470 +< +562d474 +< +586d497 +< +600d510 +< +622d531 +< +628d536 +< +630d537 +< +650d556 +< +652d557 +< +659d563 +< +661d564 +< +665d567 +< +667d568 +< +676,677d576 +< } +< +682d580 +< +684d581 +< +688d584 +< +692d587 +< +697d591 +< +702d595 +< +704d596 +< +706d597 +< +712d602 +< +714d603 +< +720d608 +< +722d609 +< +728d614 +< +730d615 +< +734d618 +< +736d619 +< +741d623 +< +743d624 +< +748d628 +< +750d629 +< +752d630 +< +756d633 +< +764d640 +< +766d641 +< +769d643 +< +774d647 +< +777d649 +< +782d653 +< +786d656 +< +791d660 +< +793d661 +< +800d667 +< +810d676 +< +==== ./content/flexunit/tutorial/flexunit/Unit-12.md +66d65 +< +68d66 +< +73d70 +< +78d74 +< +81d76 +< +84d78 +< +89d82 +< +93d85 +< +97d88 +< +105d95 +< +110d99 +< +115d103 +< +117d104 +< +126d112 +< +128d113 +< +135d119 +< +141d124 +< +144d126 +< +146d127 +< +149d129 +< +==== ./content/flexunit/tutorial/flexunit/Unit-4.md +48d47 +< +66d64 +< +89d86 +< +141d137 +< +145d140 +< +149d143 +< +153d146 +< +157d149 +< +161d152 +< +165d155 +< +172d161 +< +177d165 +< +182d169 +< +187d173 +< +192d177 +< +197d181 +< +201d184 +< +207d189 +< +211d192 +< +218d198 +< +222d201 +< +228d206 +< +232d209 +< +237d213 +< +240d215 +< +245d219 +< +251d224 +< +255d227 +< +260d231 +< +263d233 +< +268d237 +< +274d242 +< +278d245 +< +283d249 +< +286d251 +< +292,294c257 +< <p>Re-Open the FlexUnit4Training.mxml file. Click the run button in the upper toolbar.</p> +< <p>If FlexUnit4Training.mxml ran successfully you should see the following output in your browser window:</p> +< +--- +> <p>Re-Open the FlexUnit4Training.mxml file. Click the run button in the upper toolbar.</p> <p>If FlexUnit4Training.mxml ran successfully you should see the following output in your browser window:</p> +296d258 +< +312d273 +< +343d303 +< +364d323 +< +390d348 +< +392d349 +< +396d352 +< +401d356 +< +405d359 +< +411d364 +< +415d367 +< +420d371 +< +424d374 +< +429d378 +< +434d382 +< +440d387 +< +452d398 +< +457d402 +< +462d406 +< +468d411 +< +476d418 +< +479d420 +< +483d423 +< +508d447 +< +510d448 +< +514d451 +< +518d454 +< +522d457 +< +530d464 +< +536d469 +< +542d474 +< +548d479 +< +554d484 +< +558d487 +< +563d491 +< +569d496 +< +574d500 +< +580d505 +< +585d509 +< +590d513 +< +599d521 +< +603d524 +< +607d527 +< +613d532 +< +617d535 +< +623d540 +< +632d548 +< +636d551 +< +640d554 +< +645d558 +< +649d561 +< +660d571 +< +663d573 +< +==== ./content/flexunit/tutorial/flexunit/Unit-16.md +94d93 +< +96d94 +< +101d98 +< +104d100 +< +108d103 +< +110d104 +< +116d109 +< +121d113 +< +125d116 +< +131d121 +< +261d250 +< +263d251 +< +271d258 +< +273d259 +< +276d261 +< +279d263 +< +281d264 +< +288d270 +< +290d271 +< +295d275 +< +298d277 +< +300d278 +< +302d279 +< +314d290 +< +316d291 +< +331d305 +< +342d315 +< +344d316 +< +349d320 +< +360d330 +< +362d331 +< +364d332 +< +366d333 +< +376d342 +< +392d357 +< +394d358 +< +400d363 +< +402d364 +< +==== ./content/flexunit/tutorial/flexunit/Unit-3.md +==== ./content/flexunit/tutorial/flexunit/Unit-11.md +58d57 +< +97d95 +< +122d119 +< +142d138 +< +147d142 +< +150d144 +< +163d156 +< +170d162 +< +174d165 +< +196d186 +< +198d187 +< +207d195 +< +211d198 +< +213d199 +< +217d202 +< +222d206 +< +228d211 +< +232d214 +< +235d216 +< +239d219 +< +243d222 +< +248d226 +< +254d231 +< +256d232 +< +274d249 +< +282d256 +< +302d275 +< +304d276 +< +312d283 +< +321d291 +< +323d292 +< +328d296 +< +330d297 +< +338d304 +< +347d312 +< +358d322 +< +369d332 +< +378d340 +< +387d348 +< +436d396 +< +438d397 +< +442d400 +< +445d402 +< +454d410 +< +462d417 +< +465d419 +< +==== ./content/flexunit/tutorial/flexunit/Unit-7.md +61d60 +< +63d61 +< +67d64 +< +73d69 +< +79d74 +< +84d78 +< +88d81 +< +98d90 +< +109d100 +< +112d102 +< +114d103 +< +123d111 +< +128d115 +< +131d117 +< +184d169 +< +186d170 +< +191d174 +< +197d179 +< +203d184 +< +207d187 +< +214d193 +< +233d211 +< +267d244 +< +==== ./content/flexunit/tutorial/flexunit/Unit-15.md +32d31 +< +36d34 +< +40d37 +< +50d46 +< +65d60 +< +69d63 +< +79d72 +< +92d84 +< +160d151 +< +162d152 +< +165d154 +< +168d156 +< +171d158 +< +177d163 +< +180d165 +< +187d171 +< +189d172 +< +193d175 +< +197d178 +< +201d181 +< +205d184 +< +210d188 +< +214d191 +< +216d192 +< +225d200 +< +231d205 +< +250d223 +< +252d224 +< +256d227 +< +259d229 +< +263d232 +< +274d242 +< +281d248 +< +294d260 +< +296d261 +< +300d264 +< +305d268 +< +312d274 +< +315d276 +< +317d277 +< +321d280 +< +323d281 +< +==== ./content/flexunit/tutorial/flexunit/Unit-6.md +92d91 +< +94d92 +< +98d95 +< +104d100 +< +108d103 +< +113d107 +< +118d111 +< +123d115 +< +127d118 +< +133d123 +< +135d124 +< +140d128 +< +142d129 +< +146d132 +< +150d135 +< +155d139 +< +160d143 +< +165d147 +< +170d151 +< +176d156 +< +180d159 +< +183d161 +< +187d164 +< +190d166 +< +194d169 +< +197d171 +< +201d174 +< +204d176 +< +208d179 +< +211d181 +< +215d184 +< +218d186 +< +222d189 +< +225d191 +< +231d196 +< +240d204 +< +292d255 +< +294d256 +< +298d259 +< +303d263 +< +307d266 +< +312d270 +< +314d271 +< +318d274 +< +324d279 +< +330d284 +< +334d287 +< +340d292 +< +347d298 +< +353d303 +< +359d308 +< +397d345 +< +==== ./content/flexunit/tutorial/flexunit/Unit-14.md +50d49 +< +52d50 +< +56d53 +< +58d54 +< +63d58 +< +67d61 +< +71d64 +< +75d67 +< +81d72 +< +86d76 +< +88d77 +< +94d82 +< +100d87 +< +104d90 +< +108d93 +< +112d96 +< +118d101 +< +122d104 +< +124d105 +< +134d114 +< +141d120 +< +145d123 +< +151d128 +< +165d141 +< +173d148 +< +181d155 +< +184d157 +< +256d228 +< +275d246 +< +277d247 +< +281d250 +< +283d251 +< +285d252 +< +289d255 +< +294d259 +< +297d261 +< +299d262 +< +301d263 +< +305d266 +< +309d269 +< +313d272 +< +317d275 +< +322d279 +< +326d282 +< +330d285 +< +332d286 +< +338d291 +< +342d294 +< +350d301 +< +354d304 +< +361d310 +< +366d314 +< +374d321 +< +377d323 +< +379d324 +< +383d327 +< +387d330 +< +394d336 +< +399d340 +< +401d341 +< +404d343 +< +408d346 +< +411d348 +< +418d354 +< +423d358 +< +428d362 +< +431d364 +< +438d370 +< +442d373 +< +448d378 +< +==== ./content/flexunit/tutorial/flexunit/Unit-2.md +119d118 +< +123d121 +< +127d124 +< +131d127 +< +135d130 +< +146d140 +< +162d155 +< +204d196 +< +207d198 +< +210d200 +< +215d204 +< +221d209 +< +223d210 +< +229d215 +< +234d219 +< +238d222 +< +241d224 +< +243d225 +< +246d227 +< +249d229 +< +253d232 +< +257d235 +< +260d237 +< +262d238 +< +264d239 +< +268d242 +< +273d246 +< +283d255 +< +289d260 +< +300d270 +< +303d272 +< +305d273 +< +==== ./content/flexunit/tutorial/flexunit/Unit-10.md +137d136 +< +139d137 +< +151d148 +< +156d152 +< +161d156 +< +165d159 +< +167d160 +< +172d164 +< +176d167 +< +180d170 +< +191d180 +< +194d182 +< +199d186 +< +203d189 +< +209d194 +< +214d198 +< +219d202 +< +221d203 +< +225d206 +< +234d214 +< +242d221 +< +245d223 +< +317d294 +< +321d297 +< +325d300 +< +327d301 +< +336d309 +< +339d311 +< +342d313 +< +344d314 +< +349d318 +< +351d319 +< +357d324 +< +359d325 +< +366d331 +< +369d333 +< +371d334 +< +373d335 +< +384d345 +< +387d347 +< +390d349 +< +393d351 +< +405d362 +< +443d399 +< +445d400 +< +450d404 +< +453d406 +< +455d407 +< +458d409 +< +462d412 +< +466d415 +< +470d418 +< +475d422 +< +481d427 +< +484d429 +< +486d430 +< +489d432 +< +495d437 +< +497d438 +< +502d442 +< +504d443 +< +506d444 +< +508d445 +< +510d446 +< +512d447 +< +520d454 +< +525d458 +< +530d462 +< +534d465 +< +541d471 +< +544d473 +< +563d491 +< +565d492 +< +576d502 +< +579d504 +< +584d508 +< +587d510 +< +589d511 +< +591d512 +< +595d515 +< +599d518 +< +603d521 +< +605d522 +< +609d525 +< +611d526 +< +615d529 +< +617d530 +< +621d533 +< +623d534 +< +628d538 +< +630d539 +< +634d542 +< +636d543 +< +641d547 +< +643d548 +< +647d551 +< +657d560 +< +664d566 +< +==== ./content/flexunit/tutorial/flexunit/Unit-9.md +39c39,40 +< <code><pre>public function RadiiDataHelper( url:String ) { +--- +> ``` +> public function RadiiDataHelper( url:String ) { +70c71,72 +< }</pre></code> +--- +> } +> ``` +110d111 +< +113d113 +< +115d114 +< +117d115 +< +122d119 +< +126d122 +< +128d123 +< +132d126 +< +136d129 +< +145d137 +< +151d142 +< +157d147 +< +160d149 +< +165d153 +< +171d158 +< +177d163 +< +183d168 +< +==== ./content/flexunit/tutorial/flexunit/Unit-8.md +130c130,131 +< <code><pre>[DataPoints] +--- +> ``` +> [DataPoints] +145c146,147 +< }</pre></code> +--- +> } +> ``` +172d173 +< +174d174 +< +176d175 +< +182d180 +< +187d184 +< +189d185 +< +193d188 +< +197d191 +< +201d194 +< +206d198 +< +211d202 +< +217d207 +< +222d211 +< +224d212 +< +228d215 +< +232d218 +< +236d221 +< +238d222 +< +242d225 +< +250d232 +< +259d240 +< +295d275 +< +297d276 +< +301d279 +< +303d280 +< +308d284 +< +311d286 +< +313d287 +< +315d288 +< +319d291 +< +326d297 +< +335d305 +< +338d307 +< +361c330,331 +< <code><pre>public class TestCase { +--- +> ``` +> public class TestCase { +379c349,350 +< }</pre></code> +--- +> } +> ``` +399d369 +< +408d377 +< +412d380 +< +416d383 +< +421d387 +< +425d390 +< +431d395 +< +435d398 +< +442d404 +< +446d407 +< +452d412 +< +455d414 +< +460d418 +< +467d424 +< +471d427 +< +480d435 +< +488d442 +< +491d444 +< +493d445 +< +497d448 +< +503d453 +< +505d454 +< +508d456 +< +516d463 +< +519d465 +< +522d467 +< +530d474 +< +536d479 +< +538d480 +< +541d482 +< +551d491 +< +554d493 +< +==== ./content/flexunit/tutorial/index.md +3c3 +< ###Welcome to the Apache FlexUnit Tutorial!### +--- +> ### Welcome to the Apache FlexUnit Tutorial! +19c19 +< ###Tutorial Units:### +--- +> ### Tutorial Units: +==== ./content/flexunit/asdoc/index.md +==== ./content/doc-videos.md +==== ./content/download-falconjx.md +11a12 +> +25a27 +> +==== ./content/download-flexunit.md +11a12 +> +25a27 +> +==== ./content/installer.md +==== ./content/download-utilities.md +==== ./content/download-squiggly.md +11a12 +> +25a27 +> +==== ./content/download-disclaimer.md +==== ./content/doc-getstarted.md +13a14 +> +18a20 +> +33a36 +> +46a50 +> +60a65 +> +66a72 +> +92a99 +> +==== ./content/community-mailinglists.md +7a8 +> +37a39 +> +==== ./content/track-installer.md +==== ./content/community-3rdparty.md +19a20 +> +24a26 +> +31a34 +> +37a41 +> +44a49 +> +50a56 +> +56a63 +> +62a70 +> +66a75 +> +71a81 +> +83a94 +> +88a100 +> +93a106 +> +98a112 +> +104a119 +> +110a126 +> +115a132 +> +121a139 +> +128a147 +> +134a154 +> +140a161 +> +144a166 +> +152a175 +> +159a183 +> +163a188 +> +170a196 +> +==== ./content/download-source.md +11a12 +> +21a23 +> +38a41 +> +==== ./content/download-blazeds.md +21a22 +> +==== ./content/download-flexjs.md +11a12 +> +==== ./content/download-binaries.md +11a12 +> +25a27 +> +==== ./content/download-archive.md +==== ./content/community-getinvolved.md +9a10 +> +18a20 +> +24a27 +> +31a35 +> +45a50 +> +==== ./content/download-tourdeflex.md +==== ./content/index.md +==== ./content/about-features.md +==== ./content/about-licensing.md +==== ./content/about-assets.md +==== ./content/dev-sourcecode.md +==== ./content/about-binaries.md +5a6 +> +8a10 +> +==== ./content/about-people.md +340d339 +< +344d342 +< +367d364 +< +371d367 +< +==== ./content/community-showcase.md +==== ./content/about-whatis.md +6a7 +> +9a11 +> +10a13 +> +11a15 +> +12a17 +> +13a19 +> +14a21 +> +15a23 +> +16a25 +> +17a27 +> +22d31 +< +29d37 +< +40,41c48 +< You can then either publish the SWF file as a stand-alone application to be presented by the Adobe Flash Player in the browser, OR you can compile it with Adobe AIR to make native applications +< on Windows, MacOSX, Android, iOS, or BlackBerry platforms. +--- +> You can then either publish the SWF file as a stand-alone application to be presented by the Adobe Flash Player in the browser, OR you can compile it with Adobe AIR to make native applications on Windows, MacOSX, Android, iOS, or BlackBerry platforms. +==== ./content/notFound.md +==== ./README.md +==== ./migration/README.md diff --git a/pelicanconf.py b/pelicanconf.py new file mode 100644 index 0000000..af6be92 --- /dev/null +++ b/pelicanconf.py @@ -0,0 +1,172 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +# vim: encoding=utf-8 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from __future__ import unicode_literals +from datetime import date + +# import os +# import sys + +PATH = 'content' + +TIMEZONE = 'UTC' + +DEFAULT_LANG = 'en' + +# Website specific settings +SITEURL = 'https://bval.apache.org' +SITEREPOSITORY = 'https://github.com/apache/bval-site/blob/main/content/' +CURRENTYEAR = date.today().year + +# ASF Data specification +ASF_DATA_YAML = "asfdata.yaml" + +# Save pages using full directory preservation +PAGE_PATHS = ['.'] + +# Template uses {{base}} +BASE = '/' + +# Path with no extension +PATH_METADATA = '(?P<path_no_ext>.*)\..*' + +# We are not slugifying any pages +ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = '{path_no_ext}.html' + +# If we wanted to have articles. +# SLUGIFY_SOURCE = 'basename' +# ARTICLE_SAVE_AS = '{slug}.html' + +# Disable these pages +ARCHIVES_SAVE_AS = '' +AUTHORS_SAVE_AS = '' +CATEGORIES_SAVE_AS = '' +INDEX_SAVE_AS = '' +TAGS_SAVE_AS = '' + +# We want to serve our static files mixed with content. +STATIC_PATHS = ['.'] + +# we want any html to be served as is +READERS = {'html': None} + +# We don't use articles, but we don't want pelican to think +# that content/ contains articles. +ARTICLE_PATHS = ['articles'] + +# ignore README.md files in the content tree and the interviews and include folders. +IGNORE_FILES = ['README.md'] + +# No translations +PAGE_TRANSLATION_ID = None + +# Enable ATOM feed and Disable other feeds +FEED_DOMAIN = SITEURL +FEED_ALL_ATOM = 'feeds/all.atom.xml' +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None + +# Theme +THEME = './theme/apache' + +# Uncomment this to put the build date on every page. +# DEFAULT_DATE = 'fs' + +# Pelican Plugins +# pelican-gfm is installed in the buildbot as part of build_pelican.py. It is an ASF Infra custom plugin. +# other plugins are discoverable and can be installed via pip by mentioning them in requirements.txt +# You can find plugins here: https://github.com/pelican-plugins +# Plugins that are custom for this site are found in PLUGIN_PATHS. +PLUGIN_PATHS = ['./theme/plugins'] +# PLUGINS = ['asfgenid', 'asfdata', 'pelican-gfm', 'asfreader'] +# We are using the default plugin - 'pelican-gfm' which is installed by the build +PLUGINS = ['asfgenid', 'pelican-gfm'] + +# Lifecycle and plugins: +# (1) Initialization: +# asfdata - populate a sitewide dictionary of ASF_DATA +# (2) Readers process content into metadata and html +# pelican-gfm (GFMReader) - reads GFM Markdown with metadata and generates html +# asfreader (ASFReader) - reads GFM Markdown with embedded ezt templates uses metadata enhanced +# by the sitewide dictionary to generate markdown with ezt and then generate html +# (3) HTML Content enhancement +# asfgenid - performs a series of enhancements to the HTML - see ASF_GENID +# (4) Site generation +# sitemap - produces a sitemap.xml + +# Configure the asfdata plugin +# ASF_DATA = { +# 'data': ASF_DATA_YAML, +# 'metadata': { +# 'site_url': SITEURL +# }, +# 'debug': False +# } + +# Configure the asfgenid plugin +ASF_GENID = { + 'unsafe_tags': True, + 'metadata': False, + 'elements': False, + 'headings': False, + 'headings_re': r'^h[1-4]', + 'permalinks': False, + 'toc': False, + 'toc_headers': r"h[1-4]", + 'tables': False, + 'debug': False +} + +# Sitemap Generator +# SITEMAP = { +# "exclude": ["tag/", "category/"], +# "format": "xml", +# "priorities": { +# "articles": 0.1, +# "indexes": 0.1, +# "pages": 0.8 +# }, +# "changefreqs": { +# "articles": "never", +# "indexes": "never", +# "pages": "monthly" +# } +# } + +# Markdown Configuration +# When using GFMReader or ASFReader then MARKDOWN configuration is meaningless to GFM +# MARKDOWN = { +# } + +# TOC Generator +# When using ASF_GENID TOC generation then this is unused. +# TOC_HEADERS = r"h[1-6]" + +# Unused links +LINKS = ( ) +SOCIAL = ( ) + +DEFAULT_PAGINATION = False + +# Uncomment following line if you want document-relative URLs when developing +# RELATIVE_URLS = True diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4b34fdf --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pelican +BeautifulSoup4 diff --git a/templates/flex-v2-footer.html b/templates/flex-v2-footer.html deleted file mode 100644 index d21c1ac..0000000 --- a/templates/flex-v2-footer.html +++ /dev/null @@ -1,76 +0,0 @@ -</div></div> -<!-- Wrapper / End --> - - -<!-- Footer --> - -<!-- Footer Top --> -<div id="footer" class="container-fluid paddingbottom" > - - - <div class="row-fluid"> - - <!-- About --> - <div class="span3"> - <div class="footer-headline"><h4>About Us</h4></div> - <p>Apache Flex® is a highly productive, open source application framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops and devices (including smartphones, tablets and tv). It provides a modern, standards-based language and programming model that supports common design patterns suitable for developers from many backgrounds. Flex applications can be deployed to the ubiquitous Adobe® Flash® Player in the browse [...] - </div> - - <!-- Subscribe --> - <div class="span3"> - <div class="footer-headline"><h4>Subscribe</h4></div> - <p>We have two mailing lists, one for SDK developers, and one for SDK users.</p> - <p>Developers, send an email to <br> - <a href="mailto:[email protected]">[email protected]</a> - </p> - <p>Users, send an email to <br> - <a href="mailto:[email protected]">[email protected]</a> - </p> - </div> - - <!-- Latest Releases --> - <div class="span3"> - <div class="footer-headline"><h4>Latest Releases</h4></div> - <p> - Apache Flex SDK : <a href="/download-binaries.html">4.16.0 (March 2017)</a><br /> - Apache FlexJS SDK : <a href="/download-flexjs.html">0.8.0 (June 2017)</a><br /> - Blaze DS : <a href="/download-blazeds.html">4.7.0 (Mar 2015)</a><br /> - Flex Mavenizer : <a href="http://svn.apache.org/viewvc/flex/utilities/trunk/mavenizer/"> 4.8.0 (Jan 2013)</a><br /> - FlexUnit : <a href="/download-flexunit.html">4.2.0 (Apr 2014)</a><br /> - SDK Installer : <a href="/installer.html">3.2.0 (June 2015)</a><br /> - Squiggly : <a href="/download-squiggly.html">1.1 (Oct 2014)</a><br /> - Tour De Flex : <a href="/download-tourdeflex.html">1.2 (Nov 2014)</a><br /> - </p> - </div> - - <!-- Latest Tweets --> - <div class="span3"> - <div class="footer-headline"><h4>Latest Tweets</h4></div> - <a class="twitter-timeline" href="https://twitter.com/ApacheFlex" data-chrome="noheader nofooter noborders noscrollbar" data-widget-id="364567612920852480">Tweets by Apache Flex</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - <div class="clear"></div> - </div> - - </div> - -</div> -<!-- Footer / Bottom --> -<div id="footer" class="container-fluid" style="background: #111;"> - <div class="row-fluid"> - <div class="span12"> - <div id="footer-bottom"> - Copyright © 2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 <br> - Apache Flex, Apache and the Apache feather logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. - Read more about our privacy policy on our <a href="about-privacy.html">Privacy Policy</a> page. - <div id="scroll-top-top"><a href="#" title="Go to Top"></a></div> - </div> - </div> - </div> - -</div> - -<!-- Footer / End --> - -</body> - -</html> \ No newline at end of file diff --git a/templates/flex-v2-header.html b/templates/flex-v2-header.html deleted file mode 100644 index 58dd413..0000000 --- a/templates/flex-v2-header.html +++ /dev/null @@ -1,193 +0,0 @@ -<!DOCTYPE html> -<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> -<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> -<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]--> - -<head> - - <meta charset="utf-8"> - <title>Apache Flex®{% block title %}{% if headers.title %} - {{ headers.title }}{% endif %}{% endblock %}</title> - - <!-- For Mobiles --> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> - <link href='https://fonts.googleapis.com/css?family=Carrois+Gothic' rel='stylesheet' type='text/css'> - <!-- CSS --> - <link rel="stylesheet" type="text/css" href="/css/bootstrap.css"> - <link rel="stylesheet" type="text/css" href="/css/fixed-width.css" id="layout"> - <link rel="stylesheet" type="text/css" href="/css/style.css"> - <!-- favicon --> - <link rel="icon" type="image/x-icon" href="/images/favicon.ico"/> - <link rel="apple-touch-icon-precomposed" href="/images/apple-touch-icon-60.png"> - <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/images/apple-touch-icon-76.png"> - <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/images/apple-touch-icon-120.png"> - <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/images/apple-touch-icon-152.png"> - - <!-- Java Script --> - <script src="/js/jquery.js"></script> - <script src="/js/custom.js"></script> - <script src="/js/selectnav.js"></script> - <script src="/js/flexslider.js"></script> - <script src="/js/twitter.js"></script> - <script src="/js/fancybox.js"></script> - <script src="/js/isotope.js"></script> - <script src="/js/bootstrap.js"></script> - <script src="/js/showcase.js"></script> - - <!-- Google Analytics --> - <script type="text/javascript"> - - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-37926454-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - - </script> - - -</head> -<body> - -<!-- Wrapper Start --> -<div id="wrapper" class="container-fluid"> - - - <!-- Header --> - - - <div class="ie-dropdown-fix" > - - <!-- Header --> - <div class="row-fluid" id="header"> - - <!-- Logo --> - <div class="span5"> - - <a href="#"><img src="/images/logo_01_fullcolor-sm.png" alt="Apache Flex®" title="Apache Flex®" /></a> - - </div> - - <!-- Social / Contact --> - <div class="span3 pull-right"> - - <!-- Social Icons --> - <ul class="social-icons"> - <li class="facebook"><a href="https://www.facebook.com/pages/Apache-Flex/174249699342648">Facebook</a></li> - <li class="twitter"><a href="http://twitter.com/ApacheFlex">Twitter</a></li> - <li class="linkedin"><a href="http://www.linkedin.com/groups/Apache-Flex-Developers-4296888">LinkedIn</a></li> - </ul> - - <!-- Apache Logo --> - <a href="http://www.apache.org" id="contact-top"><img src="http://www.apache.org/images/feather-small.gif" title="An Apache Project" alt="An Apache Project" /> </a> - </div> - - </div> - <!-- Header / End --> - - <!-- Navigation --> - <div id="navigation" class="margintop"> - <ul id="nav"> - - <li><a href="/index.html">Home</a></li> - - <li><a href="#">About Flex</a> - <ul> - - <li><a href="/about-whatis.html">What is Flex?</a></li> - <li><a href="/about-features.html">Features</a></li> - <li><a href="/tourdeflex/explorer.html">Tour de Flex</a></li> - <li><a href="/about-licensing.html">License & Trademarks</a></li> - <li><a href="/about-people.html">The Team</a></li> - <li><a href="/about-history.html">Project History</a></li> - <li><a href="/about-assets.html">Logo and Assets</a></li> - </ul> - </li> - <li><a href="#">Community</a> - <ul> - - <li><a href="/community-getinvolved.html">How to get involved</a></li> - <li><a href="/community-mailinglists.html">Mailing Lists</a></li> - <li><a href="/community-showcase.html">Flex Showcase</a></li> - <li><a href="/community-3rdparty.html">Third-Party</a></li> - <li><a href="https://cwiki.apache.org/confluence/display/FLEX/Apache+Flex+Wiki">Wiki <i class="icon-share icon-white"></i></a></li> - <li><a href="http://blogs.apache.org/flex/">Blog <i class="icon-share icon-white"></i></a></li> - </ul> - </li> - - <li><a href="#">Development</a> - <ul> - <li><a href="/dev-faq.html">Developer FAQ</a></li> - <li><a href="/dev-sourcecode.html">Source Code</a></li> - <li><a href="https://issues.apache.org/jira/browse/FLEX">Bug-Tracker <i class="icon-share icon-white"></i></a></li> - </ul> - </li> - - <li><a href="#">Documentation</a> - <ul> - - <li><a href="/doc-getstarted.html">Getting Started</a></li> - <li><a href="/doc-videos.html">Videos</a></li> - <li><a href="/asdoc/">Flex ASDocs</a></li> - <li><a href="http://apacheflexbuild.cloudapp.net:8080/job/FlexJS_ASDoc_Example/lastSuccessfulBuild/artifact/examples/flexjs/ASDoc/bin/js-debug/index.html">FlexJS ASDocs</a></li> - <li><a href="http://help.adobe.com/en_US/flex/using/index.html">Documentation Reference (Old) <i class="icon-share icon-white"></i></a></li> - <li><a href="/flexunit/tutorial/">FlexUnit Tutorials</a></li> - <li><a href="/flexunit/asdoc/">FlexUnit ASDocs</a></li> - - </ul> - </li> - - <li><a href="#">About Apache</a> - <ul> - - <li><a href="http://www.apache.org">The Apache Software Foundation Website <i class="icon-share icon-white"></i></a></li> - <li><a href="http://www.apache.org/foundation/contributing.html">Donations <i class="icon-share icon-white"></i></a></li> - <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship <i class="icon-share icon-white"></i></a></li> - <li><a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share icon-white"></i></a></li> - </ul> - </li> - - <li><a href="#" class="download">Download Flex</a> - <ul> - - <li><a href="/installer.html">SDK Installer (For Application Developers)</a></li> - <li><a href="/download-source.html">SDK Source Code (For SDK Developers)</a></li> - <li><a href="/download-binaries.html">SDK Binaries (For SDK Developers)</a></li> - <li><a href="/download-flexjs.html">FlexJS 'beta' (For Application Developers)</a> </li> - <li><a href="/download-flexunit.html">FlexUnit (For Application Developers)</a> </li> - <li><a href="/download-blazeds.html">Blaze DS Source Code</a></li> - <li><a href="/download-tourdeflex.html">Tour De Flex Source Code</a></li> - <li><a href="/download-squiggly.html">Squiggly Spell Checker</a></li> - <li><a href="/download-utilities.html">Flex Utilities</a></li> - <li><a href="/download-archive.html">Previous Versions</a></li>` - </ul> - </li> - </ul> - - </div> - <div class="clear"></div> - - </div> - <!-- Navigation / End --> - - - <!-- Content --> - - {% block title %}{% if headers.title %} - <div class="row-fluid"> - - - <!-- Page Title --> - <div id="page-title"> - <h2>{{ headers.title }}</h2> - </div> - <!-- Page Title / End --> - - - </div> - {% endif %}{% endblock %} - - <div class="row-fluid"> \ No newline at end of file diff --git a/templates/flex-v2-hometemplate-bottom.mdtext b/templates/flex-v2-hometemplate-bottom.mdtext deleted file mode 100644 index 7fd38f1..0000000 --- a/templates/flex-v2-hometemplate-bottom.mdtext +++ /dev/null @@ -1,21 +0,0 @@ -<!-- Clients Start --> -<div class="row-fluid"> - <div class="span12"> - - <!-- Who is using Flex section disabled until we get more releases. - <div class="headline margintop marginbottom"><h4>Who is using Flex?</h4></div> - - <ul class="thumbnails"> - <li class="span2"><div class="thumbnail"><img src="images/companyLogos/avaya_logo.jpg" class="client-logo" alt="Avaya"/></div></li> - <li class="span2"><div class="thumbnail"><img src="images/companyLogos/extreme_logo.png" class="client-logo" alt="Extreme Networks"/></div></li> - <li class="span2"><div class="thumbnail"><img src="" class="client-logo" alt=""/></div></li> - <li class="span2"><div class="thumbnail"><img src="images/companyLogos/Michigan_State_University_logo.png" class="client-logo" alt="Michigan State University"/></div></li> - <li class="span2"><div class="thumbnail"><img src="images/companyLogos/StackAndHeap.gif" class="client-logo" alt="Stack and Heap"/></div></li> - <li class="span2"><div class="thumbnail"><img src="images/companyLogos/systar-logo-300x70.png" class="client-logo" alt="Systar"/></div></li> - - </ul> - --> - - </div> -</div> - <!-- Clients End --> diff --git a/templates/flex-v2-hometemplate-top.mdtext b/templates/flex-v2-hometemplate-top.mdtext deleted file mode 100644 index e08d673..0000000 --- a/templates/flex-v2-hometemplate-top.mdtext +++ /dev/null @@ -1,69 +0,0 @@ -</div> - - <!-- Flex Slider --> - -<section class="slider"> - <div class="flexslider home"> - <ul class="slides"> - - <li><img src="images/slider4.jpg" alt="One Codebase, Multiple Devices" /></li> - <li><img src="images/slider1.jpg" alt="" /></li> - <li><img src="images/slider2.jpg" alt="" /></li> - <li><img src="images/slider3.jpg" alt="" /></li> - - </ul> - </div> -</section> - - <!-- Flex Slider / End --> - - <!-- Features Start --> -<div class="row-fluid"> -<div class="headline margintop marginbottom"><h4>The open-source framework for building expressive web and mobile applications</h4></div> -</div> -<div class="row-fluid"> - -<div class="span3" > - <div class="featuresbox" > - <div class="feature-image"><img src="images/support-icon.png"></div> - <h4>Licensing</h4> - <p>Apache Flex® is completely open-source. Apache Flex® is an Apache project, and is released under the Apache License, version 2.0, so you know it is compatible with your business needs. Plus, it is backed by the Apache Community for updates, support and help.</p> - <a href="about-licensing.html" class="btn">Read More</a> - </div> - -</div> - -<div class="span3" > - <div class="featuresbox" > - <div class="feature-image-wide"><img src="images/desktop-mobile-icon.png"></div> - <h4>Desktop & Mobile Apps</h4> - <p>Build applications that target all browsers by leveraging the Adobe Flash Player and JavaScript, make desktop application by leveraging the Adobe Integrated Runtime (Adobe AIR) - or create powerful, cross-platform mobile applications that target Apple iPods, iPhones, iPads, Android based smartphones and tablets, and Blackberry Playbook devices.</p> - <a href="about-features.html" class="btn">Read More</a> - </div> - -</div> - -<div class="span3" > - <div class="featuresbox"> - <div class="feature-image"><img src="images/showcase-icon.png"></div> - <h4>Flex Showcase</h4> - <p>A selection of the many desktop and mobile applications written with Flex.</p> - <p>Proud of your Flex application? You can easily submit a request to have it shown here.</p> - <a href="community-showcase.html" class="btn">Read More</a> - </div> - -</div> -<div class="span3" > - <div class="featuresbox"> - <div class="feature-image"><img src="images/tools-icon.png"></div> - <h4>Tooling</h4> - <p>Utilize the tools you are already familar with. Apache Flex® utilizes MXML for layout and AS3 (an ECMAScript based language like JavaScript) for coding. Use the Eclipse-based IDEs like Adobe Flash Builder and FDT or use IntelliJ IDEA or any text editor to make your applications.</p> - <a href="about-features.html" class="btn">Read More</a> - </div> - -</div> - -</div> - - <!-- Features #nd --> \ No newline at end of file diff --git a/templates/flex-v2-renderer.html b/templates/flex-v2-renderer.html deleted file mode 100644 index 6eacb0d..0000000 --- a/templates/flex-v2-renderer.html +++ /dev/null @@ -1,19 +0,0 @@ -{% include header %} - -{% block pagetypes %} - -<!-- Home Page Exception --> -{% if headers.homepage %} -{% autoescape off %}{{ flex-v2-hometemplate-top }}{% endautoescape %} -{% endif %} - -{% block content %}{{ content|markdown }}{% endblock %} - -<!-- Home Page Exception --> -{% if headers.homepage %} -{% autoescape off %}{{ flex-v2-hometemplate-bottom }}{% endautoescape %} -{% endif %} - -{% endblock %} - -{% include footer %} \ No newline at end of file diff --git a/templates/html_page.html b/templates/html_page.html deleted file mode 100644 index 40148eb..0000000 --- a/templates/html_page.html +++ /dev/null @@ -1,3 +0,0 @@ -{% extends "skeleton.html" %} - {% block content %}{% autoescape off %}{{ content }}{% endautoescape %}{% endblock %} -{$ endextends $} diff --git a/templates/leftnav.mdtext b/templates/leftnav.mdtext deleted file mode 100644 index 752b899..0000000 --- a/templates/leftnav.mdtext +++ /dev/null @@ -1,36 +0,0 @@ -# General - - - [About](/index.html) - - [License](/license.html) - - [Trademarks](/trademarks.html) - - [News Archive](/news.html) - -# Distribution - - [Download the SDK](/download.html) - - [Download the Installer](/installer.html) - - [About Binaries](/about-binaries.html) - -# Community - - - [Get Involved](/get-involved.html) - - [Team](/team.html) - - [Blog](http://blogs.apache.org/flex) - - [Project Wiki](https://cwiki.apache.org/confluence/display/FLEX/Apache+Flex+Wiki) - - [Mailing Lists](/mailing-lists.html) - - [Logo and Assets](/logoassets.html) - - [Utilities](/utilities.html) - - [Timeline](/timeline.html) - -# Development - - - [Source Code](/source.html) - - [Jira](https://issues.apache.org/jira/browse/FLEX) - - [Developer FAQs](/developer-faqs.html) - -# The Apache Software Foundation - - - [Website](http://www.apache.org/) - - [Donations](http://www.apache.org/foundation/contributing.html) - - [Sponsorship](http://www.apache.org/foundation/sponsorship.html) - - [Thanks](http://www.apache.org/foundation/thanks.html) - \ No newline at end of file diff --git a/templates/no_template.html b/templates/no_template.html deleted file mode 100644 index 46cccd0..0000000 --- a/templates/no_template.html +++ /dev/null @@ -1 +0,0 @@ -{% block content %}{{ content|markdown }}{% endblock %} \ No newline at end of file diff --git a/templates/single_narrative.html b/templates/single_narrative.html deleted file mode 100644 index 19d6b98..0000000 --- a/templates/single_narrative.html +++ /dev/null @@ -1 +0,0 @@ -{% extends "skeleton.html" %} diff --git a/templates/skeleton.html b/templates/skeleton.html deleted file mode 100644 index 392a3f9..0000000 --- a/templates/skeleton.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<link href="/css/flex.css" rel="stylesheet" type="text/css"> -{% if header %} -{% autoescape off %}{{ header }}{% endautoescape %}{% else %} -<title>{% block title %}{{ headers.title }}{% endblock %}</title> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -{% endif %} -</head> - -<body> - <div id="bannera"> - <div id="bannerleft"><img id="flex-logo" alt="Apache Flex" src="/images/flex.png"/></div> - <div id="bannerright"> - <a title="An Apache Project" href="http://www.apache.org"><img id="asf-logo" alt="An Apache Project" src="http://apache.org/images/feather-small.gif"/></a> - </div> - <div id="bannercenter"> </div> - </div> - <div id="topbara"> - {% if topnav.content %}<div id="topnava">{% block topnav %}{{ topnav.content|markdown }}{% endblock %}</div>{% endif %} - <div id="breadcrumbsa">{% block breaddcrumbs %}{% autoescape off %}{{ breadcrumbs }}{% endautoescape %}{% endblock %}</div> - </div> - <div id="clear"></div> - {% if leftnav.content %}<div id="leftnav">{% block leftnav %}{{ leftnav.content|markdown }}{% endblock %}</div>{% endif %} - {% if rightnav.content %}<div id="rightnav">{% block rightnav %}{{ rightnav.content|markdown }}{% endblock %}</div>{% endif %} - <div id="content"> - {% block title %}{% if headers.title %}<h1 class="title">{{ headers.title }}</h1>{% endif %}{% endblock %} - {% block content %}{{ content|markdown }}{% endblock %} - </div> - - <div id="footera"> - <div id="copyrighta"> - <p>Copyright © 2012 The Apache Software Foundation, Licensed under the - <a href="/license.html">Apache License, Version 2.0</a> - <br />Apache Flex, Apache and the Apache feather logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. - </p> - </div> - </div> - -</body> -</html> diff --git a/theme/apache/templates/base.html b/theme/apache/templates/base.html new file mode 100644 index 0000000..95877a4 --- /dev/null +++ b/theme/apache/templates/base.html @@ -0,0 +1,368 @@ +<!DOCTYPE html> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]--> + +<head> + + <meta charset="utf-8"> + <title>Apache Flex® - {{ page.title }}</title> + + <!-- For Mobiles --> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link href='https://fonts.googleapis.com/css?family=Carrois+Gothic' rel='stylesheet' type='text/css'> + <!-- CSS --> + <link rel="stylesheet" type="text/css" href="/css/bootstrap.css"> + <link rel="stylesheet" type="text/css" href="/css/fixed-width.css" id="layout"> + <link rel="stylesheet" type="text/css" href="/css/style.css"> + <!-- favicon --> + <link rel="icon" type="image/x-icon" href="/images/favicon.ico"/> + <link rel="apple-touch-icon-precomposed" href="/images/apple-touch-icon-60.png"> + <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/images/apple-touch-icon-76.png"> + <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/images/apple-touch-icon-120.png"> + <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/images/apple-touch-icon-152.png"> + + <!-- Java Script --> + <script src="/js/jquery.js"></script> + <script src="/js/custom.js"></script> + <script src="/js/selectnav.js"></script> + <script src="/js/flexslider.js"></script> + <script src="/js/twitter.js"></script> + <script src="/js/fancybox.js"></script> + <script src="/js/isotope.js"></script> + <script src="/js/bootstrap.js"></script> + <script src="/js/showcase.js"></script> + + <!-- Google Analytics --> + <script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-37926454-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + </script> + + +</head> +<body> + +<!-- Wrapper Start --> +<div id="wrapper" class="container-fluid"> + + + <!-- Header --> + + + <div class="ie-dropdown-fix" > + + <!-- Header --> + <div class="row-fluid" id="header"> + + <!-- Logo --> + <div class="span5"> + + <a href="#"><img src="/images/logo_01_fullcolor-sm.png" alt="Apache Flex®" title="Apache Flex®" /></a> + + </div> + + <!-- Social / Contact --> + <div class="span3 pull-right"> + + <!-- Social Icons --> + <ul class="social-icons"> + <li class="facebook"><a href="https://www.facebook.com/pages/Apache-Flex/174249699342648">Facebook</a></li> + <li class="twitter"><a href="http://twitter.com/ApacheFlex">Twitter</a></li> + <li class="linkedin"><a href="http://www.linkedin.com/groups/Apache-Flex-Developers-4296888">LinkedIn</a></li> + </ul> + + <!-- Apache Logo --> + <a href="http://www.apache.org" id="contact-top"><img src="http://www.apache.org/images/feather-small.gif" title="An Apache Project" alt="An Apache Project" /> </a> + </div> + + </div> + <!-- Header / End --> + + <!-- Navigation --> + <div id="navigation" class="margintop"> + <ul id="nav"> + + <li><a href="/index.html">Home</a></li> + + <li><a href="#">About Flex</a> + <ul> + + <li><a href="/about-whatis.html">What is Flex?</a></li> + <li><a href="/about-features.html">Features</a></li> + <li><a href="/tourdeflex/explorer.html">Tour de Flex</a></li> + <li><a href="/about-licensing.html">License & Trademarks</a></li> + <li><a href="/about-people.html">The Team</a></li> + <li><a href="/about-history.html">Project History</a></li> + <li><a href="/about-assets.html">Logo and Assets</a></li> + </ul> + </li> + <li><a href="#">Community</a> + <ul> + + <li><a href="/community-getinvolved.html">How to get involved</a></li> + <li><a href="/community-mailinglists.html">Mailing Lists</a></li> + <li><a href="/community-showcase.html">Flex Showcase</a></li> + <li><a href="/community-3rdparty.html">Third-Party</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/FLEX/Apache+Flex+Wiki">Wiki <i class="icon-share icon-white"></i></a></li> + <li><a href="http://blogs.apache.org/flex/">Blog <i class="icon-share icon-white"></i></a></li> + </ul> + </li> + + <li><a href="#">Development</a> + <ul> + <li><a href="/dev-faq.html">Developer FAQ</a></li> + <li><a href="/dev-sourcecode.html">Source Code</a></li> + <li><a href="https://issues.apache.org/jira/browse/FLEX">Bug-Tracker <i class="icon-share icon-white"></i></a></li> + </ul> + </li> + + <li><a href="#">Documentation</a> + <ul> + + <li><a href="/doc-getstarted.html">Getting Started</a></li> + <li><a href="/doc-videos.html">Videos</a></li> + <li><a href="/asdoc/">Flex ASDocs</a></li> + <li><a href="http://apacheflexbuild.cloudapp.net:8080/job/FlexJS_ASDoc_Example/lastSuccessfulBuild/artifact/examples/flexjs/ASDoc/bin/js-debug/index.html">FlexJS ASDocs</a></li> + <li><a href="http://help.adobe.com/en_US/flex/using/index.html">Documentation Reference (Old) <i class="icon-share icon-white"></i></a></li> + <li><a href="/flexunit/tutorial/">FlexUnit Tutorials</a></li> + <li><a href="/flexunit/asdoc/">FlexUnit ASDocs</a></li> + + </ul> + </li> + + <li><a href="#">About Apache</a> + <ul> + + <li><a href="http://www.apache.org">The Apache Software Foundation Website <i class="icon-share icon-white"></i></a></li> + <li><a href="http://www.apache.org/foundation/contributing.html">Donations <i class="icon-share icon-white"></i></a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship <i class="icon-share icon-white"></i></a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share icon-white"></i></a></li> + </ul> + </li> + + <li><a href="#" class="download">Download Flex</a> + <ul> + + <li><a href="/installer.html">SDK Installer (For Application Developers)</a></li> + <li><a href="/download-source.html">SDK Source Code (For SDK Developers)</a></li> + <li><a href="/download-binaries.html">SDK Binaries (For SDK Developers)</a></li> + <li><a href="/download-flexjs.html">FlexJS 'beta' (For Application Developers)</a> </li> + <li><a href="/download-flexunit.html">FlexUnit (For Application Developers)</a> </li> + <li><a href="/download-blazeds.html">Blaze DS Source Code</a></li> + <li><a href="/download-tourdeflex.html">Tour De Flex Source Code</a></li> + <li><a href="/download-squiggly.html">Squiggly Spell Checker</a></li> + <li><a href="/download-utilities.html">Flex Utilities</a></li> + <li><a href="/download-archive.html">Previous Versions</a></li>` + </ul> + </li> + </ul> + + </div> + <div class="clear"></div> + + </div> + <!-- Navigation / End --> + + + <!-- Content --> + + <div class="row-fluid"> + + + <!-- Page Title --> + <div id="page-title"> + <h2>{{ page.title }}</h2> + </div> + <!-- Page Title / End --> + + + </div> + + <div class="row-fluid"> + +<!-- Home Page Exception --> +{% if page.homepage %} +</div> + + <!-- Flex Slider --> + +<section class="slider"> + <div class="flexslider home"> + <ul class="slides"> + + <li><img src="images/slider4.jpg" alt="One Codebase, Multiple Devices" /></li> + <li><img src="images/slider1.jpg" alt="" /></li> + <li><img src="images/slider2.jpg" alt="" /></li> + <li><img src="images/slider3.jpg" alt="" /></li> + + </ul> + </div> +</section> + + <!-- Flex Slider / End --> + + <!-- Features Start --> +<div class="row-fluid"> +<div class="headline margintop marginbottom"><h4>The open-source framework for building expressive web and mobile applications</h4></div> +</div> +<div class="row-fluid"> + +<div class="span3" > + <div class="featuresbox" > + <div class="feature-image"><img src="images/support-icon.png"></div> + <h4>Licensing</h4> + <p>Apache Flex® is completely open-source. Apache Flex® is an Apache project, and is released under the Apache License, version 2.0, so you know it is compatible with your business needs. Plus, it is backed by the Apache Community for updates, support and help.</p> + <a href="about-licensing.html" class="btn">Read More</a> + </div> + +</div> + +<div class="span3" > + <div class="featuresbox" > + <div class="feature-image-wide"><img src="images/desktop-mobile-icon.png"></div> + <h4>Desktop & Mobile Apps</h4> + <p>Build applications that target all browsers by leveraging the Adobe Flash Player and JavaScript, make desktop application by leveraging the Adobe Integrated Runtime (Adobe AIR) + or create powerful, cross-platform mobile applications that target Apple iPods, iPhones, iPads, Android based smartphones and tablets, and Blackberry Playbook devices.</p> + <a href="about-features.html" class="btn">Read More</a> + </div> + +</div> + +<div class="span3" > + <div class="featuresbox"> + <div class="feature-image"><img src="images/showcase-icon.png"></div> + <h4>Flex Showcase</h4> + <p>A selection of the many desktop and mobile applications written with Flex.</p> + <p>Proud of your Flex application? You can easily submit a request to have it shown here.</p> + <a href="community-showcase.html" class="btn">Read More</a> + </div> + +</div> +<div class="span3" > + <div class="featuresbox"> + <div class="feature-image"><img src="images/tools-icon.png"></div> + <h4>Tooling</h4> + <p>Utilize the tools you are already familar with. Apache Flex® utilizes MXML for layout and AS3 (an ECMAScript based language like JavaScript) for coding. Use the Eclipse-based IDEs like Adobe Flash Builder and FDT or use IntelliJ IDEA or any text editor to make your applications.</p> + <a href="about-features.html" class="btn">Read More</a> + </div> + +</div> + +</div> + + <!-- Features #nd --> +{% endif %} + +{% block content %}{% endblock %} + +<!-- Home Page Exception --> +{% if page.homepage %} +<!-- Clients Start --> +<div class="row-fluid"> + <div class="span12"> + + <!-- Who is using Flex section disabled until we get more releases. + <div class="headline margintop marginbottom"><h4>Who is using Flex?</h4></div> + + <ul class="thumbnails"> + <li class="span2"><div class="thumbnail"><img src="images/companyLogos/avaya_logo.jpg" class="client-logo" alt="Avaya"/></div></li> + <li class="span2"><div class="thumbnail"><img src="images/companyLogos/extreme_logo.png" class="client-logo" alt="Extreme Networks"/></div></li> + <li class="span2"><div class="thumbnail"><img src="" class="client-logo" alt=""/></div></li> + <li class="span2"><div class="thumbnail"><img src="images/companyLogos/Michigan_State_University_logo.png" class="client-logo" alt="Michigan State University"/></div></li> + <li class="span2"><div class="thumbnail"><img src="images/companyLogos/StackAndHeap.gif" class="client-logo" alt="Stack and Heap"/></div></li> + <li class="span2"><div class="thumbnail"><img src="images/companyLogos/systar-logo-300x70.png" class="client-logo" alt="Systar"/></div></li> + + </ul> + --> + + </div> +</div> + <!-- Clients End --> +{% endif %} + +</div></div> +<!-- Wrapper / End --> + + +<!-- Footer --> + +<!-- Footer Top --> +<div id="footer" class="container-fluid paddingbottom" > + + + <div class="row-fluid"> + + <!-- About --> + <div class="span3"> + <div class="footer-headline"><h4>About Us</h4></div> + <p>Apache Flex® is a highly productive, open source application framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops and devices (including smartphones, tablets and tv). It provides a modern, standards-based language and programming model that supports common design patterns suitable for developers from many backgrounds. Flex applications can be deployed to the ubiquitous Adobe® Flash® Player in the browse [...] + </div> + + <!-- Subscribe --> + <div class="span3"> + <div class="footer-headline"><h4>Subscribe</h4></div> + <p>We have two mailing lists, one for SDK developers, and one for SDK users.</p> + <p>Developers, send an email to <br> + <a href="mailto:[email protected]">[email protected]</a> + </p> + <p>Users, send an email to <br> + <a href="mailto:[email protected]">[email protected]</a> + </p> + </div> + + <!-- Latest Releases --> + <div class="span3"> + <div class="footer-headline"><h4>Latest Releases</h4></div> + <p> + Apache Flex SDK : <a href="/download-binaries.html">4.16.0 (March 2017)</a><br /> + Apache FlexJS SDK : <a href="/download-flexjs.html">0.8.0 (June 2017)</a><br /> + Blaze DS : <a href="/download-blazeds.html">4.7.0 (Mar 2015)</a><br /> + Flex Mavenizer : <a href="http://svn.apache.org/viewvc/flex/utilities/trunk/mavenizer/"> 4.8.0 (Jan 2013)</a><br /> + FlexUnit : <a href="/download-flexunit.html">4.2.0 (Apr 2014)</a><br /> + SDK Installer : <a href="/installer.html">3.2.0 (June 2015)</a><br /> + Squiggly : <a href="/download-squiggly.html">1.1 (Oct 2014)</a><br /> + Tour De Flex : <a href="/download-tourdeflex.html">1.2 (Nov 2014)</a><br /> + </p> + </div> + + <!-- Latest Tweets --> + <div class="span3"> + <div class="footer-headline"><h4>Latest Tweets</h4></div> + <a class="twitter-timeline" href="https://twitter.com/ApacheFlex" data-chrome="noheader nofooter noborders noscrollbar" data-widget-id="364567612920852480">Tweets by Apache Flex</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + <div class="clear"></div> + </div> + + </div> + +</div> +<!-- Footer / Bottom --> +<div id="footer" class="container-fluid" style="background: #111;"> + <div class="row-fluid"> + <div class="span12"> + <div id="footer-bottom"> + Copyright © {{CURRENTYEAR}} The Apache Software Foundation, Licensed under the Apache License, Version 2.0 <br> + Apache Flex, Apache and the Apache feather logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. + Read more about our privacy policy on our <a href="about-privacy.html">Privacy Policy</a> page. + <div id="scroll-top-top"><a href="#" title="Go to Top"></a></div> + </div> + </div> + </div> + +</div> + +<!-- Footer / End --> + +</body> + +</html> diff --git a/theme/apache/templates/page.html b/theme/apache/templates/page.html new file mode 100644 index 0000000..426bff1 --- /dev/null +++ b/theme/apache/templates/page.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block content %} + {{ page.content }} +{% endblock %} diff --git a/theme/plugins/asfgenid.py b/theme/plugins/asfgenid.py new file mode 100644 index 0000000..1a663f8 --- /dev/null +++ b/theme/plugins/asfgenid.py @@ -0,0 +1,410 @@ +''' +asfgenid +=================================== +Generates HeadingIDs, ElementID, and PermaLinks +First find all specified IDs and classes. Assure unique ID and permalink +Next find all headings missing IDs. Assure unique ID and permalink +Generates a Table of Content +''' + +# from __future__ import unicode_literals + +import sys +import traceback +import re +import unicodedata + +from bs4 import BeautifulSoup, Comment + +import pelican.contents +import pelican.plugins.signals + +''' +Based on +https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/headerid.py +Which is BSD licensed, but is very much rewritten. +''' + +ASF_GENID = { + 'unsafe_tags': True, # fix script, style, and iframe html that gfm filters as unsafe + 'metadata': True, # {{ metadata }} inclusion of data in the html. + 'elements': True, # {#id} and {.class} annotations. + 'headings': True, # add slugified id to headings missing id. Can be overridden by page metadata. + 'headings_re': r'^h[1-6]', # regex for which headings to check. + 'permalinks': True, # add permalinks to elements and headings when id is added. + 'toc': True, # check for [TOC] and add Table of Content if present. + 'toc_headers': r'h[1-6]', # regex for which headings to include in the [TOC] + 'tables': True, # add class="table" for tables missing class. + 'debug': False +} + +# Fixup tuples for HTML that GFM makes into text. +FIXUP_UNSAFE = [ + (re.compile(r'<script'), '<script'), + (re.compile(r'</script'), '</script'), + (re.compile(r'<style'), '<style'), + (re.compile(r'</style'), '</style'), + (re.compile(r'<iframe'), '<iframe'), + (re.compile(r'</iframe'), '</iframe') +] + +# Find {{ metadata }} inclusions +METADATA_RE = re.compile(r'{{\s*(?P<meta>[-_:a-zA-Z0-9]+)\s*}}') + +# Find {#id} or {.class} elementid annotations +ELEMENTID_RE = re.compile(r'(?:[ \t]*[{\[][ \t]*(?P<type>[#.])(?P<id>[-._:a-zA-Z0-9 ]+)[}\]])(\n|$)') + +# ID duplicates match +IDCOUNT_RE = re.compile(r'^(.*)_([0-9]+)$') + +# For permalinks +LINK_CHAR = '¶' + +# strip permalink chars from headings for ToC +PARA_MAP = { + ord(LINK_CHAR): None +} + +# Find table tags - to check for ones without class attribute. +TABLE_RE = re.compile(r'^table') + + +# An item in a Table of Contents - from toc.py +class HtmlTreeNode(object): + def __init__(self, parent, header, level, id): + self.children = [] + self.parent = parent + self.header = header + self.level = level + self.id = id + + def add(self, new_header): + new_level = new_header.name + new_string = new_header.string + new_id = new_header.attrs.get('id') + + if not new_string: + new_string = new_header.find_all( + text=lambda t: not isinstance(t, Comment), + recursive=True) + new_string = ''.join(new_string) + new_string = new_string.translate(PARA_MAP) + + if self.level < new_level: + new_node = HtmlTreeNode(self, new_string, new_level, new_id) + self.children += [new_node] + return new_node, new_header + elif self.level == new_level: + new_node = HtmlTreeNode(self.parent, new_string, new_level, new_id) + self.parent.children += [new_node] + return new_node, new_header + elif self.level > new_level: + return self.parent.add(new_header) + + def __str__(self): + ret = '' + if self.parent: + ret = "<a class='toc-href' href='#{0}' title='{1}'>{1}</a>".format( + self.id, self.header) + + if self.children: + ret += "<ul>{}</ul>".format('{}' * len(self.children)).format( + *self.children) + + if self.parent: + ret = "<li>{}</li>".format(ret) + + if not self.parent: + ret = "<div id='toc'>{}</div>".format(ret) + + return ret + + +# assure configuration +def init_default_config(pelican): + from pelican.settings import DEFAULT_CONFIG + + DEFAULT_CONFIG.setdefault('ASF_GENID', ASF_GENID) + if(pelican): + pelican.settings.setdefault('ASF_GENID', ASF_GENID) + + +# from Apache CMS markdown/extensions/headerid.py - slugify in the same way as the Apache CMS +def slugify(value, separator): + """ Slugify a string, to make it URL friendly. """ + value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore') + value = re.sub('[^\\w\\s-]', '', value.decode('ascii')).strip().lower() + return re.sub('[%s\\s]+' % separator, separator, value) + + +# Ensure an id is unique in a set of ids. Append '_1', '_2'... if not +def unique(id, ids): + while id in ids or not id: + m = IDCOUNT_RE.match(id) + print(f'id="{id}" is a duplicate') + if m: + id = '%s_%d' % (m.group(1), int(m.group(2)) + 1) + else: + id = '%s_%d' % (id, 1) + ids.add(id) + return id + + +# append a permalink +def permalink(soup, mod_element): + new_tag = soup.new_tag('a', href='#' + mod_element['id']) + new_tag['class'] = 'headerlink' + new_tag['title'] = 'Permalink' + new_tag.string = LINK_CHAR + mod_element.append(new_tag) + + +# fixup cmark content - note that this may be too hungry. It may need to occur later and skipped in codeblock and pre tags. +def fixup_content(content): + text = content._content + modified = False + # Find messed up html + for regex, replace in FIXUP_UNSAFE: + m = regex.search(text) + if m: + modified = True + text = re.sub(regex, replace, text) + if modified: + content._content = text + + +# expand metadata found in {{ key }} +def expand_metadata(tag, metadata): + this_string = str(tag.string) + m = 1 + modified = False + while m: + m = METADATA_RE.search(this_string) + if m: + this_data = m.group(1).strip() + format_string = '{{{0}}}'.format(this_data) + try: + new_string = format_string.format(**metadata) + print(f'{{{{{m.group(1)}}}}} -> {new_string}') + except Exception: + # the data expression was not found + print(f'{{{{{m.group(1)}}}}} is not found') + new_string = format_string + # replace the first pattern with the new_string + this_string = re.sub(METADATA_RE, new_string, this_string, count=1) + modified = True + if modified: + tag.string.replace_with(this_string) + + +# do elementid transformation for {#id} and {.class} attribute annotations. +def elementid_transform(ids, soup, tag, permalinks, perma_set, debug): + tagnav = tag.parent + this_string = str(tag.string) + if debug: + print(f'name = {tagnav.name}, string = {this_string}') + if tagnav.name not in ['[document]', 'code', 'pre']: + m = ELEMENTID_RE.search(tag.string) + if m: + # this replacement could be better it truncates and likely drops additional annotations + tag.string.replace_with(this_string[:m.start()]) + if m.group('type') == '#': + # id attribute annotation + tagnav['id'] = unique(m.group('id'), ids) + if permalinks: + permalink(soup, tagnav) + unique(tagnav['id'], perma_set) + if debug: + print(f'# insertion {tagnav}') + else: + # class attribute annotation (regex only recognizes the two types) + tagnav['class'] = m.group('id') + if debug: + print(f'Class {tag.name} : {tagnav["class"]}') + + +# generate id for a heading +def headingid_transform(ids, soup, tag, permalinks, perma_set): + new_string = tag.string + if not new_string: + # roll up strings if no immediate string + new_string = tag.find_all( + text=lambda t: not isinstance(t, Comment), + recursive=True) + new_string = ''.join(new_string) + + # don't have an id create it from text + new_id = slugify(new_string, '-') + tag['id'] = unique(new_id, ids) + if permalinks: + permalink(soup, tag) + # inform if there is a duplicate permalink + unique(tag['id'], perma_set) + + +# generate table of contents from headings after [TOC] content +def generate_toc(content, tags, title, toc_headers): + settoc = False + tree = node = HtmlTreeNode(None, title, 'h0', '') + # find the last [TOC] + taglast = tags[0] + for tag in tags: + taglast = tag + # find all headings after the final [TOC] + heading_re = re.compile(toc_headers) + for header in taglast.findAllNext(heading_re): + # we have heading content for the ToC + settoc = True + # add the heading. + node, _new_header = node.add(header) + # convert the ToC to Beautiful Soup + tree_soup = '' + if settoc: + print(' ToC') + # convert the HtmlTreeNode into Beautiful Soup + tree_string = '{}'.format(tree) + tree_soup = BeautifulSoup(tree_string, 'html.parser') + # Make the ToC available to the theme's template + content.toc = tree_soup.decode(formatter='html') + # replace the first [TOC] with the generated table of contents + for tag in tags: + tag.replaceWith(tree_soup) + # replace additional [TOC] with nothing + tree_soup = '' + + +# create breadcrumb html +def make_breadcrumbs(rel_source_path, title): + parts = rel_source_path.split('/') + url = '/' + crumbs = [] + crumbs.append(f'<a href="/">Home</a> » ') + # don't process the filename part + last = len(parts)-1 + for i in range(last): + url = f"{url}{parts[i]}/" + p = parts[i].capitalize() + crumbs.append(f'<a href="{url}">{p}</a> » ') + crumbs.append(f'<a href="#">{title}</a>') + return ''.join(crumbs) + + +# add the asfdata metadata into GFM content. +def add_data(content): + """ Mix in ASF data as metadata """ + + # if the reader is 'asf' then the asf metadata is already in place during asfreader plugin. + if content.metadata.get('reader') != 'asf': + asf_metadata = content.settings.get('ASF_DATA', { }).get('metadata') + if asf_metadata: + content.metadata.update(asf_metadata) + + +# main worker transforming the html +def generate_id(content): + if isinstance(content, pelican.contents.Static): + return + + # get plugin settings + asf_genid = content.settings['ASF_GENID'] + # asf_headings setting may be overridden + asf_headings = content.metadata.get('asf_headings', str(asf_genid['headings'])) + + # show active plugins + if asf_genid['debug']: + print('asfgenid:\nshow plugins in case one is processing before this one') + for name in content.settings['PLUGINS']: + print(f'plugin: {name}') + + # track the id tags + ids = set() + # track permalinks + permalinks = set() + + # step 1 - fixup html that cmark marks unsafe - move to later? + if asf_genid['unsafe_tags']: + fixup_content(content) + + # step 2 - prepare for genid processes + # parse html content into BeautifulSoup4 + soup = BeautifulSoup(content._content, 'html.parser') + # page title + title = content.metadata.get('title', 'Title') + # assure relative source path is in the metadata + content.metadata['relative_source_path'] = rel_source_path = content.relative_source_path + # create breadcrumb html + content.metadata['breadcrumbs'] = breadcrumbs = make_breadcrumbs(rel_source_path, title) + # display output path and title + print(f'{content.relative_source_path} - {title}') + # if debug display breadcrumb html + if asf_genid['debug']: + print(f' {breadcrumbs}') + # enhance metadata if done by asfreader + add_data(content) + + # step 3 - metadata expansion + if asf_genid['metadata']: + if asf_genid['debug']: + print(f'metadata expansion: {content.relative_source_path}') + for tag in soup.findAll(string=METADATA_RE): + expand_metadata(tag, content.metadata) + + # step 4 - find all id attributes already present + for tag in soup.findAll(id=True): + unique(tag['id'], ids) + # don't change existing ids + + # step 5 - find all {#id} and {.class} text and assign attributes + if asf_genid['elements']: + if asf_genid['debug']: + print(f'elementid: {content.relative_source_path}') + for tag in soup.findAll(string=ELEMENTID_RE): + elementid_transform(ids, soup, tag, asf_genid['permalinks'], permalinks, asf_genid['debug']) + + # step 6 - find all headings w/o ids already present or assigned with {#id} text + if asf_headings == 'True': + if asf_genid['debug']: + print(f'headings: {content.relative_source_path}') + # Find heading tags + HEADING_RE = re.compile(asf_genid['headings_re']) + for tag in soup.findAll(HEADING_RE, id=False): + headingid_transform(ids, soup, tag, asf_genid['permalinks'], permalinks) + + # step 7 - find all tables without class + if asf_genid['tables']: + if asf_genid['debug']: + print(f'tables: {content.relative_source_path}') + for tag in soup.findAll(TABLE_RE, _class=False): + tag['class'] = 'table' + + # step 8 - find TOC tag and generate Table of Contents + if asf_genid['toc']: + tags = soup('p', text='[TOC]') + if tags: + generate_toc(content, tags, title, asf_genid['toc_headers']) + + # step 9 - reset the html content + content._content = soup.decode(formatter='html') + + # step 10 - output all of the permalinks created + for tag in permalinks: + print(f' #{tag}') + + +def tb_connect(pel_ob): + """Print any exception, before Pelican chews it into nothingness.""" + try: + generate_id(pel_ob) + except Exception: + print('-----', file=sys.stderr) + print('FATAL: %s' % (pel_ob.relative_source_path), file=sys.stderr) + traceback.print_exc() + # if we have errors in this module then we want to quit to avoid erasing the site + sys.exit(4) + + +def register(): + pelican.plugins.signals.initialized.connect(init_default_config) + + +pelican.plugins.signals.content_object_init.connect(tb_connect)
