Skip to content

Commit b29bdb0

Browse files
committed
Simplify readme config scheme
1 parent ee9e660 commit b29bdb0

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

readme.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
$config = YAML.load File.open(CONFIG_PATH).read
77
$docs_dir = '_docs'
8-
$repo_url = $config['config']['repo_url']
9-
$raw_repo_url = $config['config']['raw_repo_url']
8+
$repo_url = $config['repo_url']
9+
$raw_repo_url = $config['raw_repo_url']
1010
$readme = []
1111

1212
class Render
@@ -64,7 +64,7 @@ def self.software_projects(software, options = {})
6464
end.map do |path|
6565
file_name, _, __ = Utils.split_project_path(path)
6666
project = (software['projects'] && software['projects'][file_name]) || {}
67-
if !$config['config']['ignore_projects'].include?(file_name) && !options[:pinned_only] || project['pinned']
67+
if !$config['ignored_projects'].include?(file_name) && !options[:pinned_only] || project['pinned']
6868
Render.project(path, project, options)
6969
end
7070
end

readme.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
config:
2-
docs_subdir: '_docs'
3-
raw_repo_url: 'https://raw.githubusercontent.com/marcinbiegun/creativecoding-sketches'
4-
repo_url: 'https://github.com/marcinbiegun/creativecoding-sketches'
5-
ignore_projects:
6-
- 'README.md'
1+
docs_subdir: '_docs'
2+
raw_repo_url: 'https://raw.githubusercontent.com/marcinbiegun/creativecoding-sketches'
3+
repo_url: 'https://github.com/marcinbiegun/creativecoding-sketches'
4+
ignored_projects:
5+
- 'README.md'
76

87
root:
98
text: |

0 commit comments

Comments
 (0)