This is an automated email from the ASF dual-hosted git repository. sgoeschl pushed a commit to branch FREEMARKER-146 in repository https://gitbox.apache.org/repos/asf/freemarker-generator.git
commit 831289573e9193d14021b52bc4d194e049e6ed5d Author: Siegfried Goeschl <[email protected]> AuthorDate: Thu Jun 18 14:48:47 2020 +0200 FREEMARKER-146 Cleanly separate example templates and data from user-supplied content --- .../examples/data/template/application.properties | 19 +++++++++++++++++ .../examples/data/template/nginx/nginx.conf.ftl | 24 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/freemarker-generator-cli/examples/data/template/application.properties b/freemarker-generator-cli/examples/data/template/application.properties new file mode 100644 index 0000000..fe83a14 --- /dev/null +++ b/freemarker-generator-cli/examples/data/template/application.properties @@ -0,0 +1,19 @@ +<#-- +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. +--> +# == application.properties ================================================== +server.name=${NGINX_HOSTNAME!"127.0.0.1"} +server.logs=${NGINX_LOGS!"/var/log/nginx"} diff --git a/freemarker-generator-cli/examples/data/template/nginx/nginx.conf.ftl b/freemarker-generator-cli/examples/data/template/nginx/nginx.conf.ftl new file mode 100644 index 0000000..7cb9f3d --- /dev/null +++ b/freemarker-generator-cli/examples/data/template/nginx/nginx.conf.ftl @@ -0,0 +1,24 @@ +<#-- + 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. +--> +# == nginx-conf ============================================================== +server { + listen ${NGINX_PORT!"80"}; + server_name ${NGINX_HOSTNAME!"127.0.0.1"}; + + root ${NGINX_WEBROOT!"/usr/share/nginx/www"}; + index index.htm; +}
