Commit Graph

129 Commits

Author SHA1 Message Date
Martin Taillefer d0cf1e171e
Move English content to content/en as agreed in WG meeting. (#4789)
Once this goes in, I'll move content_zh to content/zh.
2019-08-14 15:45:31 -07:00
mtail 664bcb81af Remove extraneous linefeed that was leading to extra whitespace in the HTML. 2019-07-05 04:31:34 -07:00
Martin Taillefer 652e05159a
Upgrade to Hugo 0.55.5 (#4095) 2019-05-03 21:47:45 -07:00
Martin Taillefer 7e6a81bddc
Site improvements (#4048)
- Remove unnecessary ratio= attributes used with the image shortcode

- Make it so the gloss shortcode doesn't depend on the location of the glossary
within the content tree.

- Make it so the image shortcode understands languages. It will now look in the current
language's content tree, and then callback to the English tree if not found.

- Leverage the above to simplify the Chinese content and remove many absolute references from the
Chinese content to the English content.
2019-04-25 17:20:14 -07:00
Martin Taillefer 6487e2f399
Simplify release tracking. (#4018) 2019-04-22 20:32:10 -07:00
Martin Taillefer d458423cf4 Site improvements. (#4015)
- Substantially simplify logic that deals with releases & release notes.

- Make it easier to add a new release to the site. THere are fewer things to
change as the site infra can figure more stuff out on its own.

- Make it so release notes can be added in one language without require them
to be added in the other language.

- Replace the ugly "a new version is available" callout on older release note
pages with a popup that only shows up when you click on the download button.
2019-04-22 09:12:18 -07:00
Martin Taillefer 533a3efc0e
Merge from release-1.1 branch (#4012) 2019-04-20 08:16:09 -07:00
Martin Taillefer 2258d0b03b
Improve text blocks. (#3727)
- Add tests for the various text block features.

- Combine text_file and text_dynamic into text_import

- Add support for snippet extraction for text downloaded from a URL

- Add support for formatting output blocks in a different style for
content downloaded from a URL

- Report some errors when unable to fetch content from a URL.

- Fixed a few small bugs along the way.
2019-03-18 06:31:26 -07:00
Martin Taillefer 69830194de
Finish accessibility support in tab sets. (#3720) 2019-03-16 06:55:45 -07:00
Martin Taillefer 2a5108806b
Site improvements. (#3706)
- Added a test suite to test out the different compositions of
site features.

- Substantially improve the composability of site features
(callouts, tabs, text blocks, boilerplates, lists). You can
now more confidentally mix & match these in any combination
and have a pretty good chance it'll render correctly.
2019-03-15 09:53:58 -07:00
mtail 5c1c9ae630 Revert "Site improvements (#3696)"
This reverts commit e1ce0c36
2019-03-14 19:59:48 -07:00
Martin Taillefer e1ce0c3633 Site improvements (#3696)
- Add a test suite for various compositions of site features.

- Substantially improve composition of various site features to eliminate bad
interactions. It's not perfect yet, but it's much better. The one thing still
broken is "a text block inside a warning in a list in a tab". There's still
something funny going on there, but I have some ideas for later.

- Added a new linter check to detect misuse of https://preliminary.istio.io in docs,
and fixed one offending instance.
2019-03-14 17:20:38 -07:00
Martin Taillefer e76ecb4154
1.1 Release notes (#3558)
Note done yet, but need to update the place holder...
2019-03-13 22:30:31 -07:00
Martin Taillefer 1cc06a6e9c
Site improvements (#3677)
- Added call-to-action buttons in the 1.1 announcements. We can use the same
buttons in future release announcements.

- Fixed broken large warning icon on the 404 error page.

- Fix oerder of blog posts in the side bar.

- Add support to not expand @@ notations in text blocks and use
it for a text blocks that's currently triggering a build failure

- Fixed broken rendering of some text blocks when syntax coloring
is turned off via the menu.
2019-03-13 21:53:55 -07:00
Martin Taillefer 0a07eed302
Fix a few bugs in the boilerplate shortcode. (#3652) 2019-03-12 09:56:52 -07:00
Martin Taillefer 1e075ef7cd
Fix broken links (#3636)
- We haven't been checking external links for months now due to a script error
when someone added an option that didn't work as expected. I'm fixing a bunch
of resulting broken links. I can't turn on the link checker yet since there are
some bad links in reference docs which I have to address first.

- Add a bunch of links to yaml files in our code examples using the @@ syntax.
2019-03-11 22:05:18 -07:00
Martin Taillefer fc058032b1
Fix broken callouts. (#3612) 2019-03-10 11:53:09 -07:00
Martin Taillefer b67e5126b4
Fix tab problem. (#3614) 2019-03-10 10:55:57 -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 6c91598a01 Fix handling of next {{< text >}} inside of an indented {{< tip >}}. 2019-03-08 15:29:17 -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 7bf371365e
Optimize all our SVG files. (#3468) 2019-03-03 08:14:50 -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
Martin Taillefer c8306acddf
Add an error check for invalid paths in the image shortcode. (#3421) 2019-02-27 15:17:09 -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 959da91043
Infrastructure improvements. (#3306)
- Stop using Bootstrap's tab component.

- Improve the formatting of the hesder on mobile.
2019-02-20 06:41:40 -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 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 d6b3bfac56
Add support for {{< quote >}} (#3237) 2019-02-12 08:22:28 -08:00
mtail 8da1d3e8bc Update callout icons to be more in-line with our general style. 2019-02-11 21:42:05 -08:00
mtail e2aec3458e Improve the glossary popovers so they work better on mobile. 2019-02-10 20:36:25 -08:00
mtail efdae03b36 A few more fixes following the big cleanup. 2019-02-10 16:17:45 -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 4807e58d09
Fix rendering problem with indented tips, warnings, and ideas. (#3192) 2019-02-01 10:30:49 -08:00
Martin Taillefer dd782b3d12
Improve the looks of warnings, info blobs, and tips. (#3181) 2019-01-31 12:11:53 -08:00
Martin Taillefer d77ac74d81 Generalize handling of text blocks with <<EOF syntax. (#3136) 2019-01-24 17:17:18 -08:00
SataQiu c9bec145d2 fix figure style issue (#3039)
* fix figure style issue

* update layouts/shortcodes/image.html
2019-01-05 18:29:44 -08:00
Martin Taillefer 51f878a914
Simplify use of the image shortcode. (#3021)
- The width value now defaults to 100%, so it doesn't need to be specified explicitly
in many cases.

- The ratio value can now be computed automatically for PNG and JPG files, so it doesn't need
to be specified explicitly.
2019-01-03 07:46:55 -08:00
Martin Taillefer 1ca2020e42
Improve boilerplates so they can now contain shortcodes (#3019) 2019-01-02 17:42:56 -08:00
Martin Taillefer b22c30f127
Add support for boilerplate text. (#3005) 2018-12-23 07:46:24 -08:00
Martin Taillefer 777abf274a
Improve tab behavior. (#2923)
- Address rendering issue with text blocks nested in a tab that use
the magic @@ linking sequence.

- Made it so when selecting a tab in a particular tab set, other tabset
sharing the same cookie name on the current page will also switch to their
corresponding tab.
2018-11-27 07:25:15 -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
Martin Taillefer 06d546c52c
Fix some mishandling of path separators, leading to problems on Windows. (#2920) 2018-11-26 15:38:17 -08:00
Martin Taillefer 35b41b1e20
Compensate for a Hugo bug when running on Windows. (#2919) 2018-11-26 09:41:01 -08:00
Martin Taillefer 9cbb0db783
Clearly indicate which version of k8s we support. (#2786) 2018-10-19 12:53:12 -07:00
Martin Taillefer 9885a6c0e0
Move inline images to a more sane location. (#2748) 2018-10-06 06:50:16 -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 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
Vadim Eisenberg bb22b22308 Use kubectl with EOF instead of cat with pipe (#2620)
* handle kubectl create/apply -f - <<EOF

in the same way as "cat <<EOF | kubectl apply -f -"

* replace cat <<EOF | kubectl apply/create -f - with kubectl apply/create -f - <<EOF
2018-09-15 14:37:23 -07:00
Martin Taillefer 9f187ee64f Improve the release note link shortcode. (#2597)
- When displaying a "Changes" button, we now display a diff from the previous patch to the current
patch, instead of a diff from the base release to the current patch.

- Properly localize the release note buttons so these can be translated.
2018-09-12 10:47:45 -07:00
mtail 7032ed4904 Fix search.
I messed up the use of search engine ids.
2018-09-08 07:37:04 -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 815aaaa72e
Finish implementing tab support. (#2492)
- Support cookies. Tab setting are now remembered across page visits. Set it, and forget it.

- Fix problems with nested text blocks.
2018-09-01 08:59:39 -07:00
Martin Taillefer 99be6fd164
Add support for tabbed content. (#2484) 2018-08-31 08:13:21 -07:00
Martin Taillefer 77a5540c04
Upgrade to Hugo 0.48 (#2471)
Take advantage of the simplified template syntax introduced in 0.48
in a bunch of places.
2018-08-30 07:24:52 -07:00
Martin Taillefer 2796aca4ac
Add download, diff, and docs links to release notes. (#2441) 2018-08-28 13:07:27 -07:00
Martin Taillefer 7c34e8aaa1
Add 'Customers' and 'Partners' pages (#2266) 2018-08-27 07:27:38 -07:00
Martin Taillefer 94ccb1b08e
Fix mentions of specific releases (#2379)
- Remove the release-specific wording on the main release note page and on the docs page. This
ends up being hard to keep correct and not really useful.

- Add a full_version variable in args.yml which contains the 3 part release version
such as 1.0.1. When we release a new patch, we need to update this number in the current
release branch.

- Apply the full_version variable to the download button on the home page. It will now say "DOWNLOAD 1.0.1".
2018-08-25 05:59:39 -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
mtail 8db4fc5047 Fix $cat scanning to be more leniant 2018-07-12 16:45:41 -07:00
mtail 4bba186b81 Special case empty @@ in code blocks to be NOPs. 2018-07-10 12:15:21 -07:00
Martin Taillefer 3d511f5a70
Various site fixes. (#1701)
- Prevent See Also sections from showing up on index pages.

- Clean up and simplify some JavaScript & CSS.

- Set a height for the idea and warning icons in order to prevent
screen flicker when loading pages with these icons.
2018-07-08 17:12:12 -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
Martin Taillefer 69c04f6401
Create hidden links for the special @@ references. (#1686)
This gives us link checking for the @@ code block references.
2018-07-06 07:31:31 -07:00
Martin Taillefer 512fdb5b61
Add download & print buttons to all PRE blocks. (#1680)
Also, replaced the text in the Copy button with an icon instead.
2018-07-06 05:30:35 -07:00
Martin Taillefer 07ed229051
Simplify linking to GitHub content. (#1669)
- Add <github_file> <github_blob> and <github_tree> to make it simpler to link to the right
place on GitHub.

- Use these new sequences throughout the docs.

- Also, fix bad HTML generated for the TOC in certain cirsumstances.

- Fix extra blank line inserted at the bottom of indented code blocks.
2018-07-04 04:16:49 -07:00
Martin Taillefer 0541000be8
Switch from ``` to {{< text >}} to indicate text blocks. (#1644)
This fixes a number of cases of incorrect formatting of code blocks
throughout the site.
2018-06-30 07:11:21 -07:00
Martin Taillefer d818d4713b
A few rendering fixes. (#1626)
- Workaround the fact some of the styles for code blocks were being overriden by
Bootstrap.

- Align table indent and code indent so things look nicer.

- Fix missing "sidebar button" when on mobile in the help and about sections. I forgot to set a
variable to trigger the thing to be present in those cases.

- Improve footer layout for mobile.

- Get a nicer looking light bulb icon.
2018-06-29 06:52:07 -07:00
Martin Taillefer 5a1b090fbc
Improve handling for code blocks (#1580)
- Add the {{< text >}} shortcode as a way to declare code blocks. This shortcode
is intended to hide the subtleties around code blocks. More specifically, it
provides a transparent workaround for the Hugo bug around converting indented
code blocks with lines starting with dashes. It also deals with the special
formatting case we have around command-lines that start with `cat <<EOF`.

- Rename the {{< file_content >}} shortcode to {{< text_file >}} and the
{{< fetch_content >}} shortcode to {{< text_dynamic >}} for consistency in naming.
2018-06-28 06:29:27 -07:00
Martin Taillefer 8c0cb431ce
Add support for snippets and file content insertion. (#1567)
- You can now use {{< file_content >}} to pull in files from the doc repo
into generated documentation. If you include the `snippet` attribute, you can
pull in only pieces of the file instead. This makes it possible to annotate
scripts and yaml files and extract those annotated bits and pieces into the
docs. This should let us have fully tested examples which are then incorporated
into the docs

- The previous {{< file_content >}} feature that lets you dynamically pull
content from a URL has been renamed to {{< fetch_content >}} instead.
2018-06-21 09:56:22 -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
mtail a74010e01e Fix some out of date front-matter. 2018-06-01 10:58:38 -07:00
mtail 61a4a6a2ec Another experiment for image links. 2018-05-31 12:16:35 -07:00
mtail da42e92238 Turn image URls into absolute references so they work consistently with page URLS with or without a trailing / 2018-05-31 10:32:50 -07:00
mtail 76545ee3be Fix a few formatting problems with the rate limiting doc.
(cherry picked from commit f66eddc)
2018-05-31 07:42:35 -07:00
Martin Taillefer d0f8fddfbf
Cleanup (#1363)
- Remove some leftover toc:false front matter from a few pages. The site now generally
figures out automatically that a TOC is not necessary.

- Enable a Hugo feature that queries Git for a last modified date on files. As a result,
instead of having the site build date in the footer, we now have a "this page was last modified"
date.

- Move the landing page's content out of the layouts directory and into the content directory
where it belongs.

- Use Hugo shortcodes for our embedded icon imagery. And make those icons scale with the
font size rather than being fixed sizes.

- Enable support for emojis in our content. Just use 
and you'll get a sailboat for example.
2018-05-26 08:28:14 -07:00
mtail 951a8ed9f4 Switch from Jekyll to Hugo. 2018-05-25 20:02:32 -07:00