Commit Graph

347 Commits

Author SHA1 Message Date
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
mtail 8db4fc5047 Fix $cat scanning to be more leniant 2018-07-12 16:45:41 -07:00
Martin Taillefer 8d43a50c8c
Add some cool arrows on section index pages and see also sections. (#1734) 2018-07-10 21:46:34 -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 3c1ef90cc7 Move the community page into the About section. (#1683) 2018-07-05 14:12:24 -04: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
mtail 0c11b76949 Use cards for See Also section 2018-06-30 19:22:12 -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 c5ca64e5f2
Improve how we render section index pages. (#1643)
Instead of using a boring flat list of pages, we now render
modern-looking cards for each subsection.
2018-06-29 20:53:00 -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
mtail b0ad14977f Add the framework for an operations guide.
Mark the troubleshooting guide as a draft to hide it. We'll delete it once
its contents have been scavanged.
2018-06-27 16:39:07 -07:00
mtail 329984475b A bit of refactoring to improve clarity. 2018-06-26 11:10:03 -07:00
mtail 4359e340c6 Speed up loading of community page by inlining images 2018-06-26 07:27:03 -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
mtail bfd7b70f4c Disallow web crawling of the prelim site. 2018-06-19 09:44:37 -07:00
Martin Taillefer 0d81a24dba
RSS Feed update (#1554)
- List items in reverse order of publication

- Fix the publication date format to match what the RSS spec says.

- Include <category> elements for each post, derived from any keywords specified in the post front-matter.
2018-06-19 09:33:53 -07:00
mtail c72a8257b8 TOC improvements.
- Make "See also" show up in the TOC.

- When inlining the TOC at the top of a page, surround it with a pair of <hr> tags to get a line on the screen

- Fix rendering bug with TOC when specific characters showed up in section titles.

- Fix extra indent in the TOC in certain cases.

- Rename "See Also" to "See also" to follow our naming guidelines.
2018-06-19 06:39:37 -07:00
mtail 3e6baa1915 Save a magic Netlify cookie to indicate language selection.
The value of the nf_lang cookie overrides the browser's Accept-Language
setting.
2018-06-16 22:31:13 -07:00
mtail 69d41816e0 Improve the gear menu.
Simplify the menu. We don't/can't list all old releases, it takes too much
room and overflows the screen on mobile. We now have a more useful set,
2018-06-16 17:38:50 -07:00
Martin Taillefer 5ce2c7bb2d
Bunch 'o fixes (#1529)
- Make "make serve" actually work.

- Eliminate superfluous "scroll left nav into view" button on screens that don't have a sidebar
(community & search result). Only matters on mobile.

- Fix unpleasant wrapping in the footer when on mobile.
2018-06-15 20:38:36 -07:00
mtail eb51302615 Update menu after renaming cn -> zh 2018-06-14 06:14:14 -07:00
mtail 76d6469251 More translation work.
- Add a language selection menu selection in the gear menu.

- Fix the Blog link in the top nav to use the proper trsanslated term and target page.
2018-06-13 23:30:40 -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
mtail 9e9bcb2d5d Make the infrastructure TOC stuff robust against incorrect HTML. 2018-06-11 14:59:05 -07:00
mtail 210cc87d6c Fix unindenting in manually generated TOCs. 2018-06-11 13:51:57 -07:00
mtail 7cc88d6306 Localize the header & footer. 2018-06-11 08:31:34 -07:00
mtail fb4fa9f307 Get some basic stuff setup to enable translation without crashing Hugo... 2018-06-09 21:07:08 -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 1ea444d9b3 Fix off-by-one error in new TOC logic, which was leading to bogus HTML. 2018-06-04 08:10:42 -07:00
Martin Taillefer 0af7fbd6c5
Add TOC to reference pages. (#1419)
I didn't realize the Hugo's TOC support features only work for markdown files.
Since our reference pages are HTML, none of these were getting TOCs. I now roll
my own TOC functionality in that case, to bring up back TOCs for our reference
pages.
2018-06-02 21:56:21 -07:00
mtail 4be9f2986a Get archived versions of the site working in the new Hugo world. 2018-06-02 11:21:42 -07:00
mtail a74010e01e Fix some out of date front-matter. 2018-06-01 10:58:38 -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
Martin Taillefer 3ceb085fb6
Release 0.8 (#1398)
* Experiment with page bundles to fix image location issues.

(cherry picked from commit 6da31e2)

* Turn image URls into absolute references so they work consistently with page URLS with or without a trailing /

(cherry picked from commit da42e92)

* Add FAQ section regarding naming port convention (#1393)

(cherry picked from commit 1811057)

* Another experiment for image links.

(cherry picked from commit 61a4a6a)

* Fix the table format in expression-language.md (#1396)

Add `|` to make the table correct and use `\` to escape the `|` character inside the table. Not sure if this is the right way to fix but the preview page looks good.

(cherry picked from commit e45ae98)

* Really fix formatting of expression table.

(cherry picked from commit abb4b52)

* Add svc to the spelling table.

(cherry picked from commit 525c626)
2018-05-31 13:34:24 -07:00
mtail f66eddc31b Fix a few formatting problems with the rate limiting doc. 2018-05-31 07:38:56 -07:00
mtail bf342e37ef Another fix for Edit This Page 2018-05-31 04:55:06 -07:00
mtail 11dd5e6386 Fix the Edit this Page menu selection. 2018-05-30 20:48:28 -07:00
Martin Taillefer ba0cf03b36 A number of visual improvements. (#1366)
- The privacy link in the footer is now actually visible and uses the same coloring as the rest of the
text in the footer.

- The gear menu in the top right now actually looks like a real menu instead of a panel of links. Highlights behave as expected and
visuals are cleaner.

- The :before hack to cause proper scrolling in the face of our header is now more selective. It's only applied to
header items instead of all items that have an id attribute. This is more surgical in nature and avoids
potential issues such as was worked around by a counter-hack for tables. The counter hack is no longer
needed.

- Don't show the Edit This Pages on GitHub menu items for pages that are generated outside of the main doc process
(reference pages mainly). This won't kick in until I regenerate the reference docs, at which point they'll
gain the 'generated' front-matter entry, which will trigger the removal of the menu item.

- Apply a number of script improvements suggested by my editor.
2018-05-29 21:07:13 -04: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
mtail 401989fba6 Shuffle content around for the Hugo migration. 2018-05-25 19:27:39 -07:00