Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8387edb
Fix index build
maquchizi Jun 3, 2017
9b92e01
[Chore] ignore jsonlines file
wcyn Jul 5, 2017
45e7e5f
Merge branch 'master' of https://github.com/OpenGazettes/OpenGazettes…
wcyn Jul 5, 2017
e21c811
[Chore] Add search examples to home page
wcyn Jul 5, 2017
7e6bbc6
[Chore] Fix other sources alignment
wcyn Jul 6, 2017
bf21419
[Chore] Fix color of search examples
wcyn Jul 6, 2017
fdc582b
[Chore] Delete KE gazette md files
wcyn Jul 7, 2017
17510a0
[Chore] Edit config files to have generic variables
wcyn Jul 7, 2017
9dc12ce
[Chore] Fix conflicts from nigeria branch. Add variables for country …
wcyn Jul 7, 2017
11186f0
[Chore] Change jurisdiction abbrev variable to jurisdition code
wcyn Jul 7, 2017
40a8e57
[Chore] Add jurisdiction vars to env. Use that in deploy.sh
wcyn Jul 7, 2017
527973d
[Chore] Replace hardcoded archive url in build with `juri` variable
wcyn Jul 7, 2017
df6fe13
[Chore] Move gazette source attribution to vconfig variables
wcyn Jul 10, 2017
acad750
[Chore] Set collection filename to more general name
wcyn Jul 10, 2017
bb96f3b
[Chore] Set collection filename to more general name
wcyn Jul 10, 2017
f58403f
Merge branch 'develop' of https://github.com/andela-wcyn/OpenGazettes…
wcyn Jul 10, 2017
457e672
Merge pull request #11 from andela-wcyn/develop
DavidLemayian Jul 10, 2017
fbc9f40
[Chore] Configured Nigeria branch with Nigeria Settings
wcyn Jul 11, 2017
28d61ab
[Chore] Update README and config.yml configurations
wcyn Jul 11, 2017
2a55fa3
[Chore] Change Google Analytics code
wcyn Jul 11, 2017
2e84924
[Chore] Add AfricanLii and cfNigeria logos
wcyn Jul 11, 2017
401bef9
[Chore] Update s3 yml to use env variable for s3 bucket
wcyn Jul 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
BUCKET="opengazettes.or.ke"
BUCKET="http://opengazettes.or.ng"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the bucket a URL? Let's also call this S3_BUCKET to be even more clear.

JURISDICTION=
JURISDICTION_CODE=
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ data.jsonlines
.env
.idea/
/gazettes_index.jsonlines
/.env
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The structure is simple. Each jurisdiction (country/province) and year has an en

To update this list from the production index:

curl https://s3-eu-west-1.amazonaws.com/cfa-opengazettes-ke/gazettes/data.jsonlines -O
curl https://s3-eu-west-1.amazonaws.com/cfa-opengazettes-ng/gazettes/gazettes_index.jsonlines -O
python bin/build-index.py

# Deploying to S3
Expand Down
8 changes: 5 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ title: Open Gazettes Nigeria
email: gazettes@codeforafrica.org
url: http://opengazettes.or.ng
jurisdiction: Nigeria
jurisdiction_name: Nigerian
jurisdiction_abbrev: NG
jurisdiction_adjective: Nigerian
jurisdiction_code: NG
source_attribution: "Center for Research Libraries: Global Resource Network"
source_attribution_link: https://dds.crl.edu/crldelivery/27040
enforce_ssl: opengazettes.or.ng
baseurl:
description: Making Government Gazettes freely available.
Expand All @@ -37,7 +39,7 @@ defaults:
markdown: kramdown
exclude: [vendor]

google_analytics: UA-33350783-11
google_analytics: UA-100279361-3

aleph_url: https://opengazettes.co
s3_url: http://nigeria.opengazettes.co.s3-website-eu-west-1.amazonaws.com/
Expand Down
1 change: 0 additions & 1 deletion _data/failed_gazettes.json

This file was deleted.

1 change: 0 additions & 1 deletion _data/gazettes.json

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1957.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1958.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1959.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1960.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1961.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1962.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1963.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1964.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1967.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1968.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1969.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1970.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1971.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1973.md

This file was deleted.

7 changes: 0 additions & 7 deletions _gazettes/NG/1974.md

This file was deleted.

6 changes: 0 additions & 6 deletions _gazettes/NG/index.md

This file was deleted.

5 changes: 3 additions & 2 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h2>{{ site.title }}</h2>
<p>{{ site.description }}</p>
<p class="footer-govprinters">
Gazettes from the <a href="https://dds.crl.edu/crldelivery/27040" target="_blank" rel="noopener">Center for Research Libraries: Global Resource Network</a>.
Gazettes from <a href="{{ site.source_attribution_link }}" target="_blank" rel="noopener">{{ site.source_attribution }}</a>.
</p>

<div class="row">
Expand Down Expand Up @@ -36,10 +36,11 @@ <h2>{{ site.title }}</h2>
<p>Who is a part of the <a href="https://twitter.com/hashtag/GazetteLiberation">#GazetteLiberation</a> campaign?</p>
</div>
<div class="col-sm-10">
<a href="https://codeforkenya.org" target="_blank"><img src="{{ "/img/logos/cfkenya.png" | prepend: site.baseurl }}" class="logo" alt="Code for Kenya"></a>
<a href="https://codefornigeria.org" target="_blank"><img src="{{ "/img/logos/cfNigeria.png" | prepend: site.baseurl }}" class="logo" alt="Code for {{ site.jurisdiction }}"></a>
<a href="https://openup.org.za" target="_blank" rel="noopener"><img src="{{ "/img/logos/openup.svg" | prepend: site.baseurl }}" class="logo" alt="OpenUpZA"></a>
<a href="https://codeforafrica.org/" target="_blank"><img src="{{ "/img/logos/cfafrica.png" | prepend: site.baseurl }}" class="logo" alt="Code for Africa"></a>
<a href="https://investigativecenters.org/" target="_blank"><img src="{{ "/img/logos/ancir.png" | prepend: site.baseurl }}" class="logo" alt="ANCIR"></a>
<a href="https://www.africanlii.org/" target="_blank"><img src="{{ "/img/logos/africanlii.png" | prepend: site.baseurl }}" class="logo" alt="AfricanLii"></a>
</div>
</div>
</div> <!-- /.container -->
Expand Down
24 changes: 22 additions & 2 deletions _includes/search.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form method="GET" action="{{ site.aleph_url }}/documents" class="search-form">
{% if site.data.gazettes[site.jurisdiction_abbrev].search_collection %}
<input type="hidden" name="filter:collection_id" value="{{ site.data.gazettes[site.jurisdiction_abbrev].search_collection }}">
{% if site.data.gazettes[site.jurisdiction_code].search_collection %}
<input type="hidden" name="filter:collection_id" value="{{ site.data.gazettes[site.jurisdiction_code].search_collection }}">
{% endif %}
<div class="input-group">
<input type="text" class="form-control" placeholder="Search the gazettes..." autocomplete="off" name="q">
Expand All @@ -9,3 +9,23 @@
</span>
</div>
</form>
<p class="sample-searches">
Examples:
<!-- ngRepeat: sample in metadata.app.samples --><span ng-repeat="sample in metadata.app.samples">
<!-- ngIf: $last -->
<a href="{{ site.aleph_url }}/documents?q=Country">Country</a>
<!-- ngIf: !$last --><span ng-if="!$last">,</span><!-- end ngIf: !$last -->
</span><!-- end ngRepeat: sample in metadata.app.samples --><span ng-repeat="sample in metadata.app.samples">
<!-- ngIf: $last -->
<a href="{{ site.aleph_url }}/documents?q=&quot;issue of new land title deed&quot;">"issue of new land title deed"</a>
<!-- ngIf: !$last --><span ng-if="!$last">,</span><!-- end ngIf: !$last -->
</span><!-- end ngRepeat: sample in metadata.app.samples --><span ng-repeat="sample in metadata.app.samples">
<!-- ngIf: $last --><span ng-if="$last">or</span><!-- end ngIf: $last -->
<a href="{{ site.aleph_url }}/documents?q=&quot;appointment of a liquidator&quot;">"appointment of a liquidator"</a>
<!-- ngIf: !$last -->
</span><!-- end ngRepeat: sample in metadata.app.samples -->
,
or
<a href="{{ site.aleph_url }}/documents/sources">browse sources</a>
.
</p>
2 changes: 1 addition & 1 deletion _includes/year_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% assign years = site.data.gazettes[page.jurisdiction].years | reverse %}
{% for year in years %}
<li>
<a href="/gazettes/{{ site.jurisdiction_abbrev}}/{{ year }}" class="{% if page.year == year %} active {% endif %}">{{ year }}</a>
<a href="/gazettes/{{ site.jurisdiction_code}}/{{ year }}" class="{% if page.year == year %} active {% endif %}">{{ year }}</a>
</li>
{% endfor %}
</ul>
6 changes: 3 additions & 3 deletions _layouts/jurisdiction.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1 class="post-title">{{ page.title }}</h1>
<div class="row jurisdiction-stats">
{% assign years = site.data.gazettes[page.jurisdiction].years | reverse %}
{% for thisyear in years %}

<!--<div class="col-md-4">
<h2><a href="{{ thisyear }}">{{ thisyear }}</a>
<small>{{ site.data.gazettes.stats.counts[page.jurisdiction].available.year[thisyear] }} {% if site.data.gazettes.stats.counts[page.jurisdiction].available.year[thisyear] == 1 %}gazette{% else %}gazettes{% endif %}</small></h2>
Expand All @@ -35,13 +35,13 @@ <h2><a href="{{ thisyear }}">{{ thisyear }}</a></h2>
<!-- </div> -->
</div>


{% endfor %}
</div>

</div>

<div class="col-md-4">
<div class="col-sm-4">
{% include resources.html %}
</div>

Expand Down
4 changes: 3 additions & 1 deletion bin/build-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def build(gazettes, gazette, stats, juri):
iyear = int(year)
if 'archive_url' not in gazette:
gazette['archive_url'] = 'https://s3-eu-west-1.amazonaws.com/' \
'cfa-opengazettes-ng/gazettes/' + \
'cfa-opengazettes-' + juri.lower() + \
'/gazettes/' + \
gazette['files'][0]['path']

gazettes[juri]['gazettes'][year].append(gazette)
Expand All @@ -72,6 +73,7 @@ def build_options(gazettes, juri, stats, failed):
gazette = json.loads(line)

# Don't include gazette if it has an error

gazette_files = gazette.get('files')
if gazette_files:
if failed:
Expand Down
6 changes: 6 additions & 0 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ $navbar-border-radius: 0px;
"bootstrap",
"site"
;

.home {
.sample-searches a {
color: #f9adab;
}
}
6 changes: 3 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ bundle exec jekyll build
mkdir -p $DEPLOY_DIR
cp -a _site/. $DEPLOY_DIR

for file in $DEPLOY_DIR/gazettes/NG/*.html; do
if [ $file != "$DEPLOY_DIR/gazettes/NG/index.html" ];
for file in $DEPLOY_DIR/gazettes/$JURISDICTION_CODE/*.html; do
if [ $file != "$DEPLOY_DIR/gazettes/$JURISDICTION_CODE/index.html" ];
then
mv "$file" "$DEPLOY_DIR/gazettes/NG/`basename "$file" .html`"
mv "$file" "$DEPLOY_DIR/gazettes/$JURISDICTION_CODE/`basename "$file" .html`"
fi
done

Expand Down
Binary file added img/logos/africanlii.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logos/cfNigeria.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2>Search the Gazettes</h2>
<div class="col-sm-6 col-sm-offset-3">

<h2>{{ site.jurisdiction }} Gazettes</h2>
<a class="btn_p" href="/gazettes/{{ site.jurisdiction_abbrev }}/"><button class="gazettes_nav_btn btn_nat" name="button"><span class="btn_text">{{ site.jurisdiction_name }} Government Gazettes</span></button></a>
<a class="btn_p" href="/gazettes/{{ site.jurisdiction_code }}/"><button class="gazettes_nav_btn btn_nat" name="button"><span class="btn_text">{{ site.jurisdiction_adjective }} Government Gazettes</span></button></a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion s3_website.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
s3_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
s3_secret: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
s3_bucket: nigeria.opengazettes.co
s3_bucket: <%= ENV['S3_BUCKET'] %>

# set s3_token if using temporary credentials with a session token (eg: when assuming a role)
# s3_token: YOUR_AWS_S3_SESSION_TOKEN
Expand Down