diff --git a/_data/suborgs/18F/usa_anchor.yml b/_data/suborgs/18F/usa_anchor.yml new file mode 100644 index 0000000..72b2b12 --- /dev/null +++ b/_data/suborgs/18F/usa_anchor.yml @@ -0,0 +1,5 @@ +site_email: 18F@gsa.gov +org_secondary: 18F +org_secondary_logo: 18f-logo-blue.svg +org_secondary_url: https://18f.gsa.gov +org_secondary_bio: "18F partners with agencies to improve the user experience of government services by helping them build and buy technology." diff --git a/_data/usa_anchor.yml b/_data/usa_anchor.yml index 699145b..d181b15 100644 --- a/_data/usa_anchor.yml +++ b/_data/usa_anchor.yml @@ -1,5 +1,4 @@ -site_name: 18F UX Guide -site_email: 18F@gsa.gov +site_email: tts-info@gsa.gov agency: U.S. General Services Administration agency_acronym: GSA agency_logo: gsa-logo-blue.svg @@ -8,10 +7,6 @@ agency_about_url: https://www.gsa.gov/about org_primary: Technology Transformation Services org_primary_url: https://www.gsa.gov/tts/ org_primary_bio: "As part of GSA’s Technology Transformation Services (TTS), we apply modern methodologies and technologies to improve the public’s experience with government. We help agencies make their services more accessible, efficient, and effective with modern applications, platforms, processes, personnel, and software solutions." -org_secondary: 18F -org_secondary_logo: 18f-logo-blue.svg -org_secondary_url: https://18f.gsa.gov -org_secondary_bio: "18F partners with agencies to improve the user experience of government services by helping them build and buy technology." foia_request_url: "https://www.gsa.gov/reference/freedom-of-information-act-foia" fraud_waste_abuse_url: "https://www.gsaig.gov/" no_fear_act_url: "https://www.gsa.gov/about-us/organization/office-of-civil-rights/notification-and-federal-employee-antidiscrimination-and-retaliation-act-of-2002" diff --git a/_plugins/override.rb b/_plugins/override.rb index 44929d7..4adc379 100644 --- a/_plugins/override.rb +++ b/_plugins/override.rb @@ -6,23 +6,29 @@ module Jekyll # Loads 18F/uswds-jekyll YAML config files in OVERRIDE_DIR, overriding any keys found in _data. class OverrideGenerator < Generator - OVERRIDE_DIR = '_data/override/' + OVERRIDE_DIR = File.join("_data", "override") + SUBORGS_DIR = File.join("_data", "suborgs") safe true def generate(site) yamls = ['header', 'navigation', 'footer', 'theme', 'usa_anchor'] yamls.each do |y| - self.merge(site, y) + if site.config['suborg'] + self.merge(site, File.join(SUBORGS_DIR, site.config['suborg']), y) + end + self.merge(site, OVERRIDE_DIR, y) end # TODO Address favicons.yml special case end - def merge(site, key) + def merge(site, dir, key) begin - customizations = YAML.load_file(OVERRIDE_DIR + key + '.yml') + path = File.join(dir, key + '.yml') + customizations = YAML.load_file(path) if customizations site.data[key].merge!(customizations) + puts " Merged " + path end rescue end diff --git a/override.yml b/override.yml index 0245aca..3999638 100644 --- a/override.yml +++ b/override.yml @@ -5,6 +5,8 @@ # - url # - github_info # - search_site_handle +# Optional keys +# - suborg title: Yet Another TTS Guide description: A set of guidelines and best practices @@ -20,4 +22,5 @@ github_info: # usually a good site handle. search_site_handle: yet-another-tts-guide -# This should not be merged into instantiatedsite +# Either 18F or unset +suborg: 18F