[
https://issues.apache.org/jira/browse/FLINK-3975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307396#comment-15307396
]
ASF GitHub Bot commented on FLINK-3975:
---------------------------------------
Github user dyanarose commented on a diff in the pull request:
https://github.com/apache/flink/pull/2040#discussion_r65137533
--- Diff: docs/build_docs.sh ---
@@ -54,7 +54,7 @@ JEKYLL_CMD="build"
while getopts ":p" opt; do
case $opt in
p)
- JEKYLL_CMD="serve --config _config.yml,_local_preview_conf.yml
--watch"
+ JEKYLL_CMD="serve --baseurl= --watch"
--- End diff --
@uce It looks like the `baseurl` switch came in with 1.0
https://github.com/jekyll/jekyll/blob/0ee1a75d16265abc250d0747c5f93bf2ad2daa05/site/_docs/upgrading/0-to-2.md#baseurl.
I think `serve` not respecting the multiple config files may be a
bug/feature with Jekyll as the docs say that `serve` takes all the same
switches as `build` does.
https://jekyllrb.com/docs/configuration/#serve-command-options. I'm looking to
prove that when I get the chance and look into it to raise an issue to see if
the code or the docs need changing.
> Override baseurl when serving docs locally
> ------------------------------------------
>
> Key: FLINK-3975
> URL: https://issues.apache.org/jira/browse/FLINK-3975
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Environment: centos 7.2, jekyll 3.1.6, ruby 2.3.1
> Reporter: Dyana Rose
> Priority: Trivial
>
> when running the documentation build script as:
> {{./build_docs.sh -p}} the docs are built using the correctly overridden
> baseurl, but they are then served from the wrong url making it a wee bit more
> difficult than intended to review changes locally.
> The following is the output from running the script:
> {quote}
> Configuration file: _config.yml
> Configuration file: _local_preview_conf.yml
> Source: /vagrant/flink/docs
> Destination: /vagrant/flink/docs/target
> Incremental build: disabled. Enable with --incremental
> Generating...
> /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pygments.rb-0.6.3/lib/pygments/popen.rb:57:
> warning: Insecure world writable dir /opt/scala-2.11.8/bin in PATH, mode
> 040777
> done in 16.736 seconds.
> Auto-regeneration: enabled for '/vagrant/flink/docs'
> Configuration file: /vagrant/flink/docs/_config.yml
> Server address:
> http://0.0.0.0:4000//ci.apache.org/projects/flink/flink-docs-master/
> Server running... press ctrl-c to stop.
> {quote}
> As you see it looks to be using both config files to build, but only the
> default config file to serve.
> This can be fixed by just removing the {{_local_preview_conf.yml}} file and
> instead specify the baseurl as an option to the serve command, so it becomes
> {{serve --config _config.yml --baseurl= --watch}}. Giving an output of:
> {quote}
> Configuration file: _config.yml
> Source: /vagrant/flink/docs
> Destination: /vagrant/flink/docs/target
> Incremental build: disabled. Enable with --incremental
> Generating...
> /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pygments.rb-0.6.3/lib/pygments/popen.rb:57:
> warning: Insecure world writable dir /opt/scala-2.11.8/bin in PATH, mode
> 040777
> done in 15.928 seconds.
> Auto-regeneration: enabled for '/vagrant/flink/docs'
> Configuration file: /vagrant/flink/docs/_config.yml
> Server address: http://0.0.0.0:4000/
> Server running... press ctrl-c to stop.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)