Commit Graph

98 Commits

Author SHA1 Message Date
Martin Taillefer 74e7ef56b1
Finish keyboard navigation for header & menu. (#3607) 2019-03-10 07:57:42 -07:00
Martin Taillefer 4d20265c5c
Bunch of site improvements. (#3601)
- Work on keyboard navigation support. It's not totally done yet,
but its a lot better than it's ever been.

- Fix incorrect font use for code blocks. They were coming out way
smaller than intended.

- Improve the HTML in a variety of ways to make it better for
screen readers.
2019-03-09 07:31:29 -08:00
mtail c4ea43e386 Tweak the menu display.
Use animation to bring the menu up, and support the ESC
key to hide it.
2019-03-06 18:18:26 -08:00
Martin Taillefer d093f22d0c
Bunch of structural improvements. (#3488)
- Make better use of html semantic elements to help
search & screen readers.

- Add or improve ARIA annotations for accessibility

- Improve print-time formatting.
2019-03-04 07:26:48 -08:00
Martin Taillefer 5a9f78e843
Add a fast language switcher button in preliminary mode. (#3464)
Also, when switching languages, the site now stays at the same page if possible.
This should help with translation work.
2019-03-02 17:39:32 -08:00
Martin Taillefer dd0ecdf9ab
Site improvements (#3430)
- Add linter support to detect internal links to aliases. Those are now flagged as
bad links so the source needs to be updated to point to the real destination,
avoiding the user a redirect.

- Fixed occurences of links to aliases.

- Now only load popper.js on pages that use popups in order to improve
load times.
2019-02-28 13:58:54 -08:00
mtail 748fe46dd3 Normalize search result CSS. 2019-02-28 02:20:52 -08:00
Martin Taillefer bedbc83da6
JavaScript cleanup. (#3427)
- Now that the scripts are loaded with 'defer', no need to trigger all
behavior via a DOMContentLoaded event handler as the scripts will all
naturally run after the DOM has been loaded.

- Use a considerably simpler approach to copy to the clipboard in code
blocks. This saves around 10K of script code believe it or not.
2019-02-28 01:38:52 -08:00
mtail 8f3a92c419 Improve page load time by better sequencing things. 2019-02-27 07:41:41 -08:00
Martin Taillefer 5ce2285a01
Script cleanup (#3372) 2019-02-25 07:19:06 -08:00
Martin Taillefer 19f40b74b7
Redo theming logic. (#3370)
This all got much simpler, more robust, and faster to load by using
CSS variables.
2019-02-24 11:15:17 -08:00
mtail 8103d1f6e1 Disable the Edit This Page functionality for generated files. 2019-02-23 12:54:27 -08:00
Martin Taillefer 0ef9135a83
Add some buttons in preliminary mode. (#3365)
- We now display an "Edit this Page" and a "Report Bugs" button on every page
when rendering the preliminary mode site.

- Optimized the SVG imagery for smaller size and thus faster download & parsing.
2019-02-23 08:34:21 -08:00
Martin Taillefer 591815c72f
Eliminate the use of bootstrap and jquery. (#3323)
This removes two very large dependencies which ends up making
each page load considerably faster, especially on mobile. Plus,
not using bootstrap actually made several things simpler throughout
the site's logic.
2019-02-21 09:40:10 -08:00
Martin Taillefer 5e788508a0
Add support for content to be rendered about the auto-generated content in list pages. (#3299) 2019-02-19 12:15:39 -08:00
Martin Taillefer 532fe7d365
Add an icon in the title area of glossary term popovers. (#3286) 2019-02-18 13:34:04 -08:00
Martin Taillefer 4fb531c106
Add a sticky effect on the glossary page. (#3283) 2019-02-18 09:10:46 -08:00
Martin Taillefer 2dac7e0ff3
Site infra cleanup. (#3281)
- Refactor script code into smaller more manageable files.

- Use consistent naming style in script code.

- Stop using Bootstrap's dropdowns and popovers in favor of custom implementation.
There are only a few uses of Bootstrap to purge before I can ditch
the dependency on the Bootstrap & JQuery libraries, which will speed
up page loads.

- Find a few more static strings that should come from the xlation
dictionary instead.
2019-02-18 07:35:37 -08:00
Martin Taillefer 0621b6edb7 Move pre-1.0 release notes into a subdirectory. (#3264) 2019-02-14 14:41:24 -08:00
mtail 0077232110 Fix style switching problem in the updated JavaScript. 2019-02-13 20:34:17 -08:00
Martin Taillefer e9112e7a65
More style cleanup. (#3230) 2019-02-11 21:07:03 -08:00
Martin Taillefer 141a2182c2
A bunch of infrastructure cleanup. (#3221)
- Switch from the Bootstrap grid system to the CSS grid. Much cleaner and faster.

- Add "See also" and "Links" to the list of translation strings

- Prevent the breadcrumb line from being included in the link endnotes when printing a page.

- Cleanup/rename several of the CSS and layout files for clarity.

- Switch the community page from using clumsy tables to a much cleaner approach
with shortcodes.

- Don't show buttons in the link endnotes when printing a page.

- Don't render the link endnotes section at all if the page has no links to include
2019-02-10 07:21:19 -08:00
Martin Taillefer c32db038ed
Introduce support for glossary term highlighting. (#3211)
- You can now mark a word as being a glossary term. This will trigger special rendering inviting the
user to click on the item in order to get a popup window showing the glossary text for the term. This
is very nice when introducing a new term within a page.

- Updated our dependency  on Bootstrap and ClipboardJS to the latest versions.
2019-02-08 07:29:38 -08:00
Martin Taillefer 4b22211317
Add breadcrumbs at the top of each content page. (#3093) 2019-01-16 09:46:52 -08:00
Martin Taillefer 3e0b27838f
Fix incorrect favicon dimensions. (#3091) 2019-01-15 13:34:42 -08:00
Martin Taillefer e4c547edc2
Use Hugo's errorf command instead of injecting magic error strings into the generated HTML. (#2922)
This produces better errors with source file & line info when shortcodes are misused by
markdown files.
2018-11-26 17:22:57 -08:00
mtail 1b9e81f771 Site improvements
- The release note index page is now rendered as a simple list rather than the normal gallery mode.

- Fix use of toc: front-matter, which should be skip_toc instead.
2018-10-31 07:15:57 -07:00
Martin Taillefer a2026aab5e
Clean up a bunch of loose ends (#2745) 2018-10-05 22:21:56 -07:00
Martin Taillefer 9540cd2d19
Site improvements. (#2742)
- Auto-generate tables of template->adapters and adapter->templates

- Make the "Edit this page on GitHub" menu option track the branch correctly instead of always pointing to master.

- Update the reference docs.
2018-10-05 11:15:26 -07:00
Martin Taillefer aec96f3233
Add support for logos in partner components (#2724)
* Add support for logos for partner components.

* Update reference docs.
2018-10-02 12:04:15 -07:00
mtail f204b6a9b9 Update reference docs. 2018-09-29 11:15:58 -07:00
Martin Taillefer 208760597b
Add support for partner components. (#2704)
Partner components (adapters not controlled by the Istio org) are now
called out as such on their page. Component authors have a chance to put
all sorts of info about their component to make it easy for customers
to find and use their component.
2018-09-28 15:40:10 -07:00
Martin Taillefer edfdf7d795
Site improvements. (#2663)
* Site improvements.

- For SVG images, authors no longer need to specify image ratios
(which is a constant source of errors)

- Move more icons into the new icons.svg file to further reduce
average page load times.

- Rationalize Istio logo file names.

- Improve underlining behavior for sidebar headers and the RSS feed
Subscribe link.

- Made the RSS feed subscribe link open in a new tab.

- Increase the constract ratio for some elements in dark mode
text blocks (namely, YAML field names)

- Reduce the "brightness" of the light bulb icon which helps it
not pop so much in dark mode.

- Optimize the fonts we load and the order we load them in so as to improve page load time and
reduce the initial render time.

* Sadly, embedding SVGs into the HTML results in duplicate element ids, which is invalid HTML :-(
2018-09-21 17:56:46 -07:00
Martin Taillefer 0a4264417f
Site improvements (#2633)
- Use a new approach to managing icons. This has two primary benefits:

  - It makes it possible to color the icons such that they look good in the
    dark theme. Previously, the icons were rendered in black on dark grey when
    using the dark theme.

  - The average payload size for our web pages is reduced and we better use the
    browser cache.

- The new icon approach makes it possible to remove our dependency on the fontawesome
  package, which further slims down our payload requirement

- Refresh our iconography for a slightly lighter look.

- Remove the extra thick left-hand border of text blocks to lighten the
look.

- Added a "NN minutes to read" indication on top of each page. This is
only displayed if the count is > 1 minute.

- Added a calendar icon next to the blog post date.

- Exposed a bunch of strings that were buried in CSS/JS to translation.

- Add the 'keywords:' front-matter fields to the Hugo archetypes.
2018-09-17 08:52:23 -07:00
Martin Taillefer cb58e4539e
Site improvements (#2555)
- Move some strings from the footer to the translation table so they can be translated.

- Use a custom search engine for the preliminary site, so the preliminary site can actually be searched.

- Improve a few shortcodes to improve how they work when nested in tabs.

- Move a few constants out of the layouts and into args.yml for cleanliness.
2018-09-07 09:38:40 -07:00
Martin Taillefer fdc9d56483
Use correct analytics id for normal/archive/preliminary versions of the site. (#2520) 2018-09-04 19:29:12 -07:00
Martin Taillefer 5e29d61ff2
Bunch of site fixes & improvements. (#2306)
- Correct the use of OpenGraph annotations. I used the wrong attribute name, so the
annotations were never recognized.

- Added support for Twitter cards to our site, improving the experience of referencing
the site from Twitter posts.

- Added support for the twitter: front matter field for use in blog posts. Specifying this
front-matter entry will show the author's twitter address on the blog post, and will
add a Twitter card entry to the page noting the author's address.

- Renamed the page_icon front matter field to just icon to be consistent with other
entries.

- Made it so the subtitle front matter field can be used anywhere, not just on blog posts.

- Added a lint check to ensure subtitles don't end with a period.

- We now insert an "author" metadata entry whenever the attribution: front matter
field is used.
2018-08-19 11:51:03 -07:00
Jimmy Song 0b2ea1d38e Enable extra lint stuff (#2158) 2018-08-06 09:43:31 -07:00
Martin Taillefer fd290dc73e
Improve linting (#2148)
- We now detect text blocks that are incorrectly indented.

- We now detect image captions that end in a period.

- We now detect page descriptions that don't end in a period.

- CircleCi now runs linting without minifying HTML first, improving perf and
improving error output.

- In CircleCi, we now have a per-build cache for HTML proofer output. This
helps reduce the frequency of link timeout errors.

- Fix errors flagged by the above new lint checks.
2018-08-04 08:44:06 -07:00
Martin Taillefer 5bd9c0f0bd
More work to fix use of the site in a subdirectory. (#2123) 2018-08-01 22:34:24 -07:00
Martin Taillefer 137e1d13f4
Make the site work when it's published to a subdirectory (for the archive) (#2095) 2018-07-31 16:06:36 -07:00
Martin Taillefer 9d56f3dbe7
Various design changes. (#1976)
- Increase the size of the Copy button in preformatted blocks to make it stand out since it is the
most common used button.

- Shift the copy/download/print buttons in PRE blocks towards the left so they don't overlap the
scroll bar in large text blocks.

- Switch to new fonts.

- Instead of underlining <H2> headers, we now draw a blue bar above them.

- Add an "up level" button at the top of pages.

- Streamline the appearance of the next/previous page links at the bottom of most pages.

- Remove the right pointing arrows from index pages and see also sections. They were just
confusing.

- Add icons to the main pages.

- Slightly change the layout of the glossary page, more to come here.
2018-07-26 06:14:32 -07:00
Martin Taillefer 072abae8ce
Improve name selection process for the new PRE block download feature. (#1693)
- If an explicit downloadas filename is not supplied in markdown, it is
now derived from the document title, with a proper extension based on the
content syntax.

- Made things work correctly for PRE blocks introduced with normal markdown
``` instead of our magic {{< text >}} sequences.
2018-07-06 18:59:46 -07:00
mtail 94ff6c9c44 Several translation-related improvements.
- Move common stuff for the landing page and search page from the content to the
layout such that the stuff only exists once instead of being cut & pasted into
each translation.

- Fixed the Chinese search page so it works and displays correctly.

- Correctly set the "lang" attribute on the <html> element to
reflect the correct language instead of being hardcoded to "en".
2018-06-13 22:02:37 -07:00
Martin Taillefer 9f3e980147
Add support for an auto-generated See Also section on every page. (#1364)
- We now automatically generate a See Also section on pages when possible.
The links are determined by a reverse index based on the keywords
assigned to each page in its front-matter.

- Do a pass to assign keywords to all our pages to populate the See Also
links.

- Leverage the keywords in the front-matter to generate a keyword metadata entry for each
generated page.
2018-06-11 15:07:32 -07:00
Martin Taillefer 1dcd301bd6
Introduce better linking support to github.com/istio/istio (#1443)
- Within a code block, you can now surround a relative file path with @@. This will
cause the path to be rendered as a link to raw.githubusercontent.com/istio/istio/<path>.
This lets the user click on the link to see the content of the file, which is mighty
handy.

- Updated all code blocks to take advantage of the above.

- Introduce support for {{< branch_name >}} which returns the source code branch
name associated with the current doc site.

- Use {{< branch_name >}} in all our references to content in istio/istio on GitHub. This thus
pins our references to the correct version of the content in GitHub. This prevents errors from
gradually appearing in our doc set as content in GitHub starts to diverge from the expectation
in the site content.
2018-06-06 08:21:18 -07:00
Martin Taillefer c389a3af38
Couple site fixes. (#1408)
- Get style switching working again.

- Don't show the Edit this Page option for the archived version of the site.
2018-06-01 06:16:21 -07:00
mtail 951a8ed9f4 Switch from Jekyll to Hugo. 2018-05-25 20:02:32 -07:00