Git Product home page Git Product logo

pulumi-hugo's Introduction

pulumi-hugo

This repository was archived on Thursday, May 16 2024, and its contents were moved to the pulumi/docs repository. Going forward all contributions will need to be made there in order to get published to our site.

How to migrate PRs to the pulumi/docs repo

If you still have open pull requests here that you still intend to merge, here are the steps to follow in order to move them over to the docs repository. You will need to copy over your files to the docs repo and place them in the new directory location. The directory structure has a slight change, everything under themes/default can be found under the root dir of the docs repo. For example, if you had a blog post located here under themes/default/content/blog/my-cool-blog, you will need to relocate it under content/blog/my-cool-blog in the docs repo.

Steps:

  1. Clone the docs repo if you haven't done so already.
  2. Create a new branch in the docs repository.
  3. Copy the files you changed/added to the docs repo. The directory structure is similar to how this repo was configured, except everything under themes/default has been moved to the root. For example, if you have a blog under themes/default/content/blog/my-cool-blog, you will need to relocate it under content/blog/my-cool-blog in the docs repo.
  4. Run make ensure in the docs repo and then a make serve to verify the files have been moved correctly.
  5. Push changes to the docs repo.
  6. Open a PR in the docs repo to add the changes there.

A Hugo module containing content and layouts used on pulumi.com, including hand-authored docs, the Pulumi blog, and Learn Pulumi.

This repository is consumed by https://github.com/pulumi/docs to produce the website you see at https://pulumi.com. If you're interested in contributing some docs or a blog post at https://pulumi.com/blog, you've come to the right place! πŸ™Œ

Contributing

First, be sure to read our contributing guide and review our code of conduct.

Toolchain

We build the Pulumi website statically with Hugo, manage our Node.js dependencies with Yarn, and write most of our documentation in Markdown. Below is a list of the tools you'll need to run the website locally:

VS Code devcontainer

Open in GitHub Codespaces

Alternatively you can select from the following:

  1. Click 'Open in Github Codespaces' to develop remotely in Github Codespaces from your browser, or via your local VSCode IDE connected to Github Codespaces.
  2. Use the devcontainer environment included in this repo locally with your own VSCode + Docker environment. To do so, open this folder in VSCode and run the Remote-Containers: Reopen in container command in the command palette.

Within the container you can run the various make commands explained below. Port 1313 is forwarded into the container so you can use your normal browser to access the results of make serve or make serve-all at http://localhost:1313.

Installing prerequisites

Run make ensure to check for the appropriate tools and versions and install any dependencies. The script will let you know if you're missing anything important.

make ensure

Running Hugo locally

Once you've run make ensure successfully, you're ready to run the development server. If you're only planning on writing Markdown or working with Hugo layouts, this command should be all you need:

make serve

If you are planning on making CSS or JS changes you will need to run:

make serve-all

You can browse the development server at http://localhost:1313, and any changes you make to content or layouts should be reloaded automatically.

Linting and formatting

To check your code and your Markdown files for issues before submitting, run:

make lint

This repo uses Prettier for code formatting, to keep styling + formatting issues aligned without the need to be reviewed in PRs. To see what files have formatting diffs, you can run make format from the project root, which will update all files to conform to our formatting standards. To check the diffs without fixing them, a check runs as part of make lint.

Prettier is easiest to use when you run it automatically on save in your editor - see the docs here: https://prettier.io/docs/en/editors.html. If you set your editor to format on save, you should be staying aligned with formatting without needing to run any of the above commands.

Tidying up

To clear away any module caches or build artifacts, run:

make clean

About this repository

This repository is a Hugo module that doubles as a development server. It does not contain every page of the Pulumi website, because most of those pages (e.g., those comprising our CLI and SDK docs) are generated from source code, so they aren't meant to be edited by humans directly.

Because of this, many of the links you follow when browsing around on the development server (to paths underneath /registry or /docs/reference, for example) will fail to resolve because they originate from another repository β€” most likely https://github.com/pulumi/registry or https://github.com/pulumi/docs. When we build the Pulumi website, we merge this module along with any others into a single build artifact, but when you're working within an individual module like this one, you may find you're unable to reach certain pages or verify the links you may want to make to them.

If you want to link to a page that exists on https://pulumi.com but not in this repository, use the page's path starting at the root in a Markdown or HTML link. For example, in a Markdown file, to link to the Digital Ocean Droplet page (a page that doesn't exist in this repository, but that would exist in an integration build), you'd use:

[Digital Ocean Droplet](/registry/packages/digitalocean/api-docs/droplet/)

What's in this repo

  • All hand-authored content and documentation, including top-level pages, guides, blog posts, and some tutorials
  • Most Hugo module components, including archetypes, layouts, partials, shortcodes, data, etc.
  • All the SCSS, TS, and Stencil files used to build our CSS/JSS assets.

You'll find all of these files in themes/default.

What's not in this repo

Merging and releasing

When a pull request is merged into the master branch of this repository, the content of the pull request isn't published immediately. Instead, it's published at some point later, typically as a result of an hourly GitHub Actions job in pulumi/docs that checks this repository and others for new content. When that job (which runs every 15 minutes) finds new content to be published, it creates a new pull request (or updates an existing one) on pulumi/docs, builds and tests a full site preview, and merges that pull request automatically after the tests pass, triggering the website to be republished.

The typical timeline looks something like this:

  • 8:59 AM: A PR is merged into pulumi-hugo master.
  • 9:00 AM: The Scheduled Jobs: Update Hugo modules workflow runs in pulumi/docs.
  • 9:02 AM: The workflow detects the newly merged pulumi-hugo content and generates a new PR on pulumi/docs.
  • 9:08 AM: The pulumi/docs PR build completes and is automatically merged into master, triggering a redeployment of pulumi.com.
  • 9:18 AM: The new content is live.

In other words, it generally takes between 15 and 30 minutes for a change merged into this repository to appear on pulumi.com. Note, however, that despite that we schedule the module-update job to run every 15 minutes, GitHub doesn't guarantee that this happens precisely on time; delays of up to several minutes are unfortunately fairly common.

If having more direct control over release timing is important, you can opt to trigger the module-update job manually to save some time. To do that, navigate to the workflow and choose Run Workflow to kick it off immediately:

image

The behavior in this case is no different than if you'd allowed the job to run on its own, and once it completes, the remaining steps will complete in the usual way.

Blogging

Interested in writing a blog post? See the blogging README for details.

Search

We use Algolia for search, and we update the Algolia search index on every deployment of the website. Whether you're adding a new page or updating an existing one, your changes will be reflected in search results within a few seconds of release.

Creating findable content

We currently index every page of the website, including the blog and the Registry. However, we do not index all of the content of every page β€” we only index certain properties of the page. These include:

  • Page titles (specifically the title and h1 frontmatter params)
  • Page descriptions (specifically the meta_desc param)
  • Second-level headings (e.g., those prefixed with ## in Markdown files)
  • Keywords, if any (via the search.keywords param)
  • Authors, if any (via the authors param)
  • Tags, if any (via the tags param)

Because of this, it's important to be thoughtful about the terms you use for these fields, especially titles, keywords, descriptions, and H2 headings. If you want your content to be findable by specific terms, you must make sure those terms exist in one or more of the fields listed above.

For example, if you were writing a guide to building an ETL pipeline with Redshift, and you wanted to make sure the page would be surfaced for queries like redshift data warehouse etl, you might construct the page's frontmatter in the following way:

title: Build an ETL pipeline with Redshift and AWS Glue
meta_desc: Learn how to combine AWS Glue and Amazon Redshift to build a fully-automated ETL pipeline with Pulumi.
search:
    keywords:
        - data warehouse

In this case, the optional search.keywords field is included to cover the terms data warehouse, as those terms don't exist in the page's title or description. If it weren't, queries for data warehouse would fail to match this particular page.

Certain fields also rank higher than others in terms of their overall relevance. (Titles and keywords, for example, are considered more relevant than descriptions.) For a full list of these rankings, along with all of the rules we apply to the search index, see the search app in pulumi/docs.

Keeping pages out of search results

To keep a page from showing up in search results (including on Google, etc.), use the block_external_search_index frontmatter parameter:

title: My page
...
block_external_search_index: true

Style Guide

We try and align Pulumi documentation to the Pulumi Docs Style Guide.

Shortcodes and web components

We use number of Hugo shortcodes and web components in our pages. You can read more about many of them in the components README.

pulumi-hugo's People

Contributors

aaronkao avatar arunkumar611 avatar cleverguy25 avatar cnunciato avatar desteves avatar evanboyle avatar frassle avatar gthuang avatar interurban avatar joeduffy avatar justinvp avatar lblackstone avatar lukehoban avatar meagancojocar avatar metral avatar mikhailshilkov avatar mnlumi avatar nimbinatus avatar praneetloke avatar pulumi-bot avatar saradph avatar scottslowe avatar sean1588 avatar shughes26 avatar spara avatar stack72 avatar susanev avatar toriancrane avatar usrbinkat avatar zchase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pulumi-hugo's Issues

Kubernetes context config out of order

Problem description

When starting with the above begin guide for Kubernetes, near the bottom it tells you to configure Kubernetes first, which is the second link above. When setting up the cluster, and using context as I am you are asked to perform.

pulumi stack init new-kube-stack && pulumi config set kubernetes:context my-context

However, you haven't initialized a project yet and that command fails. The next page of getting started has you initialize a project at which point you can configure the context for the project.

Suggestions for a fix

Assuming my understanding above is correct, simply have the user initialize a project first and then explain how to configure Kubernetes for the stack. This would also make it more clear that a stack maps to a cluster initially I was under the impression I was configuring it globally but it certainly makes more sense for it to be a per-stack config.

Add an errors reference page

It would be helpful to have a page describing all (common) CLI and SDK errors, what they mean, and how to remediate them.

Create Infrastructure As Code landing page

Problem description

We are currently ranking on the second page of Google for the term "infrastructure as code" which is pointing to our homepage. We should create an a landing page for the term, i.e. https://pulumi.com/infrastructure-as-code.

cc// @joeduffy

Copy to clipboard button can overlap code snippets

The copy to clipboard button in the upper right corner of code snippets can overlap/hide the underlying code (especially one line snippets). You can scroll to the right to see the content, but we should consider a design tweak to avoid this.

Perhaps keep the button hidden by default, and have it quickly fade in when hovering over the snippet? Or move it outside the snippet box?

Issues on Pulumi with Kubernetes/go getting started

File: docs/get-started/kubernetes/modify-program.md

When trying Pulumi with go and Kubernetes (Minikube flavour), I faced 2 main issues:

  • pulumi config set isMinikube false/true did not seems to work and had no effect. It is always set to false. So the feType is always "Loadbalancer". I had to hardcode it.
  • Then I was not able to get the service clusterIP (wondering if it is already updated yet when retrieved by Pulumi), but I managed to get the service port which is provided in input : cf. https://github.com/scoulomb/myIaC/blob/master/pulumi/quickstart/main.go#L79

Is it a known issue?

Make multi-lang component resource docs discoverable on API Reference page

Problem description

As part of the new multi-language components support, packages like pulumi-eks, pulumi-awsx, etc. need API Reference documentation that is easily discoverable. Right now, the existing Crosswalk component reference docs can be found on the API Reference page under the Extension Packages subheading for TypeScript and JavaScript. It feels like they should be brought up a bit higher on the page to make them more discoverable and prominent on the page.

Suggestions for a fix

One suggestion is to create a new subheading titled "Crosswalk Packages" on the root API Reference index page under the Version Control subheading (as a sibling) and have links to the root pages for each package under that new subheading.

Another option would be to bring these helper libraries closer to their related cloud provider docs on the page and create a sub heading under each top-level heading (i.e. Core Providers -> Crosswalk Packages).

Add progress tracking to the top of Getting Started pages

Currently, progress in the Getting Started flow is tracked in the left-hand nav. We would like to understand if making a user's progress more visually prevalent will help decrease the drop off rate. By doing a better job of communicating progress to a user we can provide them with a better sense of what is next.

This change does clash with pulumi/docs#3226 so we will first need to determine if combining the first few steps is effective.

progress_tracker_example

improve top nav

design details

  • should be fully visible when at the top of the page
  • when you scroll down it does not stick and disappears when you scroll it off the page
  • if you ever scroll up it should appear again on top of any content
  • when it appears again it should have a soft animation so its not disruptive

example: https://wicky.nillia.ms/headroom.js/

The chat button on pulumi.com on 1/2 screen covers the cookie "Got it" button

Hi! πŸ‘‹

I'm unfortunate enough to prefer browsing the web with Chrome taking up 1/2 of a MacBook Pro 15" screen at 100 % zoom. This lets me find a surprising number of visual bugs all over the web πŸ˜„

Problem description

The chat button covers the cookie "Got it" button on all of pulumi.com when browsing the page on exactly half of a MacBook Pro 15" screen width (latest Chrome, 100 % zoom, window height doesn't matter):

image

The cookie consent/confirmation button is not clickable at all without resizing the window, even though it clearly peeks out behind the chat button. I believe this is because the chat widget is pretty wide:

image

Affected product version(s)

The version of the website deployed at the time of writing.

Suggestions for a fix

Dunno, to be honest πŸ€·β€β™‚ Make the chat widget only take up the width it needs, and/or push the "Got it" button slightly left, maybe?

Fire And Forget AcessDeniedException

File: docs/guides/crosswalk/aws/ecs.md

const api = new awsx.apigateway.API("hello-world-api", {
    routes: [{
        path: "/hello",
        method: "GET",
        eventHandler: async (req) => {
            // Anytime someone hits the /hello endpoint, schedule our task.
            const result = await helloTask.run({ cluster });
            return { statusCode: 200, body: "OK" };
        },
    }],
});

I got this error with thie line of code

{
    "errorType": "AccessDeniedException",
    "errorMessage": "User: arn:aws:sts::680928640442:assumed-role/trigger-buildfc45ff03-8a0677d/trigger-buildfc45ff03-ea7b647 is not authorized to perform: ecs:RunTask on resource: arn:aws:ecs:us-west-2:680928640442:task-definition/build-bitstream-aece9bcd:1",
    "code": "AccessDeniedException",
    "message": "User: arn:aws:sts::680928640442:assumed-role/trigger-buildfc45ff03-8a0677d/trigger-buildfc45ff03-ea7b647 is not authorized to perform: ecs:RunTask on resource: arn:aws:ecs:us-west-2:680928640442:task-definition/build-bitstream-aece9bcd:1",
    "time": "2020-04-07T02:46:20.519Z",
    "requestId": "68aa9b2f-e330-42c0-ad0c-ba127279b7b4",
    "statusCode": 400,
    "retryable": false,
    "retryDelay": 31.98567057234596,
    "stack": [
        "AccessDeniedException: User: arn:aws:sts::680928640442:assumed-role/trigger-buildfc45ff03-8a0677d/trigger-buildfc45ff03-ea7b647 is not authorized to perform: ecs:RunTask on resource: arn:aws:ecs:us-west-2:680928640442:task-definition/build-bitstream-aece9bcd:1",
        "    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:51:27)",
        "    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
        "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
        "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)",
        "    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
        "    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
        "    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
        "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
        "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)",
        "    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"
    ]
}

navigating to a docs search result hides heading behind top nav

Problem description

when a user interacts with a result in the search it sends them to the section, but the heading of the section they are getting sent to is hidden behind the top nav

docs-search-result-heading-hidden-behind-top-nav.mp4

Suggestions for a fix

when they are sent to a section with a heading the heading is visible and not hidden behind the top nav

Add reference architecture examples that mimic real projects

We should help people understand how to build more sophisticated solutions out of the building blocks.

This section probably needs much more thought and should be based on real customer projects.

Suggestions:

  • Here is how you take your React app, link it to ASP.NET backend with a Cosmos DB, and here's why you need Pulumi for that
  • Here is how you make a static web site with a serverless backend
  • Lots of pages for Kubernetes strugglers
  • Microservices, CQRS, Event Sourcing - less mess with Pulumi
  • Data-intensive and Machine learning scenarios

User Guide: Automation API

To accompany the launch of pulumi/pulumi#3901 (the Automation API), we want to publish a user guide (similar to the CrossGuard user guides 1 2). The guide will have a few components:

  • An overview and β€œfirst time usage” guide (for all 4 Pulumi languages) using the S3 static site example
    • The guide will show how to set up a hybrid program that can both be run via the pulumi CLI and as its own program using the Automation API, like this example
  • A concepts and terminology page
  • An API reference page that links to each language's API reference (we have all of these, but should link to them)
  • An examples page for links to both 1st-party and community-created examples
    • Note: some of our examples include debugging tips, which we should highlight
    • Consider adding an example: pulumi/pulumi#5381
  • FAQ and known issues page; including, but not limited to:

If we have time, it may also have:

  • A guide for using automation API specifically with the self-managed backend (P2)

Anchor links navigate to wrong part of page in resource docs

We have noticed navigating to an anchor link doesn't always take you to the right part of the page.

There are two scenarios we have discovered:

  1. Clicking on an anchor attempts to take you to the right spot, but the link is hidden by our top nav.

  2. Copying a link and opening in another tab takes you to the wrong place in the page altogether.

Blog should have search box

There's just so much in the blog that's absolutely great - and vital to get up and running in a productive way. Unfortunately, it's hard to find stuff in there sometimes, and it would be great to search.

I'm aware that the search function also searches blog content - but there is no searchbar in the blog itself. Could this be added?

Reconsider the current ToC layout

Our current ToC, especially in light of our recent API docs improvements, doesn't make the most impactful documentation as front as center as it should be. Further, it's fairly scattered.

For instance, if I want to learn about Pulumi's AWS support (or Azure, GCP, Kubernetes, etc) -- presumably the main pivot someone coming to our site -- there are many places to look:

  • Getting Started > AWS
  • Cloud Providers > AWS
  • Cloud Providers > AWS > AWS Setup (subtly buried)
  • Tutorials > AWS
  • User Guides > Crosswalk for AWS
  • API Reference > AWS (and there are actually two in here)

These are also separated vertically by quite a bit of distance in the ToC -- and our beautiful new provider docs are way down at the bottom, buried under the semi-boring "API Reference" heading.

An alternative approach would be to pivot around the cloud provider. For example:

  • AWS (was Cloud Providers > AWS)
  • AWS > Getting Started (was Getting Started > AWS)
  • AWS > Setup (was Cloud Providers > AWS > AWS Setup)
  • AWS > Tutorials (was Tutorials > AWS)
  • AWS > User Guide (was user Guides > Crosswalk for AWS)
  • AWS > Provider Reference (was API Reference > AWS)

This feels like it would significantly simplify overall navigation and also tighten up the left nav. Obviously, for clouds other than those four, we'd need an "Other Providers" catch-all section, but I assume we'd retain the overall structure beneath (getting started, setup, tutorials, reference, etc).

We do need to be careful that Getting Started doesn't suffer. The primary advantage to our current approach is that we really do make it easy and smooth to get up and running without getting lost.

docs updates for service saml sso improvements

Problem description

we need to update the docs related to the saml sso improvements

Suggestions for a fix

  • mention the reauth requirement, why it happens, what folks need to do to adjust it and what users need to do to move past it

Information does not apply to Azure Provider

Hello Team πŸ˜ŠπŸ‘‹
This was a bit confusing for us in the community. This example does not apply to the Azure provider as you have access to all regions regardless of the default region you define. Region is explicitly defined in each resources see 1️⃣ Example of VNet. See 2️⃣ for some context from community slack on the confusion. Took a bit of looking around but we were able to figure it out πŸ”. Any who hope some clarification can get added πŸ±β€πŸ.

File: docs/intro/concepts/resources.md

1️⃣ https://www.pulumi.com/docs/reference/pkg/azure/network/virtualnetwork/#example-usage
2️⃣ https://pulumi-community.slack.com/archives/C84L4E3N1/p1617124285065700

Revisit the content on the docs homepage

It's been a while since we looked closely at this content, so we should take another pass through it to make sure it's current, engaging, easily consumable (i.e., brief!) and well presented. Among the questions we should answer:

  • What is Pulumi?
  • Why real languages?
  • How is Pulumi declarative?

Note that we'll probably want to address this on conjunction with pulumi/docs#3488, since the end result will need to incorporate that as well.

GitLab CI pipeline integration docs not working

From a user on the Pulumi Community Slack: https://pulumi-community.slack.com/archives/C84L4E3N1/p1580740048408200


I’ve followed the docs for a GitLab pipeline and pulumi is not found. Yes, I’m updating my path:

=== Pulumi is now installed! 🍹 ===
+ Please add /root/.pulumi/bin to your $PATH
+ Get started with Pulumi: https://www.pulumi.com/docs/quickstart
$ export PATH=$PATH:$HOME/.pulumi/bin
$ which pulumi
/root/.pulumi/bin/pulumi
$ cd pulumi
$ pulumi login
/bin/sh: eval: line 96: pulumi: not found

Explain imperative vs declarative better

The interplay between imperative code and how Pulumi's declarative engine / goal state works is not clearly explained anywhere, and yet is a very important point for new users to understand.

The closest is probably How it Works but this page is quite lengthy and isn't oriented around these points, as much as it is giving a broad brush architectural overview of various key system pieces.

We should clearly describe this somewhere prominently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.