GithubHelp home page GithubHelp logo

andriusvelykis / reflow-maven-skin Goto Github PK

View Code? Open in Web Editor NEW
132.0 12.0 57.0 21.56 MB

Reflow is an Apache Maven site skin built on Bootstrap. It allows various structural and stylistic customizations to create a modern-looking Maven-generated website.

Home Page: http://andriusvelykis.github.io/reflow-maven-skin/

License: Apache License 2.0

CSS 17.89% JavaScript 2.04% Java 80.07%

reflow-maven-skin's Introduction

Reflow is an Apache Maven site skin built on Bootstrap. It allows various structural and stylistic customizations to create a modern-looking Maven-generated website.

To get started and see how the skin looks by default, check out http://andriusvelykis.github.io/reflow-maven-skin!

Usage

To use this Maven skin, include it in your site.xml file:

<project>
  ...
  <skin>
    <groupId>lt.velykis.maven.skins</groupId>
    <artifactId>reflow-maven-skin</artifactId>
    <version>1.1.1</version>
  </skin>
  ...
</project>

The skin requires accompanying Reflow Velocity tools (reflow-velocity-tools) to be available when generating Maven site. Add them as a dependency to maven-site-plugin in your POM file:

<build>
  <plugins>
    ...
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-site-plugin</artifactId>
      <version>3.3</version>
      <dependencies>
        ...
        <dependency>
          <groupId>lt.velykis.maven.skins</groupId>
          <artifactId>reflow-velocity-tools</artifactId>
          <version>1.1.1</version>
        </dependency>
        <!-- Reflow skin requires Velocity >= 1.7  -->
        <dependency>
          <groupId>org.apache.velocity</groupId>
          <artifactId>velocity</artifactId>
          <version>1.7</version>
        </dependency>
        ...
      </dependencies>
      ...
    </plugin>
    ...
  </plugins>
</build>

Note that Apache Velocity 1.7 is also required by the template.

The skin is provided on the "works on my computer" basis at the moment. I am using the newest versions of maven-site-plugin and other components and at the moment do not have any feedback on using the skin with Maven 2 site or other configurations.

Configuration

The skin is configurable using the <custom><reflowSkin> element in your site.xml file. Refer to documentation for all configuration options.

A sample configuration file is given below:

<project>
  ...
  <custom>
    <reflowSkin>
      <theme>bootswatch-spacelab</theme>
      <brand>
        <name>My Project</name>
        <href>http://andriusvelykis.github.io/reflow-maven-skin/</href>
      </brand>
      <slogan>Super interesting project doing good things.</slogan>
      <titleTemplate>%2$s | %1$s</titleTemplate>
      <toc>top</toc>
      <topNav>Download|reports</topNav>
      <bottomNav>
        <column>Main|Download</column>
        <column>Documentation</column>
        <column>reports|modules</column>
      </bottomNav>
      <bottomDescription>This is a very good project doing interesting
        and valuable things.</bottomDescription>
      <pages>
        <index project="project-id">
          <shortTitle>Welcome</shortTitle>
          <breadcrumbs>false</breadcrumbs>
          <toc>false</toc>
          <sections>
            <carousel />
            <body />
            <sidebar />
            <thumbs>2</thumbs>
            <columns>3</columns>
          </sections>
        </index>
        <developer-info>
          <toc>sidebar</toc>
        </developer-info>
      </pages>
    </reflowSkin>
  </custom>
  ...
</project>

Bug tracker

Have a bug or a feature request? Please create an issue here on GitHub that conforms with necolas's guidelines.

http://github.com/andriusvelykis/reflow-maven-skin/issues

Contributing

Fork the repository and submit pull requests.

Author

Andrius Velykis

Copyright and license

Copyright 2012-2013 Andrius Velykis

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or 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.

reflow-maven-skin's People

Contributors

andriusvelykis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reflow-maven-skin's Issues

TOC is hidden under navbar

If the TOC is placed on the top (<toc>top</toc>) and I scroll a long page down, there is a point where TOC is hidden under the navbar.

It seems that TOC jumps to the fixed position when it reaches the top of the page, but it should do so when it reaches the navbar.

HTML5 anchors drops the content inside <a name=""></a>

When HTML5 anchors flag is enabled (<html5Anchor>true</html5Anchor> - the default option), all <a name="foo" /> anchors are transformed into e.g. <h2 id="foo"> of the nearest heading.

However, if the anchor was wrapping some content, e.g. <a name="foo">Lalala</a>, it is dropped: the Lalala bit is removed from the result HTML.

Happens in FML-rendered documents.

Workaround for now: disable HTML5 anchors for the particular page.

Fix broken "Back to top" link

reflow-scroll.js:14 Uncaught TypeError: Cannot read property 'top' of undefined

Observed in reflow-maven-skin 1.1.2-SNAPSHOT

Custom/local resources

Reflow skin currently cannot be used in an offline/intranet setting, since jQuery and highlight.js are loaded from CDN.

Provide a <localResources> flag for CDN-less jQuery library, since it is a core requirement. Furthermore, the flag will force the use of local Bootstrap CSS and JS files as well.

For non-core resources such as highlight.js, <body><head> or <endContent> (see #23) elements can be used to replace the existing versions. Also see discussions in #18 and #17.

Sidebar navigation

It seems there is no way to have a standard sidebar navigation, just like maven-fluido-skin does.

It would be nice to add this option.

XML in Markdown breaks plugin generation

If I have a markdown document with some xml:

this is a test

  <project>
   ....
   </project>

The plugin errors:

line [3] Error parsing the model: end tag name

must match start tag name from line 3 (position: TEXT seen ... โ€ฆ.

... @3:79) -> [Help 1]

Any ideas for a work around? Our documentation has a lot of code samples in it...

Thanks

Custom JavaScript at the end of the page

As discussed in #18, a custom element to add arbitrary XHTML at the end of the document would allow using custom JavaScript files with good performance (rather than adding them to the head).

Create a <endContent> element that allows XHTML content to be added before </body> tag. It also supports Velocity variables.

NullPointerException on first page load with `mvn site:run -Dport=7070`

I am using

mvn site:run -Dport=7070

to develop our site. When I do a first page load of the start URL http://localhost:7070/ then I get a NullPointerException. Following is the transcript:

Rendering site with lt.velykis.maven.skins:reflow-maven-skin:jar:1.0.0 skin.
Skipped "About" report, file "index.html" already exists for the English version.
Starting Jetty on http://localhost:7070/
jetty-6.1.25
NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
Started [email protected]:7070
/
org.parboiled.errors.ParserRuntimeException: Error while parsing rule 'Root/Sequence/ZeroOrMore/Sequence' at input position (line 1, pos 1):

^

java.lang.NullPointerException
        at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:353)
        at org.parboiled.matchers.ZeroOrMoreMatcher.match(ZeroOrMoreMatcher.java:39)
        at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
        at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:338)
        at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
        at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
        at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:338)
        at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
        at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
        at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:338)
        at org.parboiled.parserunners.BasicParseRunner.run(BasicParseRunner.java:72)
        at org.parboiled.parserunners.ReportingParseRunner.runBasicMatch(ReportingParseRunner.java:86)
        at org.parboiled.parserunners.ReportingParseRunner.run(ReportingParseRunner.java:66)
        at org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:81)
        at org.pegdown.Parser.parseToParsingResult(Parser.java:1329)
        at org.pegdown.Parser.parseInternal(Parser.java:1316)
        at org.pegdown.Parser.parse(Parser.java:78)
        at org.pegdown.PegDownProcessor.parseMarkdown(PegDownProcessor.java:137)
        at org.apache.maven.doxia.module.markdown.MarkdownParser.parse(MarkdownParser.java:71)
        at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:65)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:406)
        at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53)
        at org.apache.maven.plugins.site.webapp.DoxiaFilter.doFilter(DoxiaFilter.java:145)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NullPointerException
        at org.parboiled.matchers.ProxyMatcher.getSubContext(ProxyMatcher.java:243)
        at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
        at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
        at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:338)
        ... 38 more

In content files, the character '\'' gets substituted with the character '?'.

I am using the maven-reflow-skin in my site configuration as indicated in the documentation. For a start, the custom/reflowSkin element of the site.xml is all empty. Now in my start page index.md.vm, all occurrences of the character ''' get replaced with '?'. This doesn't with my old skin, so I supposed it's a bug.

/project/custom/reflowSkin/pages/index@project-id="$artifactId" doesn't work as advertised.

Filtering a module by it's artifactId doesn't quite work because the test seems to use the given project-id as starting characters only. Consider this example:

<project>
    <custom>
        <reflowSkin>
            <pages>
                <index project-id="xyz">
                    <shortTitle>Welcome</shortTitle>
                    <breadcrumbs>false</breadcrumbs>
                </index>
            </pages>
        </reflowSkin>
    </custom>
</project>

Now consider if the submodules are named "xyz-api", "xyz-impl" etc then the configuration would be applied to them all.

bottomNav RegExp does not work for subItems

Hello,

It seems bottomNav RegExp does not work for subItems.
For example <menu ref="reports"/> produces following menu:

  • Project Documentation
    • Project Information
      • About
      • CI Management
      • Dependencies
      • Dependency Convergence
      • Dependency Management
      • Distribution Management
      • Issue Management
      • Licenses
      • Mailing Lists
      • Plugin Management
      • Plugins
      • Team
      • Source Code Management
      • Summary
    • Project Reports
      • Surefire Report
      • Rat Report
<bottomNav maxSpan="8">
  <column>About|Dependencies|Licenses|Summary|Rat Report</column>
</bottomNav>

Produces empty menu :(

Best way to add arbitrary HTML code

Is there any way to easily embed custom HTML code? what I know so far is that you can add custom html in the decoration head tag, but I'm trying to add bootstrap components (like jumbotron) and the head tag is not suitable for this purpose.

Other option that I considered is to create a custom jumbotron component such as the <carousel> to inject custom bootstrap components but this requires to modify the custom reflow velocity template. A different (maybe better) option is to use javascript code to inject specific html in the document using the head tag. Any ideas? thx

Apply HTML5 anchors to <dt>

In FML-generated files, the FAQ questions are presented as a definition list. The question is assigned a <a name="q1">Question</a> anchor inside the <dt> tag.

Update the HTML5 anchors transformation to apply in this case and move the anchor to <dt id="q1">.

Make sure that the anchor content gets handled correctly. Depends on issue #4 .

Carousel elements are displayed in the TOC

We are using this plugin to generate our site.

I notice couple of non-critical issues:

  1. second level menu items are not accessible on mobile devices, you can check it here: http://openmeetings.apache.org/
  2. carousel elements are displayed in the TOC and confuses users (you can click TOC element but nothing will change)
    Example xdoc source https://github.com/apache/openmeetings/blob/3.2.x/openmeetings-server/src/site/xdoc/index.xml
    Carousel definition: https://github.com/apache/openmeetings/blob/3.2.x/openmeetings-server/src/site/site.xml#L124
    Result: http://openmeetings.apache.org/

Thanks for the great skin, looking forward to see new versions :)

Support menu separators

Maven site descriptor does not seem to allow having menu separators: each item gets a name.

Support for menu separators can be added by assigning some name (or better, a regular expression!) to indicate that a menu item is a separator. This would allow creating separator-named items in site.xml which would be replaced by separator items when rendered.

Use Bootstrap separator in menus: <li class="divider"></li>

Possible configuration:

<menuSeparator>_separator</menuSeparator>

If regular expression matches a name of menu item, it is replaced by a separator item (dropping the link). So the following menu would have 2 items split by a seprator:

<menu name="My Menu">
  <item name="Introduction" href="index.html"/>
  <item name="_separator" href=""/>
  <item name="Related info" href="../another-project/index.html"/>
</menu>

Update Google Analytics Script

The script given by Google Analytics to put in the webpaches has changed, now it is given in the following way:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'PUT-HERE-YOUR-GOOGLE-ANALYTICS-ID', 'auto');
  ga('send', 'pageview');

</script>

The auto-generated by the label <googleAnalyticsAccountId> is different, maybe from previous versions of Google Analytics. Please update the decorator to avoid compatibility problems with newer versions of Analytics.

This skin is not hosted in sonatype repo

I installed fresh maven on new user account on Ubuntu Linux.
Cloned github repo and tried to mvn site on /reflow-maven-skin

Unfortunately there is no way to get this skin from sonatype repo.

This artifact should be hosted somewhere or you should mention in manual that it requires some additional configuration.

Error report below:

Downloading: http://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7-site.xml
[INFO] Relativizing decoration links with respect to project URL: http://andriusvelykis.github.com/reflow-maven-skin/skin
Downloading: https://oss.sonatype.org/content/repositories/snapshots/lt/velykis/maven/skins/reflow-maven-skin/1.0.0-SNAPSHOT/maven-metadata.xml
Downloading: https://oss.sonatype.org/content/repositories/snapshots/lt/velykis/maven/skins/reflow-maven-skin/1.0.0-SNAPSHOT/reflow-maven-skin-1.0.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:10.537s
[INFO] Finished at: Wed Jun 26 13:54:50 CEST 2013
[INFO] Final Memory: 16M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.2:site (default-site) on project reflow-maven-skin: SiteToolException: ArtifactNotFoundException: The skin does not exist: Could not find artifact lt.velykis.maven.skins:reflow-maven-skin:jar:1.0.0-SNAPSHOT in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots)
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=lt.velykis.maven.skins -DartifactId=reflow-maven-skin -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=lt.velykis.maven.skins -DartifactId=reflow-maven-skin -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] 
[ERROR] lt.velykis.maven.skins:reflow-maven-skin:jar:1.0.0-SNAPSHOT
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, releases=false, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

topNav items isn't generating

Refer to the attached pom.xml and site.xml for configuration. (.xml changed to .txt to allow upload)

pom.txt
site.txt

index.md is just a copy of the reflow index.md as a place holder.

For some reason, the topNav menu items are not generated. I'm staring myself blind on the site.xml file failing to figure out the issue.

NPE when menu item href is not set

Got NullPointerException during site generation because menu item href attribute was not set in site.xml, e.g. <item name="Foo" />.

[INFO] Generating "Project Summary" report    --- maven-project-info-reports-plugin:2.6
[ERROR] Exception in macro #relativeLink called at META-INF/maven/site.vm[line 125, column 11]
[ERROR] Exception in macro #activeLink called at META-INF/maven/site.vm[line 815, column 27]
[ERROR] Exception in macro #displayTree called at META-INF/maven/site.vm[line 819, column 27]
[ERROR] Exception in macro #displayTree called at META-INF/maven/site.vm[line 819, column 27]
[ERROR] Exception in macro #displayTree called at META-INF/maven/site.vm[line 148, column 27]
[ERROR] Exception in macro #topMenu called at META-INF/maven/site.vm[line 1463, column 19]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.798s
[INFO] Finished at: Mon Jan 28 12:37:40 GMT 2013
[INFO] Final Memory: 20M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.2:site (default-site) on project foo: Error during page generation: Error while generating code. Invocation of method 'calculateLink' in  class org.codehaus.plexus.util.PathTool threw exception java.lang.NullPointerException at META-INF/maven/site.vm[line 62, column 44] -> [Help 1]

export-sn Export shared-nothing persistence files to CSV, does not seems to be working

Hi.

"Export" works fine, but when I was trying to export AS space data into CSV by using export-sn option, but it does not seems to be working. I always get this exception, do we have any help on usage of this command

FINE: Connected to metaspace
Apr 14, 2017 3:46:01 PM com.tibco.as.io.cli.AbstractApplication execute
SEVERE: Could not execute command
java.lang.NullPointerException
at java.io.File.(File.java:222)
at com.tibco.as.io.cli.AbstractSNExportCommand.getUserSpaceNames(AbstractSNExportCommand.java:20)
at com.tibco.as.io.cli.AbstractExportCommand.getExecutor(AbstractExportCommand.java:24)
at com.tibco.as.io.cli.AbstractApplication.execute(AbstractApplication.java:138)
at com.tibco.as.file.cli.DelimitedFileApplication.main(DelimitedFileApplication.java:13)
Apr 14, 2017 3:46:01 PM com.tibco.as.io.AbstractChannel close
FINE: Disconnecting from metaspace
Apr 14, 2017 3:46:01 PM com.tibco.as.io.AbstractChannel close
FINE: Disconnected from metaspace

The reason we are exploring export-sn is, looks like export-sn only deals with the persistence file, so it does not any impact of the cluster when we are executing export-sn command, otherwise if we are exporting data thru "export" command, it does query the space in RAM, which execute Queries on the cluster, hence impacts the cluster performance.

Thanks
Naveen

Syntax highlighting doesn't work as intended.

Looking at the resulting html in the highlight.js examples, the css class of the code blocks are based on the language name.

However, it appears that the doxia markdown conversion sets the class for all of these code blocks to "source".

Syntax highlighting looks okay for simple languages such as xml, but when you try java, it's all wonky.

It's easy to reproduce: Just update index.md of the reflow-skin site, add a code block in markdown with a hint of java. The result won't match what is expected on the example site.

I'm looking through the velocity tools now to see if I can work around this by replacing the "source" selector as I see it, but I'm not sure that a) it's possible (still reading) and b) how to tell Velocity to use whatever I create to process the result (need to read more about velocity).

If you have ideas on how I can easily work around this, please let me know.

Not able to handle pages in subdirectories

I was trying to use reflow-maven-skin with an already done site, and face an important problem:

I have my pages subdivided in this directory structure

apt/index.apt
apt/dev/developer01.apt
apt/dev/developer02.apt
......
apt/user/user01.apt
apt/user/user02.apt
......

This is working correctly in standard maven-site skin when calling, or with fluido skin.

mvn site:run

But when using reflow-maven-skin once I get into any page inside
user or dev directory I cannot reach any other page.

PAGE NOT FOUND Error is returned

So for now just keep using old skins.

Suggestion: provide offline access to the bootstrap stylesheets.

Quickly tried out the simplest use case (adding skin artifact to site.xml and adding the two deps to maven-site-plugin), and noticed that it produces a site which requires online access to http://netdna.bootstrapcdn.com.

Given that this plugin may also be valuable to closed corporate networks without Internet access, maybe the plugin should provide the two bootstrap stylesheets (bootstrap.min.css and bootstrap-responsive.min.css) and deploy them together with the rest of the site?

The skin looks very promising! Awesome work!

Unescaped & character in links

When generating the Maven site of the Reflow skin itself, an error is reported with newer versions of mvn site:

Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error parsing '/Users/andrius/Dev/reflow-maven-skin/src/site/markdown/index.md': line [34] Error parsing the model: entity reference name can not contain character =' (position: TEXT seen ...ps://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=... @34:785)

This seems to be caused by unescaped & character.

anchor(<a>...</a>) in the section before another section cannot be clicked when using layout

Problem

  1. The <a>..</a> cannot be clicked when using layout.
  2. Even for the section, it cannot be drag-and-select.

My Environment

  1. Java 8
  2. Maven 3.3.3
  3. maven-site-plugin 3.4.1-SNAPSHOT

Example

sandbox.md

  1. The link in "Chapter 1" cannot be clicked
  2. The link in "Chapter 2" is fine
## Chapter 1

[Google](https://www.google.com)

---

## Chapter 2

[Google](https://www.google.com)

site.xml

<project
    xmlns="http://maven.apache.org/DECORATION/1.6.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/DECORATION/1.6.0 http://maven.apache.org/xsd/decoration-1.6.0.xsd"
>

<custom>
    <reflowSkin>
        <pages>
            <sandbox>
                <sections>
                    <columns>2</columns>
                    <columns>2</columns>
                </sections>
            </sandbox>
        </pages>
    </reflowSkin>
</custom>

</project>

Diagnosis

In the file reflow-skin.css, if I remove the content:""; property:

h1[id]:before,
h2[id]:before,
h3[id]:before,
h4[id]:before,
h5[id]:before,
h6[id]:before,
a[name]:before {
    display:block; 
    /* content:""; */
    height:90px; 
    margin:-90px 0 0; 
}

The problem would be solved.
But I have no idea if this is a sensible solution.

Upgrade to Bootstrap 2.3

Bootstrap 2.3 has been released - check compatibility and upgrade in Reflow skin.

Also bump the jQuery version to 1.9.

TOC sidebar does not stay on the screen

If the TOC is placed in the sidebar (<toc>sidebar</toc>) and I scroll a long page down, it is scrolled with the page.

It think it would be better if sidebar jumps to the fixed position when the page is scrolled down.

Generated sites does not show properly in TLS only environments

Having generated a site with version 1.1.1 yields a broken layout if shown in a browser with httpseverywhere, since the links to

  • JQuery
  • Bootstrap
  • html5shim
    are http only.

Either they should be changed to https or a configuration option could be added that allows locally downloaded versions to avoid the mix of http and https.

The following links provoke the problem:

<link href="http://netdna.bootstrapcdn.com/bootswatch/2.3.2/cosmo/bootstrap.min.css" rel="stylesheet" />
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet" />
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>

Changing them to https works fine:

Which way would you prefer?

  • configuration option to enable SSL and providing html5.js with a relative link?
  • configuration option to have all external references locally and use relative links?

The simplest option would be to change all above links to https and provide a local copy of htlm5shim - shall I start a pull request?

Thanks

Top nav does not expand properly at small screens

When the screen is small, the top navigation is collapsed into a single button. When clicked, the button expands underneath.

If there are submenus, clicking on the top menu item expands the submenu underneath. With Reflow skin, the full menu is not expanded further, rather staying in the same place. See attached screenshot.

top-nav-fixed-height

The top menu should expand properly: e.g. the Documentation item in the screenshot should be followed by its submenu and then the Tools & Contribute items.

New jsoup version

Jsoup 1.7.3 has been released. It supports additional CSS selectors. Including the new library version in reflow-velocity-tools allows to easily use these selectors when writing extensions.

Top nav/menu links do not work on iPhone

Using Safari/Chrome on iPhone (problem affects all iOS/iPhone versions) links that are one level deep do not work. Example try clicking on Documentation > Usage or Tools > Tools Javadoc does not take you to the correct page i.e. nothing happens when a link is pressed.

img_5235

Bootswatch CDN URLs incorrect

The generated URLs for CSS files for Bootswatch from the Bootstrap CDN are no longer valid. The generated URL:

<link href="http://netdna.bootstrapcdn.com/bootswatch/2.3.2/yeti/bootstrap.min.css" rel="stylesheet" />

returns a Access Denied error.

The Bootstrap CDN page, seems to indicate the URL (for the same theme) should be:

https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/yeti/bootstrap.min.css

Of course this is for version 3.3.5 of Bootswatch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.