Syntax Highlighting with Pygments

{% highlight language="java" %}
    public abstract class OrchidGenerator extends Prioritized implements OptionsHolder {

        protected final String key;
    
        protected final OrchidContext context;
    
        @Inject
        public OrchidGenerator(OrchidContext context, String key, int priority) {
            super(priority);
            this.key = key;
            this.context = context;
        }
    
        /**
         * A callback to build the index of content this OrchidGenerator intends to create.
         *
         * @return a list of pages that will be built by this generator
         */
        public abstract List<? extends OrchidPage> startIndexing();
    
        /**
         * A callback to begin generating content. The index is fully built and should not be changed at this time. The
         * list of pages returned by `startIndexing` is passed back in as an argument to the method.
         *
         * @param pages the pages to render
         */
        public abstract void startGeneration(Stream<? extends OrchidPage> pages);
    }
{% endhighlight %}

 1 public abstract class OrchidGenerator extends Prioritized implements OptionsHolder {
 2         
 3         protected final String key;
 4     
 5         protected final OrchidContext context;
 6     
 7         @Inject
 8         public OrchidGenerator(OrchidContext context, String key, int priority) {
 9             super(priority);
10             this.key = key;
11             this.context = context;
12         }
13     
14         /**
15          * A callback to build the index of content this OrchidGenerator intends to create.
16          *
17          * @return a list of pages that will be built by this generator
18          */
19         public abstract List<? extends OrchidPage> startIndexing();
20     
21         /**
22          * A callback to begin generating content. The index is fully built and should not be changed at this time. The
23          * list of pages returned by `startIndexing` is passed back in as an argument to the method.
24          *
25          * @param pages the pages to render
26          */
27         public abstract void startGeneration(Stream<? extends OrchidPage> pages);
28     }


Embed Github Gist

{% gist user="cjbrooks12" id="83a11f066388c9fe905ee1bab47ecca8" %}