Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 6,699 for Post (0.14 sec)

  1. test/scripts/processors/post.js

        await process(file);
        const post = Post.findOne({source: file.path});
    
        post.title.should.eql('Hello world');
        post.date.format(dateFormat).should.eql('2006-01-02 15:04:05');
        post.updated.format(dateFormat).should.eql('2014-12-13 01:02:03');
        post._content.should.eql('The quick brown fox jumps over the lazy dog');
        post.source.should.eql(file.path);
        post.raw.should.eql(body);
    JavaScript
    - Registered: 2020-10-19 21:39
    - Last Modified: 2020-07-15 17:52
    - 25.9K bytes
    - Viewed (0)
  2. app/assets/javascripts/discourse/app/models/post.js

        return firstPost ? topicDeletedAt : deletedAt;
      },
    
      @discourseComputed("post_number", "topic_id", "topic.slug")
      url(post_number, topic_id, topicSlug) {
        return postUrl(
          topicSlug || this.topic_slug,
          topic_id || this.get("topic.id"),
          post_number
        );
      },
    
      // Don't drop the /1
      @discourseComputed("post_number", "url")
      urlWithNumber(postNumber, baseUrl) {
    JavaScript
    - Registered: 2020-09-17 05:30
    - Last Modified: 2020-09-04 11:42
    - 12.1K bytes
    - Viewed (0)
  3. test/scripts/hexo/post.js

    const { parse: yfm } = require('hexo-front-matter');
    const fixture = require('../../fixtures/post_render');
    const escapeSwigTag = str => str.replace(/{/g, '{').replace(/}/g, '}');
    
    describe('Post', () => {
      const Hexo = require('../../../lib/hexo');
      const hexo = new Hexo(join(__dirname, 'post_test'));
      const { post } = hexo;
      const now = Date.now();
      let clock;
      let defaultCfg = {};
    
      before(async () => {
    JavaScript
    - Registered: 2020-10-19 21:39
    - Last Modified: 2020-09-15 05:49
    - 33.6K bytes
    - Viewed (0)
  4. lib/models/post.js

      });
    
      // Remove PostTag references
      Post.pre('remove', data => {
        const PostTag = ctx.model('PostTag');
        return PostTag.remove({post_id: data._id});
      });
    
      // Remove PostCategory references
      Post.pre('remove', data => {
        const PostCategory = ctx.model('PostCategory');
        return PostCategory.remove({post_id: data._id});
      });
    
      // Remove assets
      Post.pre('remove', data => {
    JavaScript
    - Registered: 2020-10-19 21:39
    - Last Modified: 2020-06-22 05:34
    - 6.3K bytes
    - Viewed (0)
  5. test/utils/fixtures/themes/casper/post.hbs

    </header>
    
    {{!-- Everything inside the #post tags pulls data from the post --}}
    {{#post}}
    
    <main id="site-main" class="site-main outer">
        <div class="inner">
    
            <article class="post-full {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
    
                <header class="post-full-header">
                    <section class="post-full-meta">
    Plain Text
    - Registered: 2020-10-20 17:59
    - Last Modified: 2020-03-30 15:26
    - 6.8K bytes
    - Viewed (0)
  6. fixtures/blocks/src/server/Post.js

    import Link from '../client/Link';
    
    export default function Post({post}) {
      return (
        <div
          style={{
            border: '1px solid #aaa',
            borderRadius: 10,
            marginBottom: 20,
            padding: 20,
            maxWidth: 500,
          }}>
          <h4 style={{marginTop: 0}}>
            {post.title}
            {' by '}
            <Link to={`/profile/${post.user.id}`}>{post.user.name}</Link>
          </h4>
          <p>{post.body}</p>
    JavaScript
    - Registered: 2020-10-25 11:45
    - Last Modified: 2020-05-06 14:53
    - 973 bytes
    - Viewed (0)
  7. lib/plugins/console/list/post.js

    }
    
    function listPost() {
      const Post = this.model('Post');
    
      const data = Post.sort({published: -1, date: 1}).map(post => {
        const date = post.published ? post.date.format('YYYY-MM-DD') : 'Draft';
        const tags = post.tags.map(mapName);
        const categories = post.categories.map(mapName);
    
        return [
          gray(date),
          post.title,
          magenta(post.source),
          categories.join(', '),
    JavaScript
    - Registered: 2020-10-19 21:39
    - Last Modified: 2019-12-20 01:28
    - 922 bytes
    - Viewed (0)
  8. lib/plugins/processor/post.js

        const Post = ctx.model('Post');
        const id = file.source.substring(ctx.base_dir.length).replace(/\\/g, '/');
        const doc = PostAsset.findById(id);
    
        if (file.type === 'delete') {
          if (doc) {
            return doc.remove();
          }
    
          return;
        }
    
        // TODO: Better post searching
        const post = Post.toArray().find(post => file.source.startsWith(post.asset_dir));
    
    JavaScript
    - Registered: 2020-10-19 21:39
    - Last Modified: 2020-07-25 11:40
    - 7K bytes
    - Viewed (0)
  9. test/scripts/models/post.js

        cats.should.have.lengthOf(3);
    
        return Post.removeById(post._id);
      }));
    
      it('remove PostTag references when a post is removed', () => Post.insert({
        source: 'foo.md',
        slug: 'bar'
      }).then(post => post.setTags(['foo', 'bar', 'baz'])
        .thenReturn(Post.findById(post._id))).then(post => Post.removeById(post._id)).then(post => {
        PostTag.find({post_id: post._id}).should.have.lengthOf(0);
    JavaScript
    - Registered: 2020-10-19 21:39
    - Last Modified: 2020-09-01 15:21
    - 13K bytes
    - Viewed (0)
  10. core/server/models/post.js

                message: i18n.t('errors.models.post.notEnoughPermission')
            }));
        }
    });
    
    Posts = ghostBookshelf.Collection.extend({
        model: Post
    });
    
    // Extension for handling the logic for author + multiple authors
    Post = relations.authors.extendModel(Post, Posts, ghostBookshelf);
    
    module.exports = {
        Post: ghostBookshelf.model('Post', Post),
    JavaScript
    - Registered: 2020-10-20 17:59
    - Last Modified: 2020-09-24 01:32
    - 43K bytes
    - Viewed (0)
Back to top