{% if page.subtitle %}{{page.subtitle}}{% else %}{{page.title}}{% endif %}
+ {% include template/version_note.html %} + {% unless page.toc == 'false' or page.toc == false %}{% endunless %} ++
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..e5d7e1a47 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +--- +name: Build site on PR + +on: + pull_request: {} + push: + branches: + - master + +permissions: + contents: read + +jobs: + rake_checks: + name: Rake Checks + runs-on: ubuntu-24.04 + steps: + # needs fetch-depth because the packaging dem reads old git tags + - name: Checkout current PR + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Ruby version 3.3 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + bundler-cache: true + - name: Display Ruby environment + run: bundle env + - name: Validate code + run: bundle exec rake generate + env: + DEBUG_PUPPET_DOCS_RAKEFILE: 1 diff --git a/Gemfile b/Gemfile index 6db7d14b3..ba353148e 100644 --- a/Gemfile +++ b/Gemfile @@ -3,8 +3,8 @@ gemspec :name => 'puppet_docs' gem 'versionomy', '~> 0.5.0' gem 'rake', '~> 13.0', '>= 13.0.1' -gem 'rack', '>= 2.2.14' -gem 'git', '~> 4.0' +gem 'rack', '~> 2.2', '>= 2.2.3' +gem 'git', '~> 1.8' gem 'json', '~> 2.5' group(:build_site) do @@ -12,7 +12,7 @@ group(:build_site) do gem 'kramdown', '~> 2.3' gem 'vlad', '~> 2.7' gem 'vlad-git', '~> 2.1' - gem 'listen', '~> 3.9.0' # Preserve ability to run on Ruby 2.0, since listen 3.1 requires Ruby ~> 2.2. + gem 'listen', '~> 3.5.1' # Preserve ability to run on Ruby 2.0, since listen 3.1 requires Ruby ~> 2.2. end group(:generate_references) do @@ -20,16 +20,16 @@ group(:generate_references) do gem 'rdoc', '~> 6.2' gem 'rgen', '~> 0.8' gem 'pandoc-ruby' - gem 'openvox-strings' - gem 'openvox', '~> 8' - gem 'nokogiri', '>= 1.18.9' + gem 'puppet-strings' + gem 'puppet', '>= 7', '< 9' + gem 'nokogiri', '>= 1.12.5' gem 'pragmatic_segmenter', '~> 0.3' gem 'punkt-segmenter', '~> 0.9' end group(:unknown) do gem 'maruku', '~> 0.7' - gem 'activerecord', '>= 7.1.5.2' + gem 'activerecord', '~>6' end # group(:debug) do diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..01d1dd815 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,211 @@ +PATH + remote: . + specs: + puppet_docs (0.1) + +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.7) + base64 + nkf + rexml + activemodel (6.1.7.8) + activesupport (= 6.1.7.8) + activerecord (6.1.7.8) + activemodel (= 6.1.7.8) + activesupport (= 6.1.7.8) + activesupport (6.1.7.8) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + base64 (0.3.0) + bigdecimal (3.1.8) + blockenspiel (0.5.0) + colorator (1.1.0) + concurrent-ruby (1.3.3) + deep_merge (1.2.2) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + facter (4.7.1) + hocon (~> 1.3) + thor (>= 1.0.1, < 1.3) + fast_gettext (2.4.0) + prime + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86_64-linux-gnu) + forwardable (1.3.3) + forwardable-extended (2.6.0) + git (1.19.1) + addressable (~> 2.8) + rchardet (~> 1.8) + google-protobuf (4.27.2-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.27.2-x86_64-linux) + bigdecimal + rake (>= 13) + hocon (1.4.0) + http_parser.rb (0.8.0) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + jekyll (4.3.3) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-watch (2.2.1) + listen (~> 3.0) + json (2.7.2) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.5.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + locale (2.1.4) + maruku (0.7.3) + mercenary (0.4.0) + minitest (5.24.1) + multi_json (1.15.0) + nkf (0.2.0) + nokogiri (1.16.6-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-linux) + racc (~> 1.4) + open4 (1.3.4) + pandoc-ruby (2.1.10) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + pragmatic_segmenter (0.3.23) + unicode + prime (0.1.2) + forwardable + singleton + psych (5.1.2) + stringio + public_suffix (6.0.0) + punkt-segmenter (0.9.1) + unicode_utils (>= 1.0.0) + puppet (8.7.0) + concurrent-ruby (~> 1.0) + deep_merge (~> 1.0) + facter (>= 4.3.0, < 5) + fast_gettext (>= 2.1, < 3) + locale (~> 2.1) + multi_json (~> 1.13) + puppet-resource_api (~> 1.5) + scanf (~> 1.0) + semantic_puppet (~> 1.0) + puppet (8.7.0-universal-darwin) + CFPropertyList (>= 3.0.6, < 4) + concurrent-ruby (~> 1.0) + deep_merge (~> 1.0) + facter (>= 4.3.0, < 5) + fast_gettext (>= 2.1, < 3) + locale (~> 2.1) + multi_json (~> 1.13) + puppet-resource_api (~> 1.5) + scanf (~> 1.0) + semantic_puppet (~> 1.0) + puppet-resource_api (1.9.0) + hocon (>= 1.0) + puppet-strings (4.1.2) + rgen (~> 0.9) + yard (~> 0.9) + racc (1.8.0) + rack (2.2.9) + rake (13.2.1) + rake-remote_task (2.4.4) + open4 (~> 1.0) + rake (>= 0.8, < 15.0) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + rchardet (1.8.0) + rdoc (6.7.0) + psych (>= 4.0.0) + rexml (3.3.2) + strscan + rgen (0.9.1) + rouge (4.3.0) + safe_yaml (1.0.5) + sass-embedded (1.77.8-arm64-darwin) + google-protobuf (~> 4.26) + sass-embedded (1.77.8-x86_64-linux-gnu) + google-protobuf (~> 4.26) + scanf (1.0.0) + semantic_puppet (1.1.0) + singleton (0.2.0) + stringio (3.1.1) + strscan (3.1.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.2.2) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode (0.4.4.5) + unicode-display_width (2.5.0) + unicode_utils (1.4.0) + versionomy (0.5.0) + blockenspiel (~> 0.5) + vlad (2.7.1) + rake (>= 0.8, < 15.0) + rake-remote_task (~> 2.3) + vlad-git (2.2.0) + vlad (>= 2.1.0) + webrick (1.8.1) + yard (0.9.36) + zeitwerk (2.6.16) + +PLATFORMS + arm64-darwin-24 + x86_64-linux + +DEPENDENCIES + activerecord (~> 6) + git (~> 1.8) + jekyll (~> 4.1) + json (~> 2.5) + kramdown (~> 2.3) + listen (~> 3.5.1) + maruku (~> 0.7) + nokogiri (>= 1.12.5) + pandoc-ruby + pragmatic_segmenter (~> 0.3) + punkt-segmenter (~> 0.9) + puppet (>= 7, < 9) + puppet-strings + puppet_docs! + rack (~> 2.2, >= 2.2.3) + rake (~> 13.0, >= 13.0.1) + rdoc (~> 6.2) + rgen (~> 0.8) + versionomy (~> 0.5.0) + vlad (~> 2.7) + vlad-git (~> 2.1) + yard (~> 0.9) + +BUNDLED WITH + 2.5.10 diff --git a/Rakefile b/Rakefile index 9bd70818e..328954764 100644 --- a/Rakefile +++ b/Rakefile @@ -43,7 +43,7 @@ def jekyll(command = 'build', source = SOURCE_DIR, destination = OUTPUT_DIR, *ar puts about_verbose_mode if ENV['DEBUG_PUPPET_DOCS_RAKEFILE'] - verbose_mode = '--verbose | tee puppet-docs-build.log' + verbose_mode = '--verbose --trace | tee puppet-docs-build.log' end amended_config = "#{SOURCE_DIR}/_config_amended.yml" @@ -216,7 +216,7 @@ task :generate do Rake::Task['externalsources:clean'].invoke # The opposite of externalsources:link. Delete all symlinks in the source. Rake::Task['externalsources:clean'].reenable - Rake::Task['generate_redirects'].invoke + # Rake::Task['generate_redirects'].invoke if @config_data['preview'].class == Array && @config_data['preview'].length > 0 puts "THIS IS A PREVIEW VERSION, AND IT'S MISSING IMPORTANT STUFF. Do not deploy the site in this state; this is for local viewing only. To build a real version of the site, delete the `preview:` key from _config.yml." diff --git a/config.ru b/config.ru index 09799896e..eab5576de 100644 --- a/config.ru +++ b/config.ru @@ -30,7 +30,11 @@ module Rack return entity_not_found(path_info) end - def list_path + def list_path(env = @env, path = @path, path_info = @path_info, script_name = @script_name) + @env = env + @path = path + @path_info = path_info + @script_name = script_name @stat = ::File.stat(@path) if @stat.readable? @@ -41,7 +45,7 @@ module Rack @env['PATH_INFO'] = @env['PATH_INFO'].sub(/\/?$/, '/index.html') return @app.call(@env) else - return list_directory + return list_directory(@path_info, @path, @script_name) end end else @@ -49,7 +53,7 @@ module Rack end rescue Errno::ENOENT, Errno::ELOOP - return entity_not_found + return entity_not_found(@path_info) end end diff --git a/source/_config.yml b/source/_config.yml index 2d3d4c6c7..c754e1557 100644 --- a/source/_config.yml +++ b/source/_config.yml @@ -34,7 +34,7 @@ defaultnav: # subdirectory: documentation # A subdirectory within the remote repository that contains the documentation files that we'll build and mount at the specified url. externalsources: /mcollective: - repo: git@github.com:choria-legacy/marionette-collective.git + repo: https://github.com/choria-legacy/marionette-collective.git commit: origin/2.12.x subdirectory: website @@ -92,7 +92,7 @@ documents: version: "latest" nav: ./_puppetdb_nav.html external_source: - repo: git://github.com/puppetlabs/puppetdb.git + repo: https://github.com/OpenVoxProject/openvoxdb commit: doc-latest subdirectory: documentation hide: true @@ -101,7 +101,7 @@ documents: version: "7" nav: ./_puppetdb_nav.html external_source: - repo: git://github.com/puppetlabs/puppetdb.git + repo: https://github.com/OpenVoxProject/openvoxdb commit: doc-7.y subdirectory: documentation hide: true @@ -110,7 +110,7 @@ documents: version: "6" nav: ./_puppetdb_nav.html external_source: - repo: git://github.com/puppetlabs/puppetdb.git + repo: https://github.com/OpenVoxProject/openvoxdb commit: doc-6.y subdirectory: documentation hide: true @@ -119,7 +119,7 @@ documents: version: "5.2" nav: ./_puppetdb_nav.html external_source: - repo: git://github.com/puppetlabs/puppetdb.git + repo: https://github.com/OpenVoxProject/openvoxdb commit: doc-5.2 subdirectory: documentation hide: true @@ -129,7 +129,7 @@ documents: doc: puppet version: "latest" nav: ./_puppet_toc.html - + # Puppet 6.y /puppet/6.y: doc: puppet diff --git a/source/_config_amended.yml b/source/_config_amended.yml new file mode 100644 index 000000000..5ba37ab59 --- /dev/null +++ b/source/_config_amended.yml @@ -0,0 +1,223 @@ +--- !ruby/hash:PuppetDocs::Config +highlighter: none +markdown: kramdown +kramdown: + input: GFM + hard_wrap: false +url: https://puppet.com/docs +safe: false +defaults: +- scope: + path: '' + values: + layout: default + toc_levels: '23' + nav: "/_includes/fallback_nav.html" +- scope: + path: background/ssl + values: + nav: "/_includes/background_ssl.html" +- scope: + path: security + values: + nav: "/security/_security_toc.html" +- scope: + path: community + values: + nav: "/_includes/community_nav.html" +- scope: + path: forge + values: + nav: "/_includes/forge.html" +- scope: + path: de + values: + nav: "/_includes/de_pe.html" +- scope: + path: es + values: + nav: "/_includes/es_docs.html" +- scope: + path: es/hiera + values: + nav: "/_includes/es_hiera1.html" +- scope: + path: es/learning + values: + nav: "/_includes/es_learning_nav.html" +- scope: + path: es/pe/3.8 + values: + nav: "/_includes/es_pe38.html" +- scope: + path: es/puppet + values: + nav: "/_includes/_es_fallback_nav.html" +- scope: + path: learning + values: + nav: "/_includes/learning_nav.html" +- scope: + path: mcollective + values: + nav: "/_includes/mcollective_menu.html" +- scope: + path: mcollective1.2 + values: + nav: "/_includes/mcollective_1.2.html" +- scope: + path: upgrade + values: + nav: "/upgrade/_upgrade_toc.html" +defaultnav: + "/background/ssl": "/_includes/background_ssl.html" + "/security": "/security/_security_toc.html" + "/community": "/_includes/community_nav.html" + "/forge": "/_includes/forge.html" + "/de": "/_includes/de_pe.html" + "/es": "/_includes/es_docs.html" + "/es/hiera": "/_includes/es_hiera1.html" + "/es/learning": "/_includes/es_learning_nav.html" + "/es/pe/3.8": "/_includes/es_pe38.html" + "/es/puppet": "/_includes/_es_fallback_nav.html" + "/learning": "/_includes/learning_nav.html" + "/mcollective": "/_includes/mcollective_menu.html" + "/mcollective1.2": "/_includes/mcollective_1.2.html" + "/upgrade": "/upgrade/_upgrade_toc.html" +externalsources: + "/mcollective": + repo: https://github.com/choria-legacy/marionette-collective.git + commit: origin/2.12.x + subdirectory: website + "/puppetdb/latest": &1 + repo: https://github.com/OpenVoxProject/openvoxdb + commit: doc-latest + subdirectory: documentation + "/puppetdb/7": &2 + repo: https://github.com/OpenVoxProject/openvoxdb + commit: doc-7.y + subdirectory: documentation + "/puppetdb/6": &3 + repo: https://github.com/OpenVoxProject/openvoxdb + commit: doc-6.y + subdirectory: documentation + "/puppetdb/5.2": &4 + repo: https://github.com/OpenVoxProject/openvoxdb + commit: doc-5.2 + subdirectory: documentation +document_names: + pe: Puppet Enterprise + puppet: Puppet + puppetserver: Puppet Server + puppetdb: PuppetDB + facter: Facter + pdk: Puppet Development Kit +documents: &5 + "/pdk/1.0": + doc: pdk + version: '1.0' + nav: "/pdk/1.0/_pdk_toc.html" + hide: true + base_url: "/pdk/1.0" + my_versions: + pdk: '1.0' + puppetdb: latest + puppet: latest + "/puppetdb/latest": + doc: puppetdb + version: latest + nav: "/puppetdb/latest/_puppetdb_nav.html" + external_source: *1 + hide: true + base_url: "/puppetdb/latest" + my_versions: + puppetdb: latest + pdk: '1.0' + puppet: latest + "/puppetdb/7": + doc: puppetdb + version: '7' + nav: "/puppetdb/7/_puppetdb_nav.html" + external_source: *2 + hide: true + base_url: "/puppetdb/7" + my_versions: + puppetdb: '7' + pdk: latest + puppet: latest + "/puppetdb/6": + doc: puppetdb + version: '6' + nav: "/puppetdb/6/_puppetdb_nav.html" + external_source: *3 + hide: true + base_url: "/puppetdb/6" + my_versions: + puppetdb: '6' + pdk: latest + puppet: latest + "/puppetdb/5.2": + doc: puppetdb + version: '5.2' + nav: "/puppetdb/5.2/_puppetdb_nav.html" + external_source: *4 + hide: true + base_url: "/puppetdb/5.2" + my_versions: + puppetdb: '5.2' + pdk: latest + puppet: latest + "/puppet/latest": + doc: puppet + version: latest + nav: "/puppet/latest/_puppet_toc.html" + base_url: "/puppet/latest" + my_versions: + puppet: latest + pdk: '1.0' + puppetdb: '7' + "/puppet/6.y": + doc: puppet + version: 6.y + nav: "/puppet/6.y/_puppet_toc.html" + base_url: "/puppet/6.y" + my_versions: + puppet: 6.y + pdk: latest + puppetdb: latest + "/puppet/6.19": + doc: puppet + version: '6.19' + nav: "/puppet/6.19/_puppet_toc.html" + base_url: "/puppet/6.19" + my_versions: + puppet: '6.19' + pdk: latest + puppetdb: latest +lock_latest: {} +document_version_index: + pdk: + '1.0': "/pdk/1.0" + latest: "/pdk/1.0" + puppetdb: + latest: "/puppetdb/7" + '7': "/puppetdb/7" + '6': "/puppetdb/6" + '5.2': "/puppetdb/5.2" + puppet: + latest: "/puppet/6.19" + 6.y: "/puppet/6.y" + '6.19': "/puppet/6.19" +document_version_order: + pdk: + - "/pdk/1.0" + puppetdb: + - "/puppetdb/7" + - "/puppetdb/6" + - "/puppetdb/5.2" + - "/puppetdb/latest" + puppet: + - "/puppet/6.19" + - "/puppet/6.y" + - "/puppet/latest" +document_list: *5 diff --git a/source/_layouts/default_bak.html b/source/_layouts/default_bak.html new file mode 100644 index 000000000..8637f8e61 --- /dev/null +++ b/source/_layouts/default_bak.html @@ -0,0 +1,99 @@ + + +
+ + + + + + ++