-
+
diff --git a/_includes/screenshot.html b/_includes/screenshot.html
index 02a626f92..995be6090 100644
--- a/_includes/screenshot.html
+++ b/_includes/screenshot.html
@@ -7,4 +7,4 @@
source: The url of the image
caption: (optional) A caption that is displayed under the image.
-{% endcomment %}
{% if include.caption %}{{ include.caption }}
{% endif %}
\ No newline at end of file
+{% endcomment %}
{% if include.caption %}{{ include.caption }}
{% endif %}
\ No newline at end of file
diff --git a/_includes/title.html b/_includes/title.html
index c14a05e38..7669288bf 100644
--- a/_includes/title.html
+++ b/_includes/title.html
@@ -5,7 +5,12 @@
{% assign edit_path = edit_path | append: '#L' | append: source_line %}
{% endif %}
{% elsif page.path contains 'docs/' %}
- {% assign edit_path = site.github.repository_url | append: '/edit/master/' | append: page.path %}
+ {% if site.github.repository_url %}
+ {% assign repo_url = site.github.repository_url %}
+ {% else %}
+ {% assign repo_url = 'https://github.com/ev3dev/ev3dev.github.io' %}
+ {% endif %}
+ {% assign edit_path = repo_url | append: '/edit/master/' | append: page.path %}
{% elsif page.path contains 'news/' %}
{% assign show_news_link = 1 %}
{% endif %}
diff --git a/cibuild.sh b/cibuild.sh
new file mode 100755
index 000000000..ad436f960
--- /dev/null
+++ b/cibuild.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+set -e # halt script on error
+
+echo "Searching for BOMs -------------------------------"
+
+FOUND_BOM=false
+for filename in ./**/*.*; do
+ # Make sure that the file is UTF-8 so we don't search binary files or other encodings
+ CURRENT_FILE_ENCODING="`file --mime-encoding --brief "$filename"`"
+ if [ "$CURRENT_FILE_ENCODING" == "utf-8" ] && [ "`head -c 3 -- "$filename"`" == $'\xef\xbb\xbf' ]
+ then
+ # Make note of all the files that failed so we can see it in the Travis log
+ FOUND_BOM=true
+ echo "Found BOM in file $filename!"
+ fi
+done
+
+if [ $FOUND_BOM == true ]
+then
+ # We still want to run the other validation checks even if we found BOMs
+ echo "Checks failed! Jekyll can't handle BOMs. See above for list of problematic files."
+else
+ echo "Checks passed! No BOMs found."
+fi
+
+echo "Building site ------------------------------------"
+bundle exec jekyll build --trace
+
+echo "Validating HTML ----------------------------------"
+# We want to use the publish script so that we can implement other transformations in the future
+ruby publish.rb --no-fix-links --test 'htmlproof ./ --href-ignore /.*example\.com.*/ --check-html --ignore-script-embeds'
+
+# If the site build succeeded but we found BOMs, we want to fail the build
+if [ $FOUND_BOM == true ]
+then
+ exit 1
+fi
diff --git a/docs/drivers/brickpi-i2c-sensor.markdown b/docs/drivers/brickpi-i2c-sensor.markdown
index 523e7429b..a968ca302 100644
--- a/docs/drivers/brickpi-i2c-sensor.markdown
+++ b/docs/drivers/brickpi-i2c-sensor.markdown
@@ -21,7 +21,7 @@ the [lego-sensor class] which is where the useful stuff is. Follow the link
for more information.
[brickpi]: /docs/drivers/brickpi-ld
-[brickpi-in-port]: /docs/ports/brickpi-port
+[brickpi-in-port]: /docs/ports/brickpi-in-port
[list of supported sensors]: /docs/sensors#supported-sensors
[lego-sensor class]: ../lego-sensor-class
diff --git a/docs/drivers/ev3-analog-sensor.markdown b/docs/drivers/ev3-analog-sensor.markdown
index 12e138858..f42652681 100644
--- a/docs/drivers/ev3-analog-sensor.markdown
+++ b/docs/drivers/ev3-analog-sensor.markdown
@@ -15,6 +15,6 @@ You can find all of the the devices bound to this driver in the directory
[lego-sensor class] device, which is where all the really useful attributes
are.
-[lego-sensor class]: ../lego-sensor-class
-[supported sensors]: ../#supported-sensors
+[lego-sensor class]: /docs/drivers/lego-sensor-class
+[supported sensors]: /docs/sensors#supported-sensors
diff --git a/docs/drivers/legoev3-ports.markdown b/docs/drivers/legoev3-ports.markdown
index 670b990e9..01148c32a 100644
--- a/docs/drivers/legoev3-ports.markdown
+++ b/docs/drivers/legoev3-ports.markdown
@@ -22,6 +22,6 @@ to control the input port gpios directly.
device and gpios used by the port free to be controlled directly or used
by other drivers.
-[legoev3-input-port]: docs/ports/legoev3-input-port
-[legoev3-output-port]: docs/ports/legoev3-output-port
+[legoev3-input-port]: /docs/ports/legoev3-input-port
+[legoev3-output-port]: /docs/ports/legoev3-output-port
diff --git a/docs/drivers/nxt-i2c-sensor.markdown b/docs/drivers/nxt-i2c-sensor.markdown
index 0730e6c30..6de594ea3 100644
--- a/docs/drivers/nxt-i2c-sensor.markdown
+++ b/docs/drivers/nxt-i2c-sensor.markdown
@@ -28,6 +28,6 @@ You can find devices bound to this driver in the directory
`/sys/bus/i2c/drivers/nxt-i2c-sensor/`. However, these drivers provide a
[lego-sensor device], which is where all the really useful attributes are.
-[supported sensors]: ../#supported-sensors
-[lego-sensor device]: ../lego-sensor-class
+[supported sensors]: /docs/sensors#supported-sensors
+[lego-sensor device]: /docs/drivers/lego-sensor-class
diff --git a/docs/drivers/rcx-motor.markdown b/docs/drivers/rcx-motor.markdown
index ca521cccc..c6cc82e13 100644
--- a/docs/drivers/rcx-motor.markdown
+++ b/docs/drivers/rcx-motor.markdown
@@ -15,5 +15,5 @@ This device is loaded when an [legoev3-output-port] is set to `rcx-motor`
mode. It is not automatically detected.
[dc-motor]: ../dc-motor-class
-[legoev3-output-port]: docs/ports/legoev3-output-port
+[legoev3-output-port]: /docs/ports/legoev3-output-port
diff --git a/docs/index.html b/docs/index.html
index f7a431a9d..36b5fbaeb 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -40,23 +40,23 @@ Writing some software
available libraries that have been developed to simplify developing
with ev3dev. If you need to directly program against the ev3dev driver APIs, you can read our
info pages on the following topics:
-
-
+
+
Developing the ev3dev kernel
In an effort to make it as easy as possible for community members to help out with core software
@@ -64,4 +64,4 @@
Developing the ev3dev kernel
that contains information about the EV3 hardware, important devices, and the operating system itself.
If you are interested in working with the ev3dev source code, you'll also need to know how to
use our set of
ev3dev Developer Tools.
-
\ No newline at end of file
+
diff --git a/docs/kernel-hackers-notebook/ev3-adc.md b/docs/kernel-hackers-notebook/ev3-adc.md
index 2429cdc24..d595e0509 100644
--- a/docs/kernel-hackers-notebook/ev3-adc.md
+++ b/docs/kernel-hackers-notebook/ev3-adc.md
@@ -4,7 +4,7 @@ subtitle: Analog to Digital Converter
---
The EV3 uses a Texas Instruments ADS7957 chip. It is connected to the CPU via an
-[SPI](ev3-spi).
+[SPI](../ev3-spi).
## Essentials
@@ -102,7 +102,7 @@ The EV3 uses a Texas Instruments ADS7957 chip. It is connected to the CPU via an
| 15 |
- N/C |
+ | N/C |
Was motor current on pre-release hardware |
diff --git a/docs/kernel-hackers-notebook/ev3-buttons.md b/docs/kernel-hackers-notebook/ev3-buttons.md
index ff295e5f3..8338a0b30 100644
--- a/docs/kernel-hackers-notebook/ev3-buttons.md
+++ b/docs/kernel-hackers-notebook/ev3-buttons.md
@@ -44,4 +44,4 @@ The 6 buttons on the EV3 are connected to GPIOs.
## Device Driver
-We are using the existing [gpio-keys](https://github.com/ev3dev/ev3dev-kernel/blob/master/drivers/input/keyboard/gpio_keys.c) driver. This causes the buttons to function as regular keyboard keys. Key mapping is defined in [board-legoev3.c](https://github.com/ev3dev/ev3dev-kernel/blob/master/arch/arm/mach-davinci/board-legoev3.c).
\ No newline at end of file
+We are using the existing [gpio-keys](https://github.com/ev3dev/ev3dev-kernel/blob/ev3dev-jessie/drivers/input/keyboard/gpio_keys.c) driver. This causes the buttons to function as regular keyboard keys. Key mapping is defined in [board-legoev3.c](https://github.com/ev3dev/ev3dev-kernel/blob/ev3dev-jessie/arch/arm/mach-davinci/board-legoev3.c).
\ No newline at end of file
diff --git a/docs/kernel-hackers-notebook/ev3-fiq.md b/docs/kernel-hackers-notebook/ev3-fiq.md
index 3862e9644..613a3e5a1 100644
--- a/docs/kernel-hackers-notebook/ev3-fiq.md
+++ b/docs/kernel-hackers-notebook/ev3-fiq.md
@@ -17,7 +17,7 @@ You read the required reading, right? So you understand that the Linux kernel ha
To debug the code in the FIQ service routines, we need to change them to regular interrupts. On the AM1808 processor, interrupt channels 0 an 1 are reserved for the FIQs. The rest of the channels are for regular interrupts.
-The first step is to change the channels the interrupts are assigned to. This is done in [arch/arm/mach-davinci/da850.c](https://github.com/ev3dev/ev3dev-kernel/blob/master/arch/arm/mach-davinci/da850.c). Search for `FIQ` to find the relevant interrupts and change the priority to 2 or higher.
+The first step is to change the channels the interrupts are assigned to. This is done in [arch/arm/mach-davinci/da850.c](https://github.com/ev3dev/ev3dev-kernel/blob/ev3dev-jessie/arch/arm/mach-davinci/da850.c). Search for `FIQ` to find the relevant interrupts and change the priority to 2 or higher.
Now, when you recompile the kernel, they will operate as regular interrupts. There is code in place so that the `fiq_c_handler` routine is called back from the appropriate interrupts.
diff --git a/docs/kernel-hackers-notebook/ev3-i2c.md b/docs/kernel-hackers-notebook/ev3-i2c.md
index 2866c59d0..393d762f2 100644
--- a/docs/kernel-hackers-notebook/ev3-i2c.md
+++ b/docs/kernel-hackers-notebook/ev3-i2c.md
@@ -8,11 +8,11 @@ The [AM1808 SoC](../ev3-processor) has 2 hardware [Inter-Integrated Circuit][i2c
## Usage
-__I2C0__: [Boot EEPROM](../ev3-eeprom) @400kHz
+__I2C0__: [Boot EEPROM](../ev3-eeprom) @400kHz
__I2C1__: Not used/connected
-__[FIQ](../ev3-fiq) I2C__: Input ports 1-4 @10kHz
+__[FIQ](../ev3-fiq) I2C__: Input ports 1-4 @10kHz
## Device Drivers
diff --git a/docs/libraries.md b/docs/libraries.md
index a43dbe7b9..ab48d7a9e 100644
--- a/docs/libraries.md
+++ b/docs/libraries.md
@@ -20,8 +20,7 @@ that ensures that interface is almost identical for each, and they are being upd
enhanced regularly.
* Unified bindings:
- * [C++](https://github.com/ev3dev/ev3dev-lang/tree/develop/cpp)
- * [Lua](https://github.com/ev3dev/ev3dev-lang/tree/develop/lua)
+ * [C++](https://github.com/ddemidov/ev3dev-lang-cpp)
* [Node.js](https://github.com/wasabifan/ev3dev-lang-js)
* [Python](https://github.com/rhempel/ev3dev-lang-python)
diff --git a/docs/motors/index.md b/docs/motors/index.md
index 739f85c4b..6e45c6e29 100644
--- a/docs/motors/index.md
+++ b/docs/motors/index.md
@@ -114,7 +114,7 @@ a list? See issue [#424](https://github.com/ev3dev/ev3dev/issues/424).
[sensors]: /docs/sensors
[tachometer]: https://en.wikipedia.org/wiki/Tachometer
[incremental rotary encoder]: https://en.wikipedia.org/wiki/Rotary_encoder#Incremental_rotary_encoder
-[LEGO 8528]: http://www.bricklink.com/catalogItem.asp?S=8528-1
-[LEGO 8886]: http://www.bricklink.com/catalogItem.asp?S=8886-1
-[LEGO 8871]: http://www.bricklink.com/catalogItem.asp?S=8871-1
+[LEGO 8528]: http://shop.lego.com/en-US/Converter-Cables-for-LEGO-MINDSTORMS-NXT-8528
+[LEGO 8886]: http://shop.lego.com/en-US/LEGO-Power-Functions-Extension-Wire-8886
+[LEGO 8871]: http://shop.lego.com/en-US/LEGO-Power-Functions-Extension-Wire-20-8871
[EV3 Output Port Driver]: /docs/ports/legoev3-output-port
diff --git a/docs/tutorials/index.html b/docs/tutorials/index.html
index 23b5a223e..5d8776a96 100644
--- a/docs/tutorials/index.html
+++ b/docs/tutorials/index.html
@@ -7,7 +7,7 @@
{% for group in tutorials %}
{% if group.name != "" %}
-
+
{{ group.name }}
@@ -27,4 +27,4 @@
{% endif %}
{% endfor %}
-
\ No newline at end of file
+
diff --git a/javascripts/cards.js b/javascripts/cards.js
index 975e74969..0c69a154c 100644
--- a/javascripts/cards.js
+++ b/javascripts/cards.js
@@ -1,4 +1,4 @@
-$(document).ready(function () {
+$(document).ready(function () {
$('div[data-card-user]').each(function (i, element) {
var $cardDiv = $(element);
$.ajax('https://api.github.com/users/' + $cardDiv.data('card-user')).done(function (userData) {
diff --git a/javascripts/style-helpers.js b/javascripts/style-helpers.js
index b4ba05e1c..f3da21d32 100644
--- a/javascripts/style-helpers.js
+++ b/javascripts/style-helpers.js
@@ -1,4 +1,4 @@
-$(document).ready(function () {
+$(document).ready(function () {
// Make
s more visually separated
$('dl').addClass('dl-horizontal');
$('#markdown-toc').wrap('');
diff --git a/projects/index.html b/projects/index.html
index 81403dee3..06f5b49b5 100644
--- a/projects/index.html
+++ b/projects/index.html
@@ -16,25 +16,25 @@
{% for post in site.posts %}
- {% if post.categories contains "projects" %}
- {% unless post.id == '/projects/2014/03/21/Example-Project' %}
- {% assign num_words = 60 %}
-
+ {% if post.categories contains "projects" %}
+ {% unless post.id == '/projects/2014/03/21/Example-Project' %}
+ {% assign num_words = 60 %}
+
{% if post.youtube_video_id %}
- {% assign num_words = 35 %}
-
-
-
+ {% assign num_words = 35 %}
+
+
+
{% endif %}
{{ post.title }}
-
{{ post.excerpt | truncatewords: num_words }}
-
Learn more
+
{{ post.excerpt | strip_html | truncatewords: num_words }}
+
Learn more
-
- {% endunless %}
- {% endif %}
+
+ {% endunless %}
+ {% endif %}
{% endfor %}
\ No newline at end of file
diff --git a/publish.rb b/publish.rb
old mode 100755
new mode 100644
index 78831e7d2..9313060b2
--- a/publish.rb
+++ b/publish.rb
@@ -5,7 +5,7 @@
# This script publishes the ev3dev website to the gh-pages branch of your
# personal fork. This allows you to share a preview of your changes with others.
#
-# Usage: ./publish.rb { | | --test '' }
+# Usage: ./publish.rb { | } [ --test '' ] [ --no-fix-links ]
#
# is your github user name. This is short for
# "git@github.com:/ev3dev.github.io.git"
@@ -17,13 +17,16 @@
# --test '' will run in a shell and return the result. The
# working directory will be a temporary directory containing the fixed up files.
#
-# Use BASENAME environment variable to override basename. Use "@TMP@" as a
-# placeholder for the temporary directory that is created.
+# --no-fix-links will prevent modification of links in anchor and img elements.
+#
+# Use BASENAME environment variable to override basename. Use "@FULL_PATH@" as a
+# placeholder for the full path to the temporary directory that is created.
require 'tmpdir'
-if ARGV.count != 1 or ARGV[0] == "--test" and ARGV.count != 2
- STDERR.puts "Usage: ./publish.rb { | --test '' }"
+# TODO: We shou;d use a real parser library. This has many ways it could go wrong.
+if ARGV.count < 1 or ARGV.include? '--test' && ARGV[ARGV.index('--test') + 1].nil?
+ STDERR.puts "Usage: ./publish.rb { | } [ --test '' ] [ --no-fix-links ]"
exit(1)
end
@@ -32,7 +35,7 @@
Dir.chdir tmp
system "git init"
- if ARGV[0] != "--test"
+ unless ARGV.include? "--test"
git_url = ARGV[0]
if not git_url.include? "/"
git_url = "git@github.com:#{ARGV[0]}/ev3dev.github.io.git"
@@ -51,36 +54,41 @@
# having cname sends you annoying email
FileUtils.rm 'CNAME'
- # prepend ev3dev.github.io to all root-relative urls
- basename = ENV['BASENAME'] || "/ev3dev.github.io"
- basename = basename.gsub(/@TMP@/, tmp)
system "git add ."
- file_names = `git ls-files | grep '.html$'`
- file_names.each_line do |file_name|
- file_name = file_name.strip
- text = File.read(file_name)
- new_contents = text.gsub(/(href|src)="\//, "\\1=\"#{basename}/")
- File.open(file_name, "w") { |file| file.puts new_contents }
- end
- # Do the same thing for seach files
- file_name = 'javascripts/search.js'
- text = File.read(file_name)
- new_contents = text.gsub(/(\/search-index.json)/, "#{basename}\\1")
- File.open(file_name, "w") { |file| file.puts new_contents }
+ unless ARGV.include? "--no-fix-links"
- file_name = 'search-index.json'
- text = File.read(file_name)
- new_contents = text.gsub(/("href"\s*:\s*")\//, "\\1#{basename}/")
- File.open(file_name, "w") { |file| file.puts new_contents }
+ # prepend ev3dev.github.io to all root-relative urls
+ basename = ENV['BASENAME'] || "/ev3dev.github.io"
+ basename = basename.gsub(/@FULL_PATH@/, tmp)
+
+ file_names = `git ls-files | grep '.html$'`
+ file_names.each_line do |file_name|
+ file_name = file_name.strip
+ text = File.read(file_name)
+ new_contents = text.gsub(/(href|src)="\//, "\\1=\"#{basename}/")
+ File.open(file_name, "w") { |file| file.puts new_contents }
+ end
- if git_url
+ # Do the same thing for seach files
+ file_name = 'javascripts/search.js'
+ text = File.read(file_name)
+ new_contents = text.gsub(/(\/search-index.json)/, "#{basename}\\1")
+ File.open(file_name, "w") { |file| file.puts new_contents }
+
+ file_name = 'search-index.json'
+ text = File.read(file_name)
+ new_contents = text.gsub(/("href"\s*:\s*")\//, "\\1#{basename}/")
+ File.open(file_name, "w") { |file| file.puts new_contents }
+ end
+
+ if ARGV.include? '--test'
+ # run test command
+ exit(system ARGV[ARGV.index('--test') + 1])
+ elsif git_url
system "git add ."
message = "Site updated at #{Time.now.utc}"
system "git commit -m #{message.inspect}"
- system "git push origin master:refs/heads/gh-pages --force"
- else
- # run test command
- exit(system ARGV[1])
+ system "git push origin master:refs/heads/gh-pages --force"
end
end
diff --git a/stylesheets/bootstrap-extensions.css b/stylesheets/bootstrap-extensions.css
index 5285e40dd..671668c6c 100644
--- a/stylesheets/bootstrap-extensions.css
+++ b/stylesheets/bootstrap-extensions.css
@@ -1,4 +1,4 @@
-#brand-logo {
+#brand-logo {
height: calc(100% + 8px);
margin-top: -4px;
}
diff --git a/stylesheets/infrastructure-utils.css b/stylesheets/infrastructure-utils.css
index 95077ab1a..f65a75f1c 100644
--- a/stylesheets/infrastructure-utils.css
+++ b/stylesheets/infrastructure-utils.css
@@ -1,4 +1,4 @@
-#search-input {
+#search-input {
width: 130px;
}